You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Ernest Monklitch (JIRA)" <de...@tapestry.apache.org> on 2008/06/04 14:49:45 UTC

[jira] Commented: (TAPESTRY-2109) Submit add parameter type, with possible values submit,reset,cancel,cancelsubmit

    [ https://issues.apache.org/jira/browse/TAPESTRY-2109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602269#action_12602269 ] 

Ernest Monklitch commented on TAPESTRY-2109:
--------------------------------------------

The ability to submit the form WITHOUT validation is really important. For an example I have a list of tu -objects and user can add as many as he/she likes. I have all kinds of  other data in the form, and the add tu button must send all that other data to server while at the same time so that no data is lost during the tu addition. Hence actionlink cannot be used.

And this must not initiate client side nor server side validation, user can add as many tu:s as she/he likes before entering any other data. That other data is not needed until save operation that happens when user SAVES the form.

 - 99

> Submit add parameter type, with possible values submit,reset,cancel,cancelsubmit
> --------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2109
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2109
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.0.10
>            Reporter: Davor Hrg
>             Fix For: 5.1
>
>         Attachments: TAPESTRY-2109-R629196.patch, TAPESTRY-2109.patch
>
>
> There is a need for more submit types...
> although <input type="submit"> and <input type="reset"> are trivial even without a component,
> there is a problem when a type="cancel" is needed.
> The issue here is that in case of cancel client validation must be skipped, and that is not possible with current
> Submit component.
> I don't know how submit type=cancel works for T4 so I've implemented it how it seemed right for me.
> extract from javadoc for the "type" parameter 
>     
>      * Determines the button behavior, <b>"submit"</b> - a normal form button, <b>"reset"</b> - reset form (locally), 
>      * "cancel" - works like an actionlink, generates a "cancel" event instead of "selected" and the form is not submitted 
>      * (if javascript is disabled form will be submitted, and "cancel" event fired as well), 
>      * <b>"submitcancel"</b> - works like "cancel" but behaves consistently with and without javascript
>      * submission (this is usually desirable).
>      
> input type=cancel uses javascript to redirect to an action link url, thus avoiding form submission,
> so I've added type=submitcancel which still submits the form but avoids client validation.
> both generate "cancel" event which is different from the "selected" event
> on top of all that the type=forced could be easily added to call "selected" event while skipping client side validation

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org