Re: setVisbile on form makes me reset fields

2009-07-21 Thread Mathias Nilsson

When pressing the link it will tell wicket to refresh the page and the form
will no be submitted.
have you tried submitLink instead of link?
-- 
View this message in context: 
http://www.nabble.com/setVisbile-on-form-makes-me-reset-fields-tp2458p24583629.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: setVisbile on form makes me reset fields

2009-07-21 Thread pieter claassen
Ok, here it is

private class QuestionEditForm extends Form {
private boolean questionformatter = true;
public QuestionEditForm(String id) {
super(id);
TextChunk question =
paragraphwebmodel.getEntity().getStatement();
setModel(new
CompoundPropertyModel(paragraphwebmodel));
VariableTextFieldPanel questionpanel = new
VariableTextFieldPanel(
"question", new PropertyModel(paragraphwebmodel,
"statement.value"));
final AdvancedFormatterPanel formatquestion = new
AdvancedFormatterPanel(
"formatquestion", new AdvancedFormatterWebModel(question
.getFormatter()));
add(new
DropDownChoice("clear",Arrays.asList(QuestionLayoutClearance.values()),new
MyChoiceRenderer()));
formatquestion.setVisible(false);

add(new Link("showquestionformat") {
@Override
public void onClick() {
formatquestion.setVisible(questionformatter);
if (questionformatter) {
questionformatter = false;
} else {
questionformatter = true;
}
}
});

On Tue, Jul 21, 2009 at 10:03 AM, Mathias Nilsson <
wicket.program...@gmail.com> wrote:

>
> Can you post some code so we can see whats going on?
> --
> View this message in context:
> http://www.nabble.com/setVisbile-on-form-makes-me-reset-fields-tp2458p24583413.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Pieter Claassen
musmato.com


Re: setVisbile on form makes me reset fields

2009-07-21 Thread Mathias Nilsson

Can you post some code so we can see whats going on?
-- 
View this message in context: 
http://www.nabble.com/setVisbile-on-form-makes-me-reset-fields-tp2458p24583413.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



setVisbile on form makes me reset fields

2009-07-21 Thread pieter claassen
To clear the clutter in my form, I have a number of subforms hidden behind
toggle links. However, I find that if I toggle these subforms visible using
subform.setVisble(true), then I lose my contents of the rest of the controls
on the main page.

Any tips on how to force retain the already entered data on the form when
setting subform visibility?

P