JBoss 5, JaaS, Wicket and ThreadLocal

2010-01-20 Thread Alexander Elsholz
Hi,

im confused;-)

With jboss 5 the security-client interceptor uses the SecurityAssociation
Thread-Local variables to get the principal and credentials and put them into
the rmi-call. the set will perform in login. 

hmm, thread local, multi-user-plattform, webcontainer - how should this work?

ok, there is a possibility to use an inheritance-thread-local - but that doesnt
help. the wicket-parent-thread isn't the thread who performs the login.

so how could that work?

now we set the thread-local-variable in overridden newrequest-opertaion of
webapplication. after login we save principal and credentials in session. when a
new wicket request will created (i think wicket creates a new thread per
request) we push the session-variables into the thread-local.

that works now - but has anybody a better idea?

alex


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Adding a form field at run time... is it possible?

2010-01-20 Thread Alexander Elsholz
hi,

use a listview. the model contains wicket-components that you put on listview.
if you have different html-elements introduce a wrapper: TextfieldWrapper,
SpanWrapper etc what are panels that wrapps the component.

alex






-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: yui context menu after ajax request

2010-01-18 Thread Alexander Elsholz
rerender the menu javascripcode in ajaxevent.

alex


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: yui context menu after ajax request

2010-01-18 Thread Alexander Elsholz
for my problem with dojo this works: 

public void refreshMenu(AjaxRequestTarget pTarget) {

   String js =  dojo.addOnLoad(function(){\n + menu.generateJS()
 + \n}); ;
pTarget.appendJavascript(sss);
}


and i know the same stuff works for jquery and yui. the problem is that the
header javascript brokes after rerendering the component (i think its a problem
with object references because most browsers replace the object by creating a
new one and the javascript stuff bind on the dom-bject). What seems to work is
to put the javascript stuff into the body tag using the onComponentRendered()
to reactivate the behavior. 

the ugly is you have to reload the menu in every ajax-event reredering the
component with menu.

hth
alex


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



wicket security future - contribute!

2010-01-13 Thread Alexander Elsholz
hi wicket folks,

in my last wicket projects i used wicket-auth roles and swarm/wasp. i think
swarm/wasp is a really good base for larger web-applications. but we all know
about the problem with swarm/wasp. i developed a few extensions for swarm, but
its a lot of code and so nobody starts to maintain and whats more important to 
develop. so wasp swarm stops on wicket 1.3.

there was plans to integrate wicket-security in 1.5. @wicket developers: is this
still relevant?

i think we will not find one person who develops wicket-security allone - so
who's interested?
its not the part brings the most fun in wicket development area but a very very
important part of every enterprise application - so contribute! lets define a
security-subteam.

regards alex


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



switch css of option element in dropdownchoice

2010-01-13 Thread Alexander Elsholz
hi,

i need to switch the style of an option element.

i override the  

AbstractChoice#appendOptionHtml(...)

copied the code and put my stuff in the middle. any other ideas? 

thanks alex


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Ajax and form handling and clearInput

2010-01-13 Thread Alexander Elsholz
Hi,

i use a drop-down to switch some data in view. replace data in my model-bean
class (pojo wraps different business objects) and repaints the form via ajax-on
change event. (data binded via propertymodel)

some fields are required.

1. all fields are valid, works fine
2. clear one field and try to submit - fails. Model is still valid. cool
3. switch the drop down list. model-object will replaced and the form added to
ajaxtarget. expect to see the model value of new model object
4. fails! the field still is empty. why?

public final String getValue()
{
if (NO_RAW_INPUT.equals(rawInput))
{
return getModelValue();
}
else
{
if (getEscapeModelStrings()  rawInput != null)
{
return Strings.escapeMarkup(rawInput).toString();
}
return rawInput;
}
}

input is empty (cleared field before last button submit) , so the geModelValue
isn't called.

Form#clearInput or FormComponent#clearInput helps, but i think i make a mistake.
i can't imagine that ajax-events on failed forms which switch the model and
repaint the form have to clear the form manually.

wicket 1.3.5

regards alex


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: switch css of option element in dropdownchoice

2010-01-13 Thread Alexander Elsholz
Igor Vaynberg igor.vaynberg at gmail.com writes:
 
 use css selectors
 
 -igor
 

hi igor,

thanks for really fast reply;-)

i forgot - the css switchs programmatically (for different options, not all). so
static selectors doesn't help

thanks alex





-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Ajax and form handling and clearInput

2010-01-13 Thread Alexander Elsholz
Igor Vaynberg igor.vaynberg at gmail.com writes:

 
 this is by design. formcomponents buffer input that is in error so it
 can be redisplayed. you can use either form.clearinput() or for your
 usecase a bit more appropriate form.modelchanged() to notify the model
 that you have changed the backing model object and it should drop any
 buffered state

When I think about it now - you're right. i have to notify the form about
switching their underlying business object

thanks again alex


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: switch css of option element in dropdownchoice

2010-01-13 Thread Alexander Elsholz
Igor Vaynberg igor.vaynberg at gmail.com writes:

 
 then you are stuck doing what you are doing. you can request for some
 methods to be added into ichoicerenderer such as getoptgroup() and
 getcssclass(). maybe we can do that in 1.5
 
 -igor

hi igor,

done. https://issues.apache.org/jira/browse/WICKET-2674

regards alex


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: wicketTester.executeAjaxEvent not working

2010-01-11 Thread Alexander Elsholz
Hi,

wicket 1.4? 

try: 
((ServletWebRequest) baseWicketTester.getWicketRequest()).setAjax(true)

mfg alex




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket GAE Performance

2009-10-28 Thread Alexander Elsholz
Hi,

i dont have any profiler. the problem is, that the application is slow when
running on googles application engine. local, where i could profile aeverything
is fine.
where ist the best place in wicket to hoock performance measures? or are there
any debug-messages which i could activate?

thanka alex





-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Wicket GAE Performance

2009-10-27 Thread Alexander Elsholz
Hi,

we build a wicket-application, running in gae - all works fine. but when
deploying on gae-environment the performance is terrible (tried development and
deploymentmode). an ajax-call takes more than 3 secounds. i logged all
database-queries - no problem there. we lost time anywhere in
wicket-request-cycle. had anyone simelar problems and solved them?

thanks a lot alex


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Multirequest Feedback

2009-10-13 Thread Alexander Elsholz
Hi,

i use ajax-listeners to validate formcomponents onblur or onkeychanged. an
ajax-event will processed and the validationmessage displyed on screen. works
fine for one component.

when i've more than one there is only the message for the last processed
formcomponent. the other's will removed from session.

but i want display the messages of all unvalid components on page.

thanks a lot alex


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Multirequest Feedback

2009-10-13 Thread Alexander Elsholz
hi pedro,

Pedro Santos pedrosans at gmail.com writes:
 you have many form components and only one feedback panel
 - user put invalid entry on form component 1, panel show error 1
 - user put invalid entry on form component 2, panel show error 2, no longer
 error 1
 this is it?
that's it

 1 - you can create one ComponentFeedbackPanel for each form component
 2 - you can validate the form on submit, and all errors will to be presented
 at once
for one form. when there are more than one form on page - only messages of last
submitted form will displayed
 3 - any other
that's what i'm looking for. a way to display all validiationmessages of invalid
forms on page.

thanks alex





-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Surround a panel with legend

2009-06-22 Thread Alexander Elsholz
hi,

i want surround my components with titled boarders. the html-way to do this is
legend. i have a page wich controls different panels the user adds.
so the user can surround his component with legend. because of different reasons
the page should surround the comoponent with titled border.

is there a possibility to do this with behavior or subclass panel?

thanks alex


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



DOJO Menu Items and AJAX-Target-Components

2009-06-14 Thread Alexander Elsholz
Hi,

i use dojo menues in my application and mostly it works fine. but when an other
ajax-call refreshed menu's target component the menu will not be displayed. it
seams, that the markup-id of wicket-component changed after ajax-refresh and so
the dojo-js cannot find the menu item for this wicket-component.

had anybody the same problem?

when not what could be the problem?

thanks alex


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: DOJO Menu Items and AJAX-Target-Components

2009-06-14 Thread Alexander Elsholz
hi,

i don't remove/add the components. the hierarchy is constant. its a 
very simple app:

- add an ajaxlink and change the attributemodifier of a panel
- add a menu item to the same panel

after rerendering the panel (after link clicked) the menu will no
more be displayed.

i've the same problem in my table when using ajax and dojo menues

i tried to set the markup-id manually, but no effect.

the associated javascript uses the static markupid i set in code, 
but after rerendering the panel asynchron it does'nt work.

alex





-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



auto focuslost

2009-06-08 Thread Alexander Elsholz
hi,

i need a feature. when a user typed a number with a apecified length (zipcode,
articelnumber and so on) the system should execute an auto focus lost and set
the focus to the next field.

has someone an idea how to solve this issue?

thanks alex


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



putting a panel on dojo-component

2009-06-08 Thread Alexander Elsholz
hi,

when i put a panel on dojos floatingpane i get this warning:

DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not locate
widget implementation for panel in wicket.widget registered to namespace
wicket. Developers must specify correct namespaces for all non-Dojo widgets --
will be removed in version: 0.5

there are different postings in this group with this message, but i doesnt found
a solution.

any idea to solve this?

thanks a lot alex


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



problems with form submits and AJAX modal window

2009-04-06 Thread Alexander Elsholz
hi,

i've problems with submitting my form in a modal window. when i use the same
component (surrounded with a panel) directly on a page everything works fine. 

the problem is, that all component-models are set to null.

in the request-map i found these parameters:
-random:0.5499189677089167
-button:1
-forme_hf_0:


here are the ajax-debug messages:
  INFO:
INFO: Initiating Ajax POST request on
?wicket:interface=:6:pnlPanel:modal.test:content:content:form:btn.test.test:1:
IActivePageBehaviorListener:0:-1wicket:ignoreIfNotActive=truerandom=
0.20329140486022013
INFO: Invoking pre-call handler(s)...

and a bit stacktrace:

Can't convert null value to a primitive class: int for setting it on
de.klingel.kunde.bo.b...@dbdc4b
at
org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(
PropertyResolver.java:1082)
at
org.apache.wicket.util.lang.PropertyResolver$ObjectAndGetSetter.setValue(
PropertyResolver.java:579)
at org.apache.wicket.util.lang.PropertyResolver.setValue(
PropertyResolver.java:133)
at
org.apache.wicket.model.AbstractPropertyModel.setObject(
AbstractPropertyModel.java:164)
at org.apache.wicket.Component.setModelObject(Component.java:2891)
at
org.apache.wicket.markup.html.form.FormComponent.updateModel(
FormComponent.java:1069)
at org.apache.wicket.markup.html.form.Form$19.validate(Form.java:1806)
at
org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(
Form.java:165)
at
org.apache.wicket.markup.html.form.FormComponent.
visitFormComponentsPostOrderHelper(FormComponent.java:421)
at
org.apache.wicket.markup.html.form.FormComponent.
visitFormComponentsPostOrderHelper(FormComponent.java:408)
at
org.apache.wicket.markup.html.form.FormComponent.
visitFormComponentsPostOrder(FormComponent.java:385)
at
org.apache.wicket.markup.html.form.Form.
visitFormComponentsPostOrder(Form.java:1060)
at
org.apache.wicket.markup.html.form.Form.
internalUpdateFormComponentModels(Form.java:1798)
at
org.apache.wicket.markup.html.form.Form.
updateFormComponentModels(Form.java:1765)
at org.apache.wicket.markup.html.form.Form.process(Form.java:865)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(
Form.java:807)
at
org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(
AjaxFormSubmitBehavior.java:120)
at org.apache.wicket.ajax.AjaxEventBehavior.respond(
AjaxEventBehavior.java:163)
at
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(
AbstractDefaultAjaxBehavior.java:293)

i also have an onchange-behavior on a dropdownchoice, where i en- and disable
other fields. that works fine in both cases, page and modal window.

has anyone an idea whats wron with the form-submit?

thanks alex


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org