voyent
Single field submit or multiple forms simultaneous submit  XML
Forum Index -> General Help
Author Message
edykory


Joined: 27/Nov/2006 00:00:00
Messages: 332
Offline


Hi again!
I'm working on an application where I have to put in one form lots (about 250) controls. On just a couple of them i have to make some logic on the server, and this doesn't depend on the values of the other fields. Is it possible in any way to force a partialSubmit on just one field, as submitting 250 fields each time is a little bit unrealistic.
A solution could be (I think) to break the big form in more forms, but how can I then synchronize the submit of all forms on a push of a button?

Thanx a lot!
edykory


Joined: 27/Nov/2006 00:00:00
Messages: 332
Offline


I checked and yes, breaking the initial form in more forms does the job. My only question now is how to synchronize all the submits on a submit button. I know that ice faces adds some javascript stuff, and I want to do the thing in the right way, not just in a way that works for someone.
dzik

Joined: 13/Mar/2008 00:00:00
Messages: 20
Offline


I have got the same issue.

I tried add additional iceSubmitPartial action to onClick but this does not work as I thought.

Code:
 <ice:form id="form1" partialSubmit="true">
 ...
 </ice:form>
 <ice:form id="form2" partialSubmit="true">
 ...
 <ice:commandButton value="Submit" action="#{bean.submit}" onclick="iceSubmitPartial(document.getElementById('form1'), this, event);" />
 </ice:form>
 


Follwing code caused that both forms are sent but bean.submit action is not called only when validation on form2 fails. If validation on form1 fails appropriate messages will be displayed but bean.submit will be called.
How to break action after iceSubmitPartial (it does not return boolean value) fail?

Might there is other resolution?

Regards,
Krzysiek
 
Forum Index -> General Help
Go to:   
Powered by JForum 2.1.7ice © JForum Team