myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakob Korherr (JIRA)" <...@myfaces.apache.org>
Subject [jira] Issue Comment Edited: (TOMAHAWK-1444) document how to set a focus on the first field of a dynamically generated set of input fields
Date Thu, 03 Sep 2009 16:00:58 GMT

    [ https://issues.apache.org/jira/browse/TOMAHAWK-1444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12751066#action_12751066
] 

Jakob Korherr edited comment on TOMAHAWK-1444 at 9/3/09 8:59 AM:
-----------------------------------------------------------------

you can use <t:inputText>, set forceId="true" and forceIdIndex="true", then you'll get
those kind of Ids for your textfields:

yourAssignedId[0]
yourAssignedId[1]
...

then just put a <s:focus for="yourAssignedId[0]" /> after </t:dataList>.

I guess this should work!

      was (Author: jakobkorherr):
    you can use <t:inputText>, set forceId="true" and forceIdIndex="false", then you'll
get those kind of Ids for your textfields:

yourAssignedId[0]
yourAssignedId[1]
...

then just put a <s:focus for="yourAssignedId[0]" /> after </t:dataList>.

I guess this should work!
  
> document how to set a focus on the first field of a dynamically generated set of input
fields
> ---------------------------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-1444
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1444
>             Project: MyFaces Tomahawk
>          Issue Type: Improvement
>          Components: Data List
>            Reporter: Ralf Hauser
>
> this should be added to http://myfaces.apache.org/sandbox/focus.html
> My code to generate the fields looks like
> <t:dataList
> 			               var="propSubItem"
> 			               value="#{propItem.subItems}"
> 			               layout="simple"
> 			               rowCountVar="x"
> 			               rowIndexVar="y">
> 			               
> 	               <h:inputText value="#{propSubItem.name}" size="5" style="width:65px"></h:inputText>
> 		               
> 					</t:dataList>
> As opposed to otherwise, I omit the inputText tag's id field. I noticed that just hardcoding
the 
> 			               "*formName*:_idJsp9:0:_idJsp13:0:_idJsp14" 
> appears to work in quick-and-dirty tests, but there must be a better way to focus on
the first of the generated input fields and I didn't find anything in the mailing lists.

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


Mime
View raw message