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:outputLabel 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:outputText value="Plan Group ID"></h:outputText>
</f:facet>
<h:outputText value="#{result.planGroupId}"></h:outputText>
<h:inputHidden id="planGroupList" value="#{result.planGroupId}" />
</h:column>
<h:column id="column2">
<f:facet name="header">
<h:outputText value="Plan ID"></h:outputText>
</f:facet>
<h:outputText value="#{result.planId}" converter="plantext"></h:outputText>
</h:column>
<h:column id="column3">
<f:facet name="header">
<h:outputText value="Group Description"></h:outputText>
</f:facet>
<h:outputText value="#{result.groupDesc}"></h:outputText>
</h:column>
<h:column id="column4">
<f:facet name="header">
<h:outputText value="Row Status"></h:outputText>
</f:facet>
<h:outputText value="#{result.rowStatus}"></h:outputText>
</h:column>
<h:column id="column5">
<f:facet name="header">
<h:outputText value="Modifiy"></h:outputText>
</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