JBoss Community

Facing problem with jboss-faces, jsf-api and jsf-impl jars of Jboss 4.2.3GA version.

created by sagar basavaraj in JBoss Web Development - View the full discussion

Hello,

 

I am facing problem with Jboss-faces, jsf-api and jsf-impl jars that comes with
Jboss 4.2.3 GA.
[ Jboss-api:Implementation-Version: 1.2_09-b01-BETA1

 

Jboss-impl:Implementation-Version: 1.2_09-b01-BETA1
]

 

JDK_Version Used : 1.6.0_18

 

The problem is 'rendered' property not working,
boolean getters are not getting called initially on load of the page and
Ajax Rerendering is not happening.

 

The problem is not coming with JBoss 4.2.1 GA.Its working fine.
[ jboss-api:Implementation-Version: 1.2_04-b16-p02
Specification-Version: 1.2MR1


jboss-impl:Specification-Version: 1.2MR1
Implementation-Version: 1.2_04-b16-p02
]

 

I am using ajax4jsf(ReRendering) and RichFaces(Drag Support).
richfaces-version used :3.0.1
ajax4jsf-version used :1.1.1


Entire UI is built programatically.
I am pasting the part of my code:

 

UIColumn nameColumn = new UIColumn();
        nameColumn.setValueExpression("rendered", getValueExpression(ctx,
            "#{!list.selected}",Boolean.class));
        nameColumn.setId(NAME_COLUMN_ID);
        HtmlAjaxOutputPanel nameGroup = new HtmlAjaxOutputPanel();

        nameGroup.setId(NAME_COLUMN_PANEL_ID);
        nameGroup.setLayout("block");
        MethodExpression mb = getMethodExpression(ctx,"#{list.elementSelected}");
        HtmlOutputText outputName = new HtmlOutputText();
        outputName.setValueExpression("value", getValueExpression(ctx,
          "#{list." + NAME_VALUE_BINDING + "}",String.class));
        outputName.setId(NAME_COLUMN_TEXT_ID);
        outputName.setEscape(false);
        HtmlAjaxSupport aSupport = new HtmlAjaxSupport();
        aSupport.addActionListener(new MethodExpressionActionListener(mb));
        aSupport.setId("asId");
        aSupport.setEvent("onclick");
        aSupport.setReRender(NavigationTableComponent.HTML_TABLE_ID);

        nameGroup.getChildren().add(aSupport);

        nameDrag = new HtmlDragSupport();
        nameDrag.setId(NAME_COLUMN_DRAG_SUPPORT_ID);
        nameDrag.setDragType(EditorElementsConsts.TABLE_ITEM_ID);
        nameDrag.setValueExpression("dragValue", getValueExpression(ctx,"#{list}",String.class));
        HtmlDndParam dndParam = new HtmlDndParam();
        dndParam.setName("label");
        dndParam.setValueExpression("value", getValueExpression(ctx,"#{list}",String.class));
        nameDrag.getChildren().add(dndParam);
        nameGroup.getChildren().add(nameDrag);
        nameGroup.getChildren().add(outputName);
        nameColumn.getChildren().add(nameGroup);
        return nameColumn;
       
        private ValueExpression getValueExpression(FacesContext ctx,
    String name, Class objectClass)

     
         Application app = ctx.getApplication(); 
         ExpressionFactory elFactory = app.getExpressionFactory(); 
         ELContext elContext = ctx.getELContext(); 
         return  elFactory.createValueExpression(elContext, name,objectClass); 
}
 
         private MethodExpression getMethodExpression(FacesContext ctx,
    String name)
         { 
  
      Class [] argtypes = new Class[1]; 
      argtypes[0] = ActionEvent.class;
      Application app = ctx.getApplication(); 
      ExpressionFactory elFactory = app.getExpressionFactory(); 
      ELContext elContext = ctx.getELContext(); 
      return elFactory.createMethodExpression(elContext,name,null,argtypes); 
  }

Can someone help me with this problem?

 

Thanks in Advance

Reply to this message by going to Community

Start a new discussion in JBoss Web Development at Community