You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Mathias Walter (JIRA)" <de...@myfaces.apache.org> on 2008/07/08 17:54:33 UTC
[jira] Issue Comment Edited: (TRINIDAD-1144) EL variable not set or
get correctly
[ https://issues.apache.org/jira/browse/TRINIDAD-1144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12611661#action_12611661 ]
tolot27 edited comment on TRINIDAD-1144 at 7/8/08 8:52 AM:
------------------------------------------------------------------
> Facelets just translates it to #{}
Okay, so not the reason for the problem.
> The exception is pretty clear:
Sure, it's pretty clear, but wrong!
>You are trying to access entities.Finding.getFindings() which apparently does not exist.
No! I'm trying to access entities.Sample.getFindings(), because binding is mapped to #{row[value]} = samples.findings. I'm setting the table value (=source variable) before the next nested table begins!
I did not changed the Facelets version. I only switched to Trinidad 1.2.9 and than back to 1.2.8.
BTW: 1.0.14 is very old. As I wrote above (see Environment), I'm using Facelets 1.1.14.
It works for the first nested level, but not for the second. If there is a variable conflict, why does it work at the first nested level?
There is also no way to prevent reusing the same variable with the same nested elements, if I "DRY".
was (Author: tolot27):
> Facelets just translates it to #{}
Okay, so not the reason for the problem.
> The exception is pretty clear:
Sure, it's pretty clear, but wrong!
>You are trying to access entities.Finding.getFindings() which apparently does not exist.
No! I'm trying to access entities.Sample.getFindings(), because binding is mapped to #{row[value]} = samples.findings. I'm setting the binding before the next nested table begins!
I did not changed the Facelets version. I only switched to Trinidad 1.2.9 and than back to 1.2.8.
BTW: 1.0.14 is very old. As I wrote above (see Environment), I'm using Facelets 1.1.14.
It works for the first nested level, but not for the second. If there is a variable conflict, why does it work at the first nested level?
There is also no way to prevent reusing the same variable with the same nested elements, if I "DRY".
> EL variable not set or get correctly
> ------------------------------------
>
> Key: TRINIDAD-1144
> URL: https://issues.apache.org/jira/browse/TRINIDAD-1144
> Project: MyFaces Trinidad
> Issue Type: Bug
> Components: Archetype
> Affects Versions: 1.2.9-core
> Environment: JSF RI 1.2.08b6, JBoss Seam 2.0.2.SP1, Facelets 1.1.14
> Reporter: Mathias Walter
> Priority: Blocker
> Fix For: 1.2.9-core
>
>
> I'm using a facelet component which sets a variable to the row of a tr:table (<c:set var="entity" value="#{row}" />). This variable is then used in a child table (which is also a facelet component) as source value.
> In 1.2.9 this approach does not work anymore. The entity is set to the current row of the child table and does not contain the row entity set before.
> Up to 1.2.8, all works fine. I checked the fixes for 1.2.9, but could not find a related one.
> facelet tag code snippet:
> <ui:composition>
> <c:choose>
> <c:when test="${empty value}">
> <c:set var="source" value="${backingBean.list}" />
> </c:when>
> <c:otherwise>
> <c:set var="source" value="${entity[value]}" />
> </c:otherwise>
> </c:choose>
> <c:choose>
> <c:when test="${empty eventBinding}">
> <c:set var="binding" value="${backingBean}" />
> </c:when>
> <c:otherwise>
> <c:set var="binding" value="${eventBinding}" />
> </c:otherwise>
> </c:choose>
> <tr:table value="${source}" binding="${binding.model}" var="row">
> <c:set var="entity" value="#{row}" />
> <ui:insert />
> <tr:column headerText="Actions">
> <tr:panelButtonBar>
> <tr:commandLink action="#{backingBean.edit}" text="Edit" partialSubmit="true" rendered="#{!backingBean.editMode and backingBean.visibleOnly}" immediate="true" />
> <tr:commandLink action="#{backingBean.save}" text="Save" partialSubmit="true" rendered="#{!backingBean.visibleOnly}" />
> <tr:commandLink action="#{backingBean.cancel}" text="Cancel" partialSubmit="true" rendered="#{!backingBean.visibleOnly}" immediate="true">
> <tr:resetActionListener/>
> </tr:commandLink>
> </tr:panelButtonBar>
> </tr:column>
> </tr:table>
> </ui:composition>
> xhtml code snippet:
> <i:ietable panelCaption="Samples" backingBean="#{samples}" eventBinding="#{samplesBindings}">
> <i:field label="ID" name="id" columns="6" readOnly="true"/>
> <f:facet name="detailStamp">
> <i:ietable panelCaption="Findings" value="findings" backingBean="#{findings}" eventBinding="#{findingsBindings}" parent="#{row}" nested="true">
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.