]
Mikhail Vitenkov closed RF-6267.
--------------------------------
Assignee: Nick Belaevski (was: Tsikhon Kuprevich)
Verified at 3.3.1.BETA4
Columns: NPE when use rendered attribute
-----------------------------------------
Key: RF-6267
URL:
https://jira.jboss.org/jira/browse/RF-6267
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.3.0
Environment: Facelets 1.1.14;
Tomcat 6
RF 3.3.0.GA
Reporter: Andrei Markavtsov
Assignee: Nick Belaevski
Fix For: 3.3.1
Rendered attribute should be passed to appropriate created column . It should not be used
for whole columns component rendering on the page.
Code sample:
public class Bean implements Serializable{
List<String> rows = Arrays.asList(new String [] {"", "",
""});
List<Column> columns = Arrays.asList(new Column [] {new
Column("Column1", false), new Column("Column1", true)});
public List<String> getRows() {
return rows;
}
public void setRows(List<String> rows) {
this.rows = rows;
}
public List<Column> getColumns() {
return columns;
}
public void setColumns(List<Column> columns) {
this.columns = columns;
}
}
public class Column {
String name;
boolean rendered;
public Column(String name, boolean rendered) {
super();
this.name = name;
this.rendered = rendered;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
public boolean isRendered() {
return rendered;
}
public void setRendered(boolean rendered) {
this.rendered = rendered;
}
}
<rich:dataTable value="#{bean.rows}">
<rich:columns value="#{bean.columns}" var="col"
rendered="#{col.rendered}">
<h:outputText value="Text" />
</rich:columns>
</rich:dataTable>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: