| Author |
UIParameter issue in HtmlDataTable
|
vinod perla
Greenhorn
Joined: Jan 06, 2005
Posts: 16
|
|
Hello All , I have a HtmlDataTable which has a HtmlCommandLink as one Column . I have issue with setting UIParameter for a HtmlCommandLink. I am generating all the components programatically(Dynamic components). I need to set UIParameter value as the value of the row of a Datatable. I have only 2 columns . One column is the toString method of the object . and the other column is the commandLink 'edit' . I need to set the UIParameter of the commandLink as the toString() of the adding object . In other words the value displayed in column 1. I have done the following code: HtmlDataTable htmlDataTable = new HtmlDataTable(); htmlDataTable.setId("datatable"); htmlDataTable.getChildren().clear(); htmlDataTable.setVar("dynamicItem"); ValueBinding bindingTable = this.application .createValueBinding("#{sessionScope.objName}");\ htmlDataTable.setValueBinding("value", bindingTable); UIColumn column = new UIColumn(); HtmlOutputText htmlOutputText = new HtmlOutputText(); htmlOutputText.setValue(getSubString(sessionPath)); htmlOutputText.setId("datatableSSS"); column.setHeader(htmlOutputText); HtmlOutputText collobjects = new HtmlOutputText(); ValueBinding bindingCol = this.application .createValueBinding("#{dynamicItem}"); collobjects.setValueBinding("value", bindingCol); column.getChildren().add(collobjects); htmlDataTable.getChildren().add(column); UIColumn editColumn = new UIColumn(); HtmlOutputText editButton = new HtmlOutputText(); editButton.setValue("Edit"); editButton.setId("datatableDDDD" ); editColumn.setHeader(editButton); HtmlCommandLink editBtn = new HtmlCommandLink(); editBtn.setValue("Edit "); editBtn.setId("edit" + stackPath + componentIndex++); MethodBinding editButtonBinding = application .createMethodBinding( "#{pc_DynamicUIGeneration.doEditAction}", null); editBtn.setAction(editButtonBinding); UIParameter parameter = new UIParameter(); parameter.setValueBinding("test",this.application .createValueBinding("#{dynamicItem}"); editBtn.getChildren().add(parameter); editColumn.getChildren().add(editBtn); htmlDataTable.getChildren().add(editColumn); The problem I am facing is at : ======================================= UIParameter parameter = new UIParameter(); parameter.setValueBinding("test",this.application .createValueBinding("#{dynamicItem}"); ======================================= I am getting exception as : ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: /pages/DynamicUIGeneration.jsp. Exception thrown : javax.servlet.ServletException: Argument Error: One or more parameters are null. Can some one help me in getting this solved please. Thanks in advance . Regards, Suresh
|
 |
vinod perla
Greenhorn
Joined: Jan 06, 2005
Posts: 16
|
|
Hi, I want the java code for the following tags . This is just for clear understanding of my requirement. Any help would be great favor for me...... <hx:dataTableEx border="1" cellpadding="2" cellspacing="0" columnClasses="columnClass1" headerClass="headerClass" footerClass="footerClass" rowClasses="rowClass1, rowClass2" id="tableEx1" styleClass="dataTableEx" value="#{sessionScope.SESSION_COMM_ADD_LIST}" var="varSESSION_COMM_ADDRESS" rendered="#{! empty pc_CommAddress.addressList}"> <hx:columnEx id="column3"> <f:facet name="header"> <h utputText id="text4" styleClass="outputText" value="H No"></h utputText> </f:facet> <h utputText id="text5" styleClass="outputText" value="#{varSESSION_COMM_ADDRESS}"></h utputText> </hx:columnEx> <hx:columnEx id="column4"> <f:facet name="header"> </f:facet> <h:commandLink id="link2" styleClass="requestLink" action="#{pc_CommAddress.doNameDeleteButtonAction}"> <f:param name="nameID" value="#{varSESSION_COMM_ADDRESS}"></f:param> <h utputText id="text55" styleClass="outputText" value="Delete"></h utputText> </h:commandLink> </hx:columnEx> </hx:dataTableEx>
|
 |
 |
|
|
subject: UIParameter issue in HtmlDataTable
|
|
|