myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Udo Schnurpfeil (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Commented] (TOBAGO-616) DefaultCommand on subforms
Date Fri, 25 May 2012 07:15:24 GMT

    [ https://issues.apache.org/jira/browse/TOBAGO-616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13283183#comment-13283183
] 

Udo Schnurpfeil commented on TOBAGO-616:
----------------------------------------

For that feature we should re-implement the behavior when the "ENTER" key was pressed. The
default behavior of the browsers (submit the current form) can't be used, because Tobago have
only one form on the page (this is because we don't want to lost the content of the other
(virtual) forms). 

Define the behavior:

+ When <ENTER> is pressed, search in the current virtual form the command with defaultCommand="true"
and execute this command.
+ The current virtual form is that one, where the focus is.
+ If there is no defaultCommand="true", search the parent virtual form, and so on.
+ Also <CTRL>+<ENTER> should work (to enforce the command).
+ The current default command should have a CSS class like tobago-button-markup-defaultCommand
to visualize the current default command. 
except for:
+ The focus is on a TEXTAREA field: The <ENTER> should insert the new-line in the TEXTAREA.
But you can enforce the command with <CTRL>+<ENTER>
+ If you are in an active menu selection the <ENTER> should do what it normally does.
+ If you are in an selectOneChoice the <ENTER> should do what it normally does.
+ If you are in an input suggest selection the <ENTER> should do what it normally does.
+ If the focus is on a command the <ENTER> should execute the focused command and not
the default command.
                
> DefaultCommand on subforms
> --------------------------
>
>                 Key: TOBAGO-616
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-616
>             Project: MyFaces Tobago
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.0.14
>            Reporter: Rainer Rohloff
>            Assignee: Udo Schnurpfeil
>
> Assume following situation on one page:
> <tc:form>
>  ...
>    <tx:in label="Search" value="#{searchBean.search}"/>
>    <tc:button label="Search" action="doSearch" defaultCommand="true" />
> </tc:form>
> <tc:form>
>  ...
>    <tx:in label="Name" value="#{valueBean.name}"/>
>    <tc:button label="New Customer" action="doNew" defaultCommand="true" />
> </tc:form>
> It would be nice to submit the focused form with the "enter" key.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message