You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Andre Paap (JIRA)" <de...@myfaces.apache.org> on 2008/05/19 14:27:55 UTC

[jira] Created: (TRINIDAD-1081) id's for inputListOfValues in ui:repeat, tr:table, etc are stripped of unique parts of id in combination with facelet

id's for inputListOfValues in ui:repeat, tr:table, etc are stripped of unique parts of id in combination with facelet
---------------------------------------------------------------------------------------------------------------------

                 Key: TRINIDAD-1081
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1081
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Facelets
    Affects Versions: 1.2.7-core
         Environment: Oracle Jdeveloper 10.1.3.3.0, windows XP proffesional,Facelets 1.1.14, Sun JSF 1.2_08-b06-FCS,  Trinidad 1.2.7
            Reporter: Andre Paap


We have created a facelet that incorporates a LOV that we use in combination with and without a trinidad:table on the page.
If we use this facelet without a table we experience no problems.
If we use the facelet in a table we provide a unique id to the facelet so we can still show a message and outputlabel etc. The ID that we provide is stripped from the unique parts and the log display messages that the id cannot be found. 
The result is that error messages are not shown.

example page using the facelet:
 <tr:table value="#{backingBean.listWithBeans}"
                      var="bean" rows="10" id="ourTable">
                <tr:column>
                     <hubview:inputListOfValues id="ourBeanLOV_#{bean.id}" value="#{bean.name}" backingBean="#{fixtureDetailBean}" />                        
                </tr:column>
   </tr:table>

facelet content:
 <tr:inputListOfValues id="#{id}_lov" value="#{value}" 
                                          action="#{backingBean[startDialogAction]}"
                                          useWindow="true"
                                          returnListener="#{backingBean.onReturnDialog}"
                                          required="true"
                                          simple="true"
                                          partialSubmit="true"
                                          icon="/images/select.gif">                                          
 </tr:inputListOfValues>
<tr:outputText value="#{id}_lov" />
<tr:message for="#{id}_lov"/>

In this example the log shows that Trinidad can not find the component with id ourBeanLOV__lov. Clearly the unique part is stripped. The outputText below however does show the correct value with the id still between ourBeanLOV and LOV part.

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


[jira] Commented: (TRINIDAD-1081) id's for inputListOfValues in ui:repeat, tr:table, etc are stripped of unique parts of id in combination with facelet

Posted by "Andre Paap (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1081?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597947#action_12597947 ] 

Andre Paap commented on TRINIDAD-1081:
--------------------------------------

I was under the impression that facelet resolves the expression and builds a view tree with the result of the expression as a string. At least it does for other framework combinations.
How can a tr:message tag then be used in a table if the id can't be given? If I use a static id (like id="LOVSELECT"  I get complaints that I should use a unique id.

> id's for inputListOfValues in ui:repeat, tr:table, etc are stripped of unique parts of id in combination with facelet
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: TRINIDAD-1081
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1081
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Facelets
>    Affects Versions: 1.2.7-core
>         Environment: Oracle Jdeveloper 10.1.3.3.0, windows XP proffesional,Facelets 1.1.14, Sun JSF 1.2_08-b06-FCS,  Trinidad 1.2.7
>            Reporter: Andre Paap
>
> We have created a facelet that incorporates a LOV that we use in combination with and without a trinidad:table on the page.
> If we use this facelet without a table we experience no problems.
> If we use the facelet in a table we provide a unique id to the facelet so we can still show a message and outputlabel etc. The ID that we provide is stripped from the unique parts and the log display messages that the id cannot be found. 
> The result is that error messages are not shown.
> example page using the facelet:
>  <tr:table value="#{backingBean.listWithBeans}"
>                       var="bean" rows="10" id="ourTable">
>                 <tr:column>
>                      <hubview:inputListOfValues id="ourBeanLOV_#{bean.id}" value="#{bean.name}" backingBean="#{fixtureDetailBean}" />                        
>                 </tr:column>
>    </tr:table>
> facelet content:
>  <tr:inputListOfValues id="#{id}_lov" value="#{value}" 
>                                           action="#{backingBean[startDialogAction]}"
>                                           useWindow="true"
>                                           returnListener="#{backingBean.onReturnDialog}"
>                                           required="true"
>                                           simple="true"
>                                           partialSubmit="true"
>                                           icon="/images/select.gif">                                          
>  </tr:inputListOfValues>
> <tr:outputText value="#{id}_lov" />
> <tr:message for="#{id}_lov"/>
> In this example the log shows that Trinidad can not find the component with id ourBeanLOV__lov. Clearly the unique part is stripped. The outputText below however does show the correct value with the id still between ourBeanLOV and LOV part.

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


[jira] Commented: (TRINIDAD-1081) id's for inputListOfValues in ui:repeat, tr:table, etc are stripped of unique parts of id in combination with facelet

Posted by "Simon Kitching (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1081?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597950#action_12597950 ] 

Simon Kitching commented on TRINIDAD-1081:
------------------------------------------

That's a question for the user list. Please subscribe, and post your question there. This is a bug-tracking system not a user forum..

> id's for inputListOfValues in ui:repeat, tr:table, etc are stripped of unique parts of id in combination with facelet
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: TRINIDAD-1081
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1081
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Facelets
>    Affects Versions: 1.2.7-core
>         Environment: Oracle Jdeveloper 10.1.3.3.0, windows XP proffesional,Facelets 1.1.14, Sun JSF 1.2_08-b06-FCS,  Trinidad 1.2.7
>            Reporter: Andre Paap
>
> We have created a facelet that incorporates a LOV that we use in combination with and without a trinidad:table on the page.
> If we use this facelet without a table we experience no problems.
> If we use the facelet in a table we provide a unique id to the facelet so we can still show a message and outputlabel etc. The ID that we provide is stripped from the unique parts and the log display messages that the id cannot be found. 
> The result is that error messages are not shown.
> example page using the facelet:
>  <tr:table value="#{backingBean.listWithBeans}"
>                       var="bean" rows="10" id="ourTable">
>                 <tr:column>
>                      <hubview:inputListOfValues id="ourBeanLOV_#{bean.id}" value="#{bean.name}" backingBean="#{fixtureDetailBean}" />                        
>                 </tr:column>
>    </tr:table>
> facelet content:
>  <tr:inputListOfValues id="#{id}_lov" value="#{value}" 
>                                           action="#{backingBean[startDialogAction]}"
>                                           useWindow="true"
>                                           returnListener="#{backingBean.onReturnDialog}"
>                                           required="true"
>                                           simple="true"
>                                           partialSubmit="true"
>                                           icon="/images/select.gif">                                          
>  </tr:inputListOfValues>
> <tr:outputText value="#{id}_lov" />
> <tr:message for="#{id}_lov"/>
> In this example the log shows that Trinidad can not find the component with id ourBeanLOV__lov. Clearly the unique part is stripped. The outputText below however does show the correct value with the id still between ourBeanLOV and LOV part.

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


[jira] Commented: (TRINIDAD-1081) id's for inputListOfValues in ui:repeat, tr:table, etc are stripped of unique parts of id in combination with facelet

Posted by "Simon Kitching (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-1081?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597938#action_12597938 ] 

Simon Kitching commented on TRINIDAD-1081:
------------------------------------------

I'm pretty sure that component id values are not permitted to be expressions in JSF.

For example, see here, where the h:form tag's id attribute is explicitly documented as type String, not type Expression:
  http://java.sun.com/javaee/javaserverfaces/1.2/docs/tlddocs/h/form.html
I'm sure the JSF spec explicitly says that ids are not dynamic.

I've tried this out, and it does actually seem to work with Facelets, ie that an EL expression *does* get expanded within an id expression.

However if this is not part of the specification, there's no certainty that this will continue to work. And for it not to work in tables would not be a bug.

There are some very good reasons why IDs *should* be static values.


> id's for inputListOfValues in ui:repeat, tr:table, etc are stripped of unique parts of id in combination with facelet
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: TRINIDAD-1081
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1081
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Facelets
>    Affects Versions: 1.2.7-core
>         Environment: Oracle Jdeveloper 10.1.3.3.0, windows XP proffesional,Facelets 1.1.14, Sun JSF 1.2_08-b06-FCS,  Trinidad 1.2.7
>            Reporter: Andre Paap
>
> We have created a facelet that incorporates a LOV that we use in combination with and without a trinidad:table on the page.
> If we use this facelet without a table we experience no problems.
> If we use the facelet in a table we provide a unique id to the facelet so we can still show a message and outputlabel etc. The ID that we provide is stripped from the unique parts and the log display messages that the id cannot be found. 
> The result is that error messages are not shown.
> example page using the facelet:
>  <tr:table value="#{backingBean.listWithBeans}"
>                       var="bean" rows="10" id="ourTable">
>                 <tr:column>
>                      <hubview:inputListOfValues id="ourBeanLOV_#{bean.id}" value="#{bean.name}" backingBean="#{fixtureDetailBean}" />                        
>                 </tr:column>
>    </tr:table>
> facelet content:
>  <tr:inputListOfValues id="#{id}_lov" value="#{value}" 
>                                           action="#{backingBean[startDialogAction]}"
>                                           useWindow="true"
>                                           returnListener="#{backingBean.onReturnDialog}"
>                                           required="true"
>                                           simple="true"
>                                           partialSubmit="true"
>                                           icon="/images/select.gif">                                          
>  </tr:inputListOfValues>
> <tr:outputText value="#{id}_lov" />
> <tr:message for="#{id}_lov"/>
> In this example the log shows that Trinidad can not find the component with id ourBeanLOV__lov. Clearly the unique part is stripped. The outputText below however does show the correct value with the id still between ourBeanLOV and LOV part.

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