myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Belkom,Gijs G.H.C. van" <>
Subject Trinidad 2.0 TableRenderingContext nullpointer
Date Fri, 12 Mar 2010 13:14:02 GMT

At this moment I am trying to build a Proof of Concept for my graduate project using Trinidad
2.0 nested grid component. The 'normal' approach for a grid is declaring the columns in the
xhtml page but I want to do this dynamically in the backing bean. When I create a new UIXTable
and add it to the CorePanelPage, even without any column data, the internet browser inmediately
returns at startup:

        at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableRenderingContext.<init>(
        at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TableRenderer.createRenderingContext(
        at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TableRenderer.encodeAll(
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(
        at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(
        at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(

/* -----------------------------------------------------*/

My JAVA class:

package data;
import javax.el.ValueExpression;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;
import org.apache.myfaces.trinidad.component.core.layout.CorePanelPage;
import org.apache.myfaces.trinidad.component.core.output.CoreOutputText;
import org.apache.myfaces.trinidad.component.core.nav.CoreCommandButton;
import org.apache.myfaces.trinidad.component.UIXColumn;
import org.apache.myfaces.trinidad.component.UIXTable;
 * @author gvanbelkom
@ManagedBean(name = "Table")
public class Table implements Serializable
    CoreCommandButton button;
    CoreOutputText output;
    CorePanelPage panel;
    UIXColumn column;
    UIXTable table;
    /** Creates a new instance of Table */
    public Table()
    private void createDynamicObjects()
        output = new CoreOutputText();
        output.setValueExpression("value", createValueExpression("I am a Trinidad OutputField",
        button = new CoreCommandButton();
        button.setValueExpression("I am a Trinidad CommandButton", createValueExpression("test",
        table = new UIXTable();
        table.setValueExpression("value", createValueExpression("I am a Trinidad Table", String.class));
        panel = new CorePanelPage();
    public CorePanelPage getPanel()
        if (panel == null)
        return panel;
    public void setPanel(CorePanelPage panel)
        this.panel = panel;
    private ValueExpression createValueExpression(String valueExpression, Class<?> valueType)
        FacesContext facesContext = FacesContext.getCurrentInstance();
        return facesContext.getApplication().getExpressionFactory().createValueExpression(
                facesContext.getELContext(), valueExpression, valueType);

Do you have any sugestion to solve this problem?

Thanks in advance,

Gijs van Belkom

View raw message