Calling requiredif on "save" invocation

  • Thread starter Gearóid O'Ceallaigh
  • Start date
G

Gearóid O'Ceallaigh

Hi,

I'm just getting into java struts and its validation and am having
trouble using requiredIf (the project I'm working on uses struts 1.2).

On my jsp page, I would like to call the validation rule
"validateUniqueUserAssignedNameMethod" when the user tries to save
their form. The validation works correctly when the user clicks save
and thus, submits the form.

However, the links between pages are also submit buttons (so the data
is submitted to the form) and when the user wishes to navigate back to
a previous page (the save button is on the last page) - the validation
rule stops them since the "UserAssignedName" is already taken.

I'd like to introduce a requiredif on this rule so that it only runs
when the users has clicked save.

I don't have a clue on how to do this so any help would be very much
appreciated. Thanks in advance.
 
G

Gearóid O'Ceallaigh

Hi,

I'm just getting into java struts and its validation and am having
trouble using requiredIf (the project I'm working on uses struts 1.2).

On my jsp page, I would like to call the validation rule
"validateUniqueUserAssignedNameMethod" when the user tries to save
their form. The validation works correctly when the user clicks save
and thus, submits the form.

However, the links between pages are also submit buttons (so the data
is submitted to the form) and when the user wishes to navigate back to
a previous page (the save button is on the last page) - the validation
rule stops them since the "UserAssignedName" is already taken.

I'd like to introduce a requiredif on this rule so that it only runs
when the users has clicked save.

I don't have a clue on how to do this so any help would be very much
appreciated. Thanks in advance.

bump - anybody have any ideas??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top