[richfaces-issues] [JBoss JIRA] Updated: (RF-6267) Columns: NPE when use rendered attribute
Andrei Markavtsov (JIRA)
jira-events at lists.jboss.org
Tue Mar 17 09:32:28 EDT 2009
[ https://jira.jboss.org/jira/browse/RF-6267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrei Markavtsov updated RF-6267:
----------------------------------
Description:
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>
was:
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;
}
}
<rich:dataTable value="#{bean.rows}">
<rich:columns value="#{bean.columns}" var="col" rendered="#{col.rendered}">
<h:outputText value="Text" />
</rich:columns>
</rich:dataTable>
> 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: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the richfaces-issues
mailing list