1 Reply Latest reply on Mar 12, 2008 9:29 AM by mustafa karakaya

    How to bypass validation phase on a4j support action?

    mustafa karakaya Newbie

      Hi,

      i am using a table which has columns including text fields, dropdown lists, checkboxes. table data is binded to an object list and all the columns are binded to corresponding field of table. When a button is clicked an action is fired via a4j support. However during the action all the values binded to list object's elements are null although my object list is in session scope. how can i solve this problem. i googled and found that this problem occurs cause of process validations phase. however making immediate true does not work. can anybody help please?

        • 1. Re: How to bypass validation phase on a4j support action?
          mustafa karakaya Newbie

          the code is as follows:

          <webuijsf:table augmentTitle="false" binding="#{CustomerMainPage.CST_ITEMS_TABLE}" id="CST_ITEMS_TABLE" lite="true" style="width: 100%">
           <webuijsf:tableRowGroup binding="#{CustomerMainPage.CST_ITEMS_TRG}" id="CST_ITEMS_TRG" rows="10"
           sourceData="#{ListsSessionBean.customerMainPageCatItemExtendedList}" sourceVar="currentRow">
           <webuijsf:tableColumn binding="#{CustomerMainPage.CST_ITEMNAME_COL}" id="CST_ITEMNAME_COL" valign="middle">
           <webuijsf:staticText binding="#{CustomerMainPage.staticText2}" id="staticText2"
           style="font-family: Geneva,Arial,Helvetica,sans-serif; font-size: 12px; font-weight: bold" text="#{currentRow.value['name']}"/>
           </webuijsf:tableColumn>
           <webuijsf:tableColumn align="center" binding="#{CustomerMainPage.CST_ITEMSIZES_COL}" id="CST_ITEMSIZES_COL"
           style="width: 50px" valign="middle">
           <webuijsf:dropDown binding="#{CustomerMainPage.dropDown1}" id="dropDown1"
           items="#{currentRow.value['itemSizePriceOptions']}"
           selected="#{currentRow.value['selectedItemSizeCode']}" style="font-family: Geneva,Arial,Helvetica,sans-serif; font-size: 12px"/>
           </webuijsf:tableColumn>
           <webuijsf:tableColumn align="center" binding="#{CustomerMainPage.CST_ADDITEM_COL}" id="CST_ADDITEM_COL"
           style="width: 20px" valign="middle" width="40">
           <webuijsf:image binding="#{CustomerMainPage.image1}" id="image1"
           onMouseOver="this.style.cursor='pointer'" url="/resources/add.png">
           <a4j:support action="#{CustomerMainPage.prepareSelectedItemPanel}" ajaxSingle="true" event="onClick"
           oncomplete="Richfaces.showModalPanel('itemModalPanel')" reRender="CST_SELECTEDITEM_PANEL, CTS_ITEMHEADER_PANEL, message1"/>
           </webuijsf:image>
           </webuijsf:tableColumn>
           </webuijsf:tableRowGroup>
           </webuijsf:table>


          public void prepareSelectedItemPanel(){
           int index = getSelectedItemRow();
           MenuItemExtendedRequestBean itemExtendedBean = getListsSessionBean().getCustomerMainPageCatItemExtendedList().get(index);
           String selectedItemSizePrice = itemExtendedBean.getSelectedItemSizeCode();
           itemExtendedBean = getMenuItemExtendedRequestBean().fillSelectedItemProperties(itemExtendedBean, selectedItemSizePrice);
           getListsSessionBean().setCustomerMainPageSelectedItemExtended(itemExtendedBean);
           }


          following code always returns null although a selected item exists. the value is not populated from ui to backing bean anyway.

          String selectedItemSizePrice = itemExtendedBean.getSelectedItemSizeCode();