--
Pedro Henrique Oliveira dos Santos
--
View this message in context:
http://old.nabble.com/Doubt-about-form-components-tp27693061p27714259.html
Sent from the Wicket - Dev mailing list archive at Nabble.com.
Hi Martin, consider this form:
java code:
Form form = new Form(form);
add(form);
final TextFieldInteger textField = new TextField(tf, new
Model());
textField.setType(Integer.class);
textField.setOutputMarkupId(true);
form.add(textField);
Yes.. don't use referenceToModel. Instead call
textField.getDefaultModelObject();
**
Martin
2010/2/23 Pedro Santos pedros...@gmail.com:
Hi Martin, consider this form:
java code:
Form form = new Form(form);
add(form);
final TextFieldInteger textField = new
Or, call modelChanged()?
On Tue, Feb 23, 2010 at 7:06 AM, Martin Makundi
martin.maku...@koodaripalvelut.com wrote:
Yes.. don't use referenceToModel. Instead call
textField.getDefaultModelObject();
**
Martin
2010/2/23 Pedro Santos pedros...@gmail.com:
Hi Martin, consider this form:
java
In the step 3, the user isn't changing the model value, so
setDefaultModelObject don't call internalOnModelChanged. The user intent
that can be update the component markup will fail, unless he call
modelChanged by his own.
On Tue, Feb 23, 2010 at 9:59 AM, Martin Makundi
Hi!
Hi, the form component clearInput method that clean this state is called on
the valid method. I'm trying to guess why the form component keep his raw
input after an form processing with errors. I can't figure out why don't
clear the raw input in this situation, since on the next form
Hi Martin, thanks for the reply!
Hi, the form component clearInput method that clean this state is called
on
the valid method. I'm trying to guess why the form component keep his raw
input after an form processing with errors. I can't figure out why don't
clear the raw input in this
Hi!
I don't know the original design but if you (e.g., ajax) redraw some
components it's goddamn useful to have the raw input. Say that you
redraw erroneous components with red border like I do. You would lose
the raw value if you clear that and the user would lose the input.
Actually this
IMO the form processing can be:
1. validate
2. detect error
3. keep rawinput
4. re-render error components with red border AND rawinput
4.1. throw away the raw input in some detach method
5. user retry form submit
6. all form components get they raw input again since they get rendered
Hi!
What's the difference whether it's thrown away or not if the next step
is re-submit with new values?
**
Martin
2010/2/22 Pedro Santos pedros...@gmail.com:
IMO the form processing can be:
1. validate
2. detect error
3. keep rawinput
4. re-render error components with red border AND
if a user refreshes the browser or does some other action (go first to
another form in another page and back again)
then we still can render the latest user output just fine the next time
On Mon, Feb 22, 2010 at 21:42, Pedro Santos pedros...@gmail.com wrote:
IMO the form processing can be:
11 matches
Mail list logo