| Author |
how to set and get h:selectBooleanCheckbox value in h:datatabel
|
ssjava
Greenhorn
Joined: Sep 26, 2007
Posts: 7
|
|
hello friends, Please help me any one...i need urgent......................... My jsf page: ------------ <h:panelGroup> <h:panelGrid columns="6"> <h:dataTable border="2" value="#{planGroup.screenFlowValues}" var="result" bgcolor="#F1F1F1" cellpadding="2" cellspacing="1"> <h:column id="col1"> <f:facet name="header"> <h utputLabel id="lblchange" value="Select" /> </f:facet> <h:selectBooleanCheckbox id="chkid" value="#{planGroup.chkValue}"> </h:selectBooleanCheckbox> </h:column> <h:column id="column1"> <f:facet name="header"> <h utputText value="Plan Group ID"></h utputText> </f:facet> <h utputText value="#{result.planGroupId}"></h utputText> <h:inputHidden id="planGroupList" value="#{result.planGroupId}" /> </h:column> <h:column id="column2"> <f:facet name="header"> <h utputText value="Plan ID"></h utputText> </f:facet> <h utputText value="#{result.planId}" converter="plantext"></h utputText> </h:column> <h:column id="column3"> <f:facet name="header"> <h utputText value="Group Description"></h utputText> </f:facet> <h utputText value="#{result.groupDesc}"></h utputText> </h:column> <h:column id="column4"> <f:facet name="header"> <h utputText value="Row Status"></h utputText> </f:facet> <h utputText value="#{result.rowStatus}"></h utputText> </h:column> <h:column id="column5"> <f:facet name="header"> <h utputText value="Modifiy"></h utputText> </f:facet> <h:commandLink id="link1" value="Edit" action="#{planGroup.ModifiyMemberrecord}" immediate="true"/> </h:column> </h:dataTable> </h:panelGrid> </h:panelGroup> Here in this jsf page....... 1.value="#{planGroup.screenFlowValues}"--is Datamodel 2.For me page is displaying.How to set value to the check box and multiple selection of checkbox..when i click delete button , i have to delete selected rows from datamodel.how to do that what are all the changes i have to.Because boolean checkbox return only true false value. 3.by using h:datatabel i can do that ya.. My bean: -------- public class PlanGroupBean { private String planGroupID; private String planID; private String groupDesc; private String rowStatus; private static Log log = LogFactory.getLog(PlanGroup.class); private static DataModel screenFlowValues; private String hideWindows; private String hiddenValue; private boolean chkValue; public List getProdlis() { return prodlis; } public void setProdlis(List prodlis) { this.prodlis = prodlis; } public List getData() { return data; } public void setData(List data) { this.data = data; } public boolean isChkValue() { //System.out.println("CHECKED--CHK-value:"+chkValue); return chkValue; } public void setChkValue(boolean chkValue) { this.chkValue = chkValue; } public void setPlanGroupID(String planGroupID) { this.planGroupID = planGroupID; } public String getPlanGroupID() { return this.planGroupID; } public void setPlanID(String planID) { this.planID = planID; } public String getPlanID() { return this.planID; } public void setGroupDesc(String groupDesc) { this.groupDesc = groupDesc; } public String getGroupDesc() { return this.groupDesc; } public void setRowStatus(String rowStatus) { this.rowStatus = rowStatus; } public String getRowStatus() { return this.rowStatus; } public String getHiddenValue() { screenFlowValues = new ListDataModel(ServiceDao.execute().fetchPlanGroupDisp()); return hiddenValue; } public void setHiddenValue(String hiddenValue) { this.hiddenValue = hiddenValue; } public void setHideWindows(String hideWindows) { this.hideWindows = hideWindows; } public String getHideWindows() { return this.hideWindows; } public DataModel getScreenFlowValues() { return screenFlowValues; } public void setScreenFlowValues(DataModel screenFlowValues) { PlanGroupBean.screenFlowValues = screenFlowValues; } public String deleteMemberrecord() { } ................................................... please help me how to set value to the check box and while clicking delete button i have to know what are all the checkbox selected.......... regards, siva
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
"ssjava", please check your private messages.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
 |
|
|
subject: how to set and get h:selectBooleanCheckbox value in h:datatabel
|
|
|