Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 3.1
-
Fix Version/s: 3.2
-
Component/s: ACE-Components
-
Labels:None
-
Environment:Tomcat 7, Chrome, Firefox, IE
Description
When an EL expression is in-line (i.e. not as the value of an output component), it is not evaluated when exported, but the expression itself is exported. For example, the following markup will export the characters '#{row.id}' in the generated file, for every row:
<ace:column headerText="col1">
#{row.id}
</ace:column>
The following markup will export the value obtained after evaluating the expression (e.g. 'id001').
<ace:column headerText="col1">
<h:outputText value="#{row.id}" />
</ace:column>
The ace:dataExporter component needs to support in-line EL expressions as well.
<ace:column headerText="col1">
#{row.id}
</ace:column>
The following markup will export the value obtained after evaluating the expression (e.g. 'id001').
<ace:column headerText="col1">
<h:outputText value="#{row.id}" />
</ace:column>
The ace:dataExporter component needs to support in-line EL expressions as well.
There's nothing wrong with the table being dynamic. The problem is that the EL expression is not inside a component. The exporter needs to manually extract the value from each component inside the column, because it cannot just call encodeAll() on the column. Since, the expression is not inside a component, it gets treated as plain text. If it is placed as the value of an <h:outputText /> component, the table is exported correctly.