Re: Need combo to determine action but validation fails

2007-09-26 Thread Francisco Diaz Trepat - gmail
Thanks to all.

Finally I solve it by calling the getRawInput.

Thanks anyways guys.

f(t)


On 9/26/07, Kent Tong [EMAIL PROTECTED] wrote:



 Francisco Diaz Trepat - gmail wrote:
 
  What it is happening is that because of some fields are invalid (Empty)
 I
  cannot get to the selected option of the DropDownChoice, and by that
  change
  part of the form.
 

 Try:

private void showHideDetailsOnForm(AjaxRequestTarget target) {
cDetailsChoices.processInput();
...
}
 --
 View this message in context:
 http://www.nabble.com/Need-combo-to-determine-action-but-validation-fails-tf4511066.html#a12893753
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Need combo to determine action but validation fails

2007-09-25 Thread Kent Tong


Francisco Diaz Trepat - gmail wrote:
 
 What it is happening is that because of some fields are invalid (Empty) I
 cannot get to the selected option of the DropDownChoice, and by that
 change
 part of the form.
 

Try:

private void showHideDetailsOnForm(AjaxRequestTarget target) {
cDetailsChoices.processInput();
...
}
-- 
View this message in context: 
http://www.nabble.com/Need-combo-to-determine-action-but-validation-fails-tf4511066.html#a12893753
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Need combo to determine action but validation fails

2007-09-24 Thread Francisco Diaz Trepat - gmail
Hi all,

I have a simple Form that contains a DropDownChoice. I have a submit button
and a submit link to change part of the form based on the option selected in
the DropDownChoice.

What it is happening is that because of some fields are invalid (Empty) I
cannot get to the selected option of the DropDownChoice, and by that change
part of the form.


final AjaxSubmitLink cDetailedForm = new AjaxSubmitLink(DetailedForm) {
 public void onSubmit(AjaxRequestTarget target, Form form) {
showHideDetailsOnForm(target);
 }
 public void onError(AjaxRequestTarget target, Form form) {
showHideDetailsOnForm(target);
 }
  };

private void showHideDetailsOnForm(){

String option = ((Map)getModel().getObject()).get(DetailsChoices);

if(option.equals(2)){



}

.etc.

}

As the form validation fails, I cannot get to the model.  If I set
DefaultFormProcessing to false it doesn't submit it either.


Question Time:

Is there a way to set validations to buttons or submit elements in
particular?

Ex. If I click the button named SubmitAndValidateAll some validations are
executed and if I click the button named SubmitButDontValidateAge some
not...


f(t)