Win a copy of The Career Toolkit this week in the Jobs Discussion forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

how to set and get h:selectBooleanCheckbox value in h:datatabel

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"ssjava", please check your private messages.
 
Of course, I found a very beautiful couch. Definitely. And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic