I'd go for the second option - so:

t:storeParentComponentClientId just set somekind of internal variable
or request variable containing the base client Id that ifMessage would
lookup

and in this option, internal variable, not a request one.

If the component takes part in every phase of lifecycle (so no tag -
needs to be a component), it will properly set the parent-id even when
in a data-table. Caveat: the parent-component may not be the dataTable
itself then. Hmm.... ideas?

regards,

Martin

On 9/21/06, Michael Youngstrom <[EMAIL PROTECTED]> wrote:
>ifMessage would look up the component by finding first the parent
component (for which it has the client-id)

What do you mean by this?  Are you saying ifMessage would traverse the
tree looking for t:storeParentComponentClientId and then use it's
client id as the parent id for "name"?  Or would


Would something like this be able to work for input components in a
DataTable?  Or in other places where we have another NamingContainer
inside of the form?

Mike


On 9/20/06, Martin Marinschek (JIRA) <[email protected]> wrote:
>     [ 
http://issues.apache.org/jira/browse/MYFACES-1197?page=comments#action_12436379 ]
>
> Martin Marinschek commented on MYFACES-1197:
> --------------------------------------------
>
> Not quite - you wouldn't need to provide a var, cause the 
parentComponentClientId would always store the client-id of its immediate parent 
(optionally, one might supply a for-attribute for the then renamed component).
>
> So it would look like this:
>
> <h:form id="someForm">
>
>   <t:storeParentComponentClientId/>
>
>     <h:inputText id="name" required="true"/>
>     <h:panelGroup rendered="#{myfacesContext.ifMessage['name']}">
>         <!-- some markup to support the error message -->
>         <h:message for="name"/>
>     </h:panelGroup>
> </h:form>
>
> and the internal implementation of ifMessage would look up the component by 
finding first the parent component (for which it has the client-id) and then 
finding the component with the id name on the parent.
>
> regards,
>
> Martin
>
> > Docs for ifMessage component
> > ----------------------------
> >
> >                 Key: MYFACES-1197
> >                 URL: http://issues.apache.org/jira/browse/MYFACES-1197
> >             Project: MyFaces Core
> >          Issue Type: Improvement
> >          Components: General
> >    Affects Versions: 1.1.2-SNAPSHOT
> >            Reporter: Mike Youngstrom
> >         Assigned To: Martin Marinschek
> >         Attachments: ifMessageDocs.patch
> >
> >
> > Here is a patch with docs for the ifMessage component I donated.
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>



--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Reply via email to