SelectBooleanCheckbox problem

Hi all,
When I use selectBooleanCheckbox I couldn't execute the valueChangeListener method in backed bean.
configuration of selectBooleanCheckbox such as...
valueChangeListener : #{pc_Sy_altsistemListele.handleEditBoxValueChange}
immediate : true
onchange : submit
JSF Source for selectBooleanCheckbox :
<h:selectBooleanCheckbox styleClass="selectBooleanCheckbox" id="editBox" value="#{item[3] == 1}" onchange="submit()" valueChangeListener="#{pc_Sy_altsistemListele.handleEditBoxValueChange}" immediate="true">
in backed bean handleEditBoxValueChange method is
     public void handleEditBoxValueChange(ValueChangeEvent event) {
          System.out.println("-------------: " + event.getNewValue());
          String unitCodeStr = this.getUnitListMenu().getValue().toString();
          System.out.println("simdiki unitcode : " + unitCodeStr);
          this.setUnitItems(unitCodeStr);
          FacesContext.getCurrentInstance( ).renderResponse();          
But when I click the check box this change listener method does not work; no system.out.println
output is flushed.
So what is the problem about why event listener method is not executed? I guess there is no error in this component, validation phase is passed by immediate = true option.
thanks all!
--bortecan

try to change
onchange="submit()"with
onchange="this.form.submit()"Nicola

Similar Messages

  • Jdev 11.1.1.2.0 SelectBooleanCheckbox problem

    Hi,
    We migrate to 11.1.1.2.0 and I'm facing the following problem:
    I have a selectBoolenCheckBox in a table based on a boolean attribute of a view object. whenever a users checks it , it's value becomes null!
    any idea?
    Tilemahos

    So I assume that either I'm the only one that uses checkboxes at tables
    or the only one that has problems but you are too busy to answer.
    I'm writing the case again,
    1. I have a read only view object with a boolean updatable transient attribute
    2. I have a table component based on that view object with a column bound to that attribute
    3. when the check box is checked a null value is set at the view object's attribue
    notes
    it was working before (still works when I run the previous version of jdev)
    I made a lot of test creating new attributes at other VO having the same result
    view object xml:
    <ViewAttribute
    Name="selectedTrades"
    IsSelected="false"
    IsPersistent="false"
    PrecisionRule="true"
    Type="java.lang.Boolean"
    ColumnType="NUMBER"
    AliasName="VIEW_ATTR"
    SQLType="BIT">
    <Properties>
    <SchemaBasedProperties>
    <LABEL
    ResId="gr.helex.it.marketsystems.marketoffice.datamodel.TransferSettle.transfVouch.selectedTrades_LABEL"/>
    <CONTROLTYPE
    Value="check_box"/>
    </SchemaBasedProperties>
    </Properties>
    </ViewAttribute>
    jspx page:
    <af:table value="#{bindings.transfVouch1.collectionModel}" var="row"
    rows="#{bindings.transfVouch1.rangeSize}"
    emptyText="#{bindings.transfVouch1.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.transfVouch1.rangeSize}"
    rowBandingInterval="0"
    selectedRowKeys="#{bindings.transfVouch1.collectionModel.selectedRow}"
    selectionListener="#{bindings.transfVouch1.collectionModel.makeCurrent}"
    rowSelection="single" id="t2" width="1000"
    binding="#{backTransferSettle.voucherTable}">
    <af:column sortProperty="selected" sortable="false"
    headerText="#{bindings.transfVouch1.hints.selected.label}"
    id="c11" width="58" frozen="true">
    <af:selectBooleanCheckbox value="#{row.bindings.selected.inputValue}"
    label="#{row.bindings.selected.label}"
    shortDesc="#{bindings.transfVouch1.hints.selected.tooltip}"
    id="sbc1" autoSubmit="true"
    />
    </af:column>
    </af:table>
    any ideas, does it works ok on your projects?
    by the way when I start jdev 11.1.1.2.0 it didn't run any migration on my project it isnt necessary for 11.1.1.1 to 11.1.1.2 transition?
    Tilemahos

  • Problem with SelectBooleanCheckbox

    I'm a beginner with JSF. Trying to get a form working that uses checkboxes (among other things). I have the following column entry in an jspDataTable:
    <h:form>
    <h:dataTable value="#{fnc.objVector}" var="fnc" first="#{fnc.startIndex}" rows="2">
    <f:facet name="header">
    <h:outputText value="#{fnc.fileRange}" />
    </f:facet>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Check In"/>
    </f:facet>
    <h:selectBooleanCheckbox value="#{fnc.bSelectCheckIn}"
    valueChangeListener="#{fnc.selectCheckInBoxChanged}"
    disabled="#{fnc.checkedIn}" />
    </h:column>
    etc. etc. etc.
    The form comes up just fine and the checkbox looks ok. If I click the checkbox, the little checkmark shows on the screen. When I submit the form, the listener routine gets called, and tells me the value of the box is 'true'. So it looks like it is working. But then the web browser gives me the following page:
    ============
    XML Parsing Error: not well-formed
    Location: http://localhost:8084/NCAT/protected/doc_select.faces
    Line Number 40, Column 61:<td><input type="checkbox" name="_id8:_id9:0:_id13" checked disabled="disabled" /></td>
    ------------------------------------------------------------^
    The ^ is under the first 'd' in 'disabled="disabled"' in case this doesn't format properly. Is the problem the string 'disabled="disabled" (which is wrong - the checkbox is NOT disabled) or the 'checked' attribute - which is correct, because I've just put a checkmark in the box....
    If the property fnc.checkedIn comes back true, the checkbox actually does get disabled, and I am not able to change its value, which is good. The problem occurs when the checkbox is not disabled initially, and I try to check it and then submit the form...
    I'm not quite sure where to be looking for the problem. Any help would be appreciated...
    Thanks very much,
    nbc

    It looks like Netbeans is using JSF 1.1 - that is what the libraries indicate. I copied the JSF 1.2 file onto my machine and replaced the 2 jar files jsf-api.jar and jsf-impl.jar in the Netbeans directory .../enterprise3/modules/ext. This directory also has commons-beanutils.jar, commons-collections.jar, commons-digester.jar and commons-logging.jar - I did not replace those. When I rebuild my application and try to run it, Tomcat fails to start - so I obviously have not updated JSF correctly.
    It would be great if you can point me in the right direction here - I'm just about at the limits of my knowledge on Netbeans and well past it on JSF... And I do need to get those checkboxes working...
    Thanks in advance,
    nbc

  • Problem in  set and get values in h:selectBooleanCheckbox with h:datatabel

    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

    Attach the boolean property to the row object. If it is true, then the row object was selected. You can also attach it to a Map<RowObjectId, Boolean> and then delete rows by RowObjectId which are true. You may find this article useful, it contains code examples: [http://balusc.blogspot.com/2006/06/using-datatables.html#SelectMultipleRows].

  • SelectBooleanCheckbox and component instance backing bean problem

    Hi
    I have a selectBooleanCheckbox with the binding property pointing to a CoreSelectBooleanCheckbox but if the user changes the checkbox value CoreSelectBooleanCheckbox remains unchanged.
    Any idea ?

    try this:
    private CoreCommandButton cmd;
    private CoreSelectBooleanCheckbox chb;
    private boolean boo = false;
    public String cmd_action() {
    // Add event code here...
    if (getChb().isSelected() == true) {
    setBoo(false);
    } else {
    setBoo(true);
    return null;
    in the page:
    <af:selectBooleanCheckbox text="selectBooleanCheckbox 1"
    label="Label 1" binding="#{prub.chb}"
    partialTriggers="cmd" value="#{prub.boo}"/>
    <af:commandButton text="commandButton 1" binding="#{prub.cmd}"
    id="cmd" action="#{prub.cmd_action}"/>
    is it???

  • Problems with checkbox (selectBooleanCheckBox) within a table

    Hi,
    I have a table that is built dynamically and has a link and a selectBooleanCheckbox in every row. (the table has a value binding to a backing bean).
    In a certain condition (which i check in the backing bean of the page) i need to set some of the row's checkboxes to "checked", but for some reason i do not manage to do that.
    i've tried getting the table, iterate over all of the rows, and set the desired row's checkboxes to "true". but - it does not render the check box as "checked"....
    what is the best practice to accomplish this?
    Thanks,
    Dror
    Message was edited by:
    friedman30

    Hi Frank..
    Thanks foy you help... my button have a immediate= true... and in the action have PiPR in the table but when te table is refresh the fields marked with a red color and mark how required.
    the propertie required is dependent of a value of boolean checkbox..
    When i change the value of checkbox to true.. the propertie required of the field is changes succesfully... but when change the checkbox value to false. the propertie is not changed to false and the field is set to required.
    Thanks

  • ADF FACES: af:selectBooleanCheckbox with simple="true" problems

    I have an af:selectBooleanCheckbox tied to a simple boolean model value. It has a partialTrigger set for another field and its simple property is set "true." In this configuration, a change in the field identified by the partialTrigger does NOT cause the checkbox to re-render. From debug messages, I can see that the value is being properly fetched from the model, but the rendered state is not changing (meaning when the underlying boolean value changes, the checkbox state is not changing).
    Here are the two controls in question (note in this example the value of the caller.nonMember boolean is simply a test of caller.memberId == null):
    <af:selectBooleanCheckbox text="Non-member" simple="true" value="#{pageFlowScope.newCase.caller.nonMember}" partialTriggers="callermemberid"/>
    <af:inputText label="FHM Member Id:" value="#{pageFlowScope.newCase.caller.memberId}" columns="10" binding="#{newReferralCase.compCallerMemberId}" id="callermemberid" autoSubmit="true"/>
    If I change "simple" to "false," then the check box properly re-renders on each change in the member id field.
    Is this expected behavior when simple=true? I didn't expect a behavior change based on the documentation which just states that the message and label sub-components will not be used.
    Thanks.

    It's not expected behavior, and I can reproduce it. I've filed a bug; thanks for the report.

  • I have a Problem in selectBooleanCheckbox in ADF Form

    I have been reading the post from Steve Muench regarding selectBooleanCheckbox in a table.
    11gR1 Example: selectBooleanCheckbox in a Table example #145 ,
    in same example when I created ADF Form and and use selectBooleanCheckbox
    I get no Corrcet data although I'm using the same steps in the example
    in the case of a Table I get correct data but in case of ADF Form I get no correct data.
    Note : I'm Using JDev 11.1.1.2.0
    regards
    Forakora

    ok Mr. Timo
    Code JSF Page (JPSX)
    <af:selectBooleanCheckbox value="#{bindings.Flag.inputValue}"
    label="#{bindings.Flag.label}"
    shortDesc="#{bindings.Flag.hints.tooltip}"
    id="sbc2"/>
    Code Page Definition (XML)
    <button IterBinding="DeptWithFlagView1Iterator" id="Flag"
    DTSupportsMRU="false" StaticList="true">
    <AttrNames>
    <Item Value="Flag"/>
    </AttrNames>
    <ValueList>
    <Item Value="Y"/>
    <Item Value="N"/>
    </ValueList>
    </button>
    can anybody help me?
    Regards

  • Problems with selectbooleancheckbox

    I have it like this
    <af:selectBooleanCheckbox id="checkbox1" value="#{row.selectedtextboxboolean}" selected="#{row.selectedtextboxboolean}" />
    its inside a table...
    however, consider its false at begining..then user click checkbox..so its true..and clicks on insert button..
    i read in my java file object.getselectedtextboxboolean ...and guess what? its not true..its still false...
    this is unlike textboxes...
    which the bean would be the new string

    Hi,
    I don't know what your insert button does if it is pointing to vo's create or createInsert operation, it creates new record as you said the default value is false the selectedtextboxboolean's value will be false.
    Can you try adding autoSubmit property to true on selectBooleanCheckbox and print the value you are getting in setter method by adding sop and then see just by checking the checkbox if it is printing the correct value or not(without clicking on Insert button).
    Sireesha

  • Problem with inputText in my custom component

    Hi, I have a custom dataTable component that I'm trying to get to work. It has to be a custom component because dataTable doesn't support rowspan, colspan, multi line headers, and a rendered attribute for rows. The problem is, that when I wrap the column tag inside my row tag then the method for the inputText tag never gets called in the UPDATE_MODEL_VALUES phase.
    I'm starting to think that JSF doesn't support 2 levels of tags between the inputText and dataTable. I'm hoping that someone can tell me what I have wrong with my components.
    Here is the JSP snippet.
    <cjsf:rptTable>
         <cjsf:data id="dataTable1" value="#{allAuthUser.tableRows}" var="myTableRow1">
              <cjsf:row>
                   <cjsf:col>
                        <h:inputText id="tableTestFld" value="#{myTableRow1.testFld}" size="5" maxlength="5"/>
                   </cjsf:col>
              </cjsf:row>
         </cjsf:data>
    </cjsf:rptTable>Here is what it renders. It looks to me like everything renders fine. So I'm guessing that there is something in a component that is causing JSF during the life cycle to not be able to process correctly.
    <table>
         <tbody>
              <tr>
                   <td><input id="tblmaintForm:body:dataTable1_0:tableTestFld" name="tblmaintForm:body:dataTable1_0:tableTestFld" type="text" value="" maxlength="5" size="5"/></td>
              </tr>
              <tr>
                   <td><input id="tblmaintForm:body:dataTable1_1:tableTestFld" name="tblmaintForm:body:dataTable1_1:tableTestFld" type="text" value="" maxlength="5" size="5"/></td>
              </tr>
              <tr>
                   <td><input id="tblmaintForm:body:dataTable1_2:tableTestFld" name="tblmaintForm:body:dataTable1_2:tableTestFld" type="text" value="" maxlength="5" size="5"/></td>
              </tr>
         </tbody>
    </table>Note: If I leave off the row tag it renders the same way except of course the <tr> and </tr> tags are missing. If I do this, then the backing method for the inputText tag is called and everything works fine. Why doesn't it work with the row tag in place?
    Here are the components:
    public class UIRptTable extends UIComponentBase {
         public UIRptTable() {
              setRendererType("tblmaint.rptTableRenderer");
         public String getFamily() {
              return "javax.faces.Output";
    public class UIRptTableData extends HtmlDataTable {
         public UIRptTableData() {
              setRendererType("tblmaint.rptTableDataRenderer");
         public String getFamily() {
              return "javax.faces.Data";
    public class UIRptTableRow extends UIOutput {
         public UIRptTableRow() {
              setRendererType("tblmaint.rptTableRowRenderer");
         public String getFamily() {
              return "javax.faces.Output";
    public class UIRptTableCol extends UIColumn {
         public UIRptTableCol() {
              setRendererType("tblmaint.rptTableColRenderer");
         public String getFamily() {
              return "javax.faces.Column";
    }Here is part of the faces-config file in case you need it.
    <!-- Components -->
    <component>
         <component-type>tblmaint.rptTable</component-type>
         <component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTable</component-class>
    </component>
    <component>
         <component-type>tblmaint.rptTableData</component-type>
         <component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableData</component-class>
    </component>
    <component>
         <component-type>tblmaint.rptTableRow</component-type>
         <component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableRow</component-class>
    </component>
    <component>
         <component-type>tblmaint.rptTableCol</component-type>
         <component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableCol</component-class>
    </component>
    <!-- Render Kits -->
    <render-kit>
         <renderer>
              <component-family>javax.faces.Output</component-family>
              <renderer-type>tblmaint.rptTableRenderer</renderer-type>
              <renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableRenderer</renderer-class>
         </renderer>
    </render-kit>
    <render-kit>
         <renderer>
              <component-family>javax.faces.Data</component-family>
              <renderer-type>tblmaint.rptTableDataRenderer</renderer-type>
              <renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableDataRenderer</renderer-class>
         </renderer>
    </render-kit>
    <render-kit>
         <renderer>
              <component-family>javax.faces.Output</component-family>
              <renderer-type>tblmaint.rptTableRowRenderer</renderer-type>
              <renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableRowRenderer</renderer-class>
         </renderer>
    </render-kit>
    <render-kit>
         <renderer>
              <component-family>javax.faces.Column</component-family>
              <renderer-type>tblmaint.rptTableColRenderer</renderer-type>
              <renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableColRenderer</renderer-class>
         </renderer>
    </render-kit>I sure hope that someone can help me out. Please let me know if you need any additional information.
    Thanks,
    Ray

    Hi, Ray!
    1) I was trying to put a button in the column header (for sorting) and I couldn't get that to work. That involved the >colhdr tag. I got that to work but I don't remember the fix. I'll look it up and reply back with that when I can.Dealing the first part of your trouble, you need NOT a custom component.
    I have looked through the implementation of RepeaterRenderer, as you advised me, and found that the multi-header possibility is included in the implementation of dataTable control.
    The code below is the part of source of repeater.jsp with only change:
    <d:data_repeater> &#61664; <h:dataTable>
    And it works fine.
    <h:dataTable id="table"
    binding="#{RepeaterBean.data}"
         rows="5"
    value="#{RepeaterBean.customers}"
    var="customer">
    <f:facet name="header">
    <h:outputText value="Customer List"/>               <!� First Header row -- >
    </f:facet>
    <h:column>
    <%-- Visible checkbox for selection --%>
    <h:selectBooleanCheckbox
    id="checked"
    binding="#{RepeaterBean.checked}"/>
    <%-- Invisible checkbox for "created" flag --%>
    <h:selectBooleanCheckbox
    id="created"
    binding="#{RepeaterBean.created}"
    rendered="false"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Account Id"/>               <!�Second Header row -- >
    </f:facet>
    <h:inputText id="accountId"
    binding="#{RepeaterBean.accountId}"
    required="true"
    size="6"
    value="#{customer.accountId}">
    </h:inputText>
    <h:message for="accountId"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Customer Name"/>               <!�Second Header row -- >
    </f:facet>
    <h:inputText id="name"
    required="true"
    size="50"
    value="#{customer.name}">
    </h:inputText>
    <h:message for="name"/>
    </h:column>
    <h:column>
    <f:facet name="header">                    <!�Second Header row -- >
    <h:outputText value="Symbol"/>
    </f:facet>
    <h:inputText id="symbol"
    required="true"
    size="6"
    value="#{customer.symbol}">
    <f:validateLength
    maximum="6"
    minimum="2"/>
    </h:inputText>
    <h:message for="symbol"/>
    </h:column>
    <h:column>
    <f:facet name="header">                    <!�Second Header row -- >
    <h:outputText value="Total Sales"/>
    </f:facet>
    <h:outputText id="totalSales"
    value="#{customer.totalSales}">
    <f:convertNumber
    type="currency"/>
    </h:outputText>
    </h:column>
    <h:column>
    <f:facet name="header">                    <!�Second Header row -- >
    <h:outputText value="Commands"/>
    </f:facet>
    <h:commandButton id="press"
    action="#{RepeaterBean.press}"
    immediate="true"
    value="#{RepeaterBean.pressLabel}"
    type="SUBMIT"/>
    <h:commandLink id="click"
    action="#{RepeaterBean.click}"
    immediate="true">
    <h:outputText
    value="Click"/>
    </h:commandLink>
    </h:column>
    </h:dataTable>
    You may have a look at HTML source to prove that dataTable is already what you need:
    <table id="myform:table">
    <thead>
    <tr><th colspan="6" scope="colgroup">Customer List</th></tr>
    <tr>
    <th scope="col"></th>
    <th scope="col">Account Id</th>
    <th scope="col">Customer Name</th>
    <th scope="col">Symbol</th>
    <th scope="col">Total Sales</th>
    <th scope="col">Commands</th>
    </tr>
    </thead>
    <tbody>
    2.) The second trouble is still unsettled as previously. Right now I have different task at my job, and I can�t continue investigation of this problem.
    But when you find smth., please let me know. I�ll be very grateful.
    Regards,
    Oleksa Stelmakh

  • Problem with binding in h:dataTable

    Hi
    I have a problem with h:dataTable, where the table rows are bound to objects (Bean$Line) nested within a backing bean (Bean).
    JSP:
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <html>
      <f:view>
        <head>
          <link href="styles.css" rel="stylesheet" type="text/css"/>
          <title>Sandbox</title>
        </head>
        <body>
          <h:form>
            <h:dataTable value="#{bean.lines}" var="line">
              <h:column>
                <h:outputText value="#{line.id}"/>
              </h:column>
              <h:column>
                <!-- using value = line.lineSelected here works (assuming boolean property Line.lineSelected) --/>
                <h:selectBooleanCheckbox binding="#{line.lineSelected}"/>
              </h:column>
            </h:dataTable>
          </h:form>
        </body>
      </f:view>
    </html>Bean:
    package com.test;
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.component.UISelectBoolean;
    public final class Bean {
      private final List<Line> lines;
      public Bean() {
        lines = new ArrayList<Line>();
        lines.add(new Line("one"));
        lines.add(new Line("two"));
        lines.add(new Line("three"));
      public List<Line> getLines() {
        return lines;
       * Nested class in order to access containing class
       * properties etc.
      public static class Line {
        //private boolean lineSelected = false;
        private UISelectBoolean lineSelected;
        private String id;
        public Line(String id) {
          this.id = id;
        /*public boolean isLineSelected() {
          return lineSelected;
        public void setLineSelected(boolean lineSelected) {
          this.lineSelected = lineSelected;
        public UISelectBoolean getLineSelected() {
          return lineSelected;
        public void setLineSelected(UISelectBoolean lineSelected) {
          this.lineSelected = lineSelected;
        public String getId() {
          return id;
        public void setId(String id) {
          this.id = id;
      } // Line
    }The setup works when I use value="#{line.lineSelected}" (assuming the property is defined as boolean in Bean$Line) but as soon as I use a binding, I get the following exception:
    com.sun.rave.web.ui.appbase.ApplicationException: javax.servlet.ServletException: javax.el.PropertyNotFoundException: Target Unreachable, identifier 'line' resolved to null
    at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:594)
    at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:325)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
    faces_config:
    <faces-config version="1.2"
                  xmlns="http://java.sun.com/xml/ns/javaee"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
      <application>
        <locale-config>
          <default-locale>en_GB</default-locale>
          <supported-locale>en_GB</supported-locale>     
        </locale-config>
      </application>
      <managed-bean>
        <managed-bean-name>bean</managed-bean-name>
        <managed-bean-class>com.test.Bean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>
    </faces-config>What am I missing here?
    Help much appreciated
    Lance

    Guys
    Thanks a lot, both of your replies are immensely instructive. Maybe a little background on what I'm trying to do. In the table, I have header rows with dependent line rows. When a check box is ticked in the header, I want the corresponding check boxes in the dependent lines to be checked automatically (in slave fashion and ideally without using JavaScript). My idea was to update the bound components (for the lines) from within the Bean (in response to change on the header). However, given there's only a single component for each column in the table, this of course doesn't make sense.
    I'm trying to get to the typical MVC workflow of a) user updates a View component, b) Controller detects the change and updates the Model, c) The Model fires a property change event, which the View detects and updates appropriately. What's the way to achieve this in JSF (by design)?
    Here's a simple fragment (which does not work):
            <h:dataTable value="#{bean.lines}" var="line">
              <h:column>
                <h:outputText value="#{line.id}"/>
              </h:column>
              <h:column>
                <!-- (1) This is the master and (2) should refresh on update here --/>
                <h:selectBooleanCheckbox onchange="submit()" value="#{line.lineSelected}"/>
              </h:column>
              <h:column>
                <!-- (2) This is the slave and I want this to update in response to a change of (1) above --/>
                <h:selectBooleanCheckbox value="#{line.slaveSelected}"/>
              </h:column>
            </h:dataTable>In the setter method for lineSelected, I'm setting slaveSelected to the new value but the View is not refreshing based on this. How do I get the View to update (each dependent line) based on the new values for slaveSelected?
    Thanks again
    Lance

  • Problem with checkbox and Event.stop(event)

    Hello,
    I cannot change the checkbox in a row, if the Event.stop(event) is fired on checkbox. My aim is, that the event OnRowClick is stoped, if I change the checkbox in the row.
    <rich:extendedDataTable id="requestTable" value="#{requestListHandler.normalisedRawRequestList}" var="req"
                             rows="#{requestListHandler.limitRows}" selectionMode="single">
                             <a4j:support event="onRowClick" action="#{requestListHandler.viewRequest}">
                                  <f:setPropertyActionListener value="#{req}"
                                       target="#{requestHandler.selectedRequest}" />
                                  </a4j:support>
                            <rich:column>
                                       <h:outputText value="#{req.offerListSize}">
                                            <f:convertNumber type="number" />
                                       </h:outputText>
                         </rich:column>
                             <rich:column id="checkBoxColumns">
                                       <h:selectBooleanCheckbox onclick="Event.stop(event);"
                                            value="#{req.firstInterpreterTimeChecked}"/>
                         </rich:column>
    </rich:extendedDataTable>I know I am using richfaces, but I have problem with sun-ri component <h:selectBooleanCheckbox..../>.
    Have you any idea?
    Manu
    Edited by: Argonist on Jun 16, 2009 8:27 AM
    Edited by: Argonist on Jun 16, 2009 12:25 PM

    I had the same problem. I read you post and was so disappointed that no one had answered you. But I have a good news for you :) My team leader managed to solve this awkward problem.Add to h:selectBooleanCheckbox style="z-index: 20;" so that it is "above" the table row that fires its own onclick event.

  • Problem with Checkbox that disables/enables other components.

    Hi
    As I show in the title, I have problems with a checkbox that enables/disables another components (three exactly).
    I have done the follow:
    1.- Set property "AutoSubmit" true in the SelectOneChoice
    2.- Set "Disabled" property true or false depending if the SelectOneChoice is selected or not
    (#...selectBooleanCheckbox.value?false:true})
    3.- Set the Partial triggers to the SelectOneChoice in the three components.
    CASE 1: The SelectOneChoice is unmarked. The three components appears disabled and when I mark the SelectOneChoice, this components appears enabled. The thing works ;)
    CASE 2: The SelectOneChoice is marked. The three components appears enabled and when I unmark the SelectOneChoice, the components continue enabled. They don't disable until I press the submit button.
    how can i make that the components appears disabled when i unmark the checkbox?
    i try with de ChangeValueListener, but it only works where the SelectOneChoice changes from unmarked to marked.
    thanks!

    I think the problem is, when the value is null the checkbox return with the selected state, b'coz u r
    returning the checkbox (as it is). so pl'z try with below code (ADDED).
    public Component getTableCellRendererComponent(JTable table, Object value,
    boolean isSelected, boolean hasFocus,
    int row, int column){
    if(value != null){
    Boolean booleanValue = (Boolean)value;
    setSelected(booleanValue.booleanValue());
    else /// ADDED
    setSelected(false);/// ADDED
    return this;
    Nediaph.

  • How to use h:selectBooleanCheckbox in a datatable to select multiple rows

    One way here is set a Boolean property like "isSelected" in the javaBean, and binding it with EL in jsp page which like this:
    *<h:selectBooleanCheckbox value="#{var.isSelected}"/>*
    but this break the a well EntityBean construction cause there is a null-meaning property in this bean just for getting data easily. So, if there is any other solutions for this? i use to think use EL like this:
    *<h:selectBooleanCheckbox value="#{backBean.isSelected}">*
    which bind the value to a Boolean type in the backBean ? but the problem here is there is only one boolean, how can it represent all those rows selected?
    the second way is to get the whole view tree from FacesContext, and find all the checkbox component with findComponent() method,but i don't know how connect this to the rows in datatable,which means how to get a object from the checkbox componentID?
    thanks,sorry for my english.

    Here is a copy:
    JSF<h:form>
        <h:dataTable value="#{myBean.dataList}" var="dataItem">
            <h:column>
                <f:facet name="header">
                    <h:outputText value="Select" />
                </f:facet>
                <h:selectBooleanCheckbox value="#{myBean.selectedIds[dataItem.id]}" />
            </h:column>
        </h:dataTable>
        <h:commandButton value="Get selected items" action="#{myBean.getSelectedItems}" />
    </h:form>MyBeanpackage mypackage;
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Map;
    public class MyBean {
        // Init --------------------------------------------------------------------------------------
        private Map<Long, Boolean> selectedIds = new HashMap<Long, Boolean>();
        private List<MyData> selectedDataList;
        // Actions -----------------------------------------------------------------------------------
        public String getSelectedItems() {
            // Get selected items.
            selectedDataList = new ArrayList<MyData>();
            for (MyData dataItem : dataList) {
                if (selectedIds.get(dataItem.getId()).booleanValue()) {
                    selectedDataList.add(dataItem);
                    selectedIds.remove(dataItem.getId()); // Reset.
            // Do your thing with the MyData items in List selectedDataList.
            return "selected"; // Navigation case.
        // Getters -----------------------------------------------------------------------------------
        public Map<Long, Boolean> getSelectedIds() {
            return selectedIds;
        public List<MyData> getSelectedDataList() {
            return selectedDataList;
    }Where each MyData item (dataItem) has an unique 'id' property.

  • Clicking on a t:selectBooleanCheckBox gives exception

    hi ,
    I need some help with the jsf h:selectBooleanCheckBox. My scenario is i have a link in my t:dataTable header . so whenever i click on that link a popup shows up with a list of checkboxes . whenever i click on any of those checkboxes in the popup and click submit button the user should be navigated to the main page generating a new column for that checkbox value. I get a null pointer exception when i click on those checkboxes and hit submit. This is how i am implementing the logic. This logic works for me when the checkboxes and on the jsp instead of a popup. Please help.
    code in my jsp
    <h:outputLink styleClass="tips" value="#AGselectPopup" rel="#AGselectPopup" title="Select Access Groups For This View"><t:outputText value="Access Groups..." />
    My popup div
    <h2 class="accessibility">Show only: Access Groups</h2>
    <div class="noDisplay" id="AGselectPopup">
              <h:form styleClass="radioCheckGroup" >     
               <h:panelGroup>
                            <fieldset id="popupAGs">
                   <legend class="accessibility">All Access Groups for this company</legend>
                      <t:dataList id="row" var="ag" layout="unorderedList"
                                 value="#{manageuserscontroller.popupAGList}" >
                              <t:selectBooleanCheckbox id="checkbox3" value="#{manageuserscontroller.selectedAGIds[ag.accessGroupID]}" rendered="#{ag.accessGroupID!= manageuserscontroller.accessGroupID}"/>
                              <t:outputText style="font-weight:bold;" id="text2" value="#{ag.name}" /><t:outputText value="(default)" rendered="#{ag.accessGroupID== manageuserscontroller.accessGroupID}" />
                             </t:dataList>
                  </fieldset>
              <div class="clr"><!-- --></div>
          </h:panelGroup>     
           <f:verbatim> <br /> </f:verbatim>
    <t:saveState value="#{manageuserscontroller.accessGroupID}" />Backing bean code
    private Map<Integer, Boolean> selectedAGIds = new HashMap<Integer, Boolean>();
       public void getSelectedAGItems(ActionEvent event) {
            // Get selected items.
          System.out.println("Inside selected AG Items method");
          System.out.println("Access group ID in selected AGItems method" + accessGroupID);     
         System.out.println("Selected AG list" + popupAGList);     
         selectedAGList = new ArrayList<AccessGroup>();
          for (AccessGroup accgrp : popupAGList) {
                System.out.println("inside for loop");
                int x = accgrp.getAccessGroupID();
                System.out.println("accessgroupid" + x);
         *if (selectedAGIds.get(x).booleanValue()) {*
                    selectedAGList.add(accgrp);
                    System.out.println("OK-user added to selected AG list");
                    System.out.println("Accessgroup id" + accgrp.getAccessGroupID());
                    System.out.println("Accessgroup name" + accgrp.getName());
               else
                    System.out.println("Accessgroup not selected");
          }I get the nullpointer exception at this line if (selectedAGIds.get(x).booleanValue())
    Please someone help when since i am struck with this and cann't go ahead with my task
    Thank You so much in advance

    You can try these steps in case of issues with web pages:
    You can reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Hold down the Shift key and left-click the Reload button
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (Mac)
    Clear the cache and remove cookies only from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > "Use custom settings for history" > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

Maybe you are looking for

  • Cannot Get Acrobat X .MSI to Install Through Windows MDT

    Hello All, I am attempting to install Acrobat X using AAMEE. I've created my standalone package and give the command "msiexec.exe /i Acrobat.msi /quiet" (without quotes). I add the application with source files pointing to the build folder, nothing i

  • IPod flashing orange though disk use is disabled

    Hello, my iPod Shuffle (4th gen) is flashing orange (and the windows safely remove hardware thing appears) until I sync it with iTunes or safely remove it (the led changes to solid green and the hardware removal thing disappears), though disk use is

  • Photo frame error loading the preference bundle. what should I do?

    I can't open the settings for photo frame , it only says , error loading the preference bundle for photo frame" please help

  • Fonts have gone crazy with 08 update

    I purchased iLife 08 and installed the iWeb update (including the 2.0.1 web update), and wanted to update my website; simply add a page and fix a couple of typos. First thing was my eps files that had looked fine and worked as transparent pictures we

  • Can you change the color of the interface rows in history in PS?

    Hello all, . . . I recently installed CS5.5 Standard and am giving the new app a run through. (PS right now) . . . I just upgraded from CS2 so it's a fairly big jump and a great one. I love pretty much all the new features. One thing I am wanting to