Bug in Page refresh?

2010-04-16 Thread Wolfgang Grossinger
We have a DropDownChoice to change the language of a page (the language 
in mapped through an enum). The handler to change the code is as follows.


@Override
protected void onSubmit(AjaxRequestTarget target) {

getSession().setLocale(getLanguage().getObject().getLocale());

setResponsePage(getPage());
}

We just have 3 pages and a login page. The code works on 2 of 3 pages 
but I don't know why it doesn't work on the third page (the code to find 
the language and to get the current page seems also to be correct and 
working). My question is does anybody have some hints what I could do wrong?


Regards,

Wolfgang



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



Master/Detail with DropDownChoice

2010-03-27 Thread Wolfgang Grossinger

Hi,

I have a real big problem and cant find any solution: What I want to do 
ist to have a master/detail view, where a DropDownChoice is the master 
to select the detail. The detail view is also used to save new Items and 
where some fields are 'required'.


1.) I need some kind of submit behavior. AjaxEventBehavior(onchange) 
will not work, because it doesn't deliver the current selection.
2.) Master and detail must be 2 different forms, because if I use one 
form, I would get a validation error when the required fields are not 
set what is not intended when I just want to select another item.


What I did at the moemnt is something like

wicket:panel
form id=masterForm method=post wicket:id=masterForm
select id=selNotamFilter2 wicket:id=selNotamFilter2/
/form
form id=detailsForm method=post wicket:id=detailsForm
   .

and the handling is done in this way:

   protected void onSubmit(AjaxRequestTarget target) {
DropDownChoiceString component = 
(DropDownChoiceString) this.getComponent();
Details selected = 
getMatchingItem(component.getConvertedInput());


So I come to the point that I have the right details to set and can also 
set the details to the model, but whatever I add via 
target.addComponent(...) is not updated after the request.


So my question is what do I wrong? (Is it not possible to update one 
form from another form?)
What can I do to get this right? (I find absolutely no solution for a 
quite common ans simpel problem in my opinion and this stuff cost me 
already days).


Thanks a lot for any help!

Wolfgang


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