This discussion is archived
13 Replies Latest reply: Jul 25, 2013 9:45 AM by user12246875 RSS

Enable CheckBox based on DropDown list in OAF Page

user12246875 Newbie
Currently Being Moderated

Hi,

 

Requirement is to enable CheckBox based on DropDown list in OAF Seeded Page.

 

DropDown list (MessageChoice) has the client action properties set as “FirePartialAction".
So I extended controller and wrote below code in PFR and PR  in extended Controller. But the control is not shifting from ProcessFormRequest to ProcessRequest.

Please let me know how to achieve this requirement.

 

public void ProcessRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);  
               
        OAMessageChoiceBean EgoAGBehaviorChoice = (OAMessageChoiceBean)webBean.findIndexedChildRecursive("EgoAGBehaviorChoice");
      
        String flag = (String)pageContext.getSessionValueDirect("flag");              
               
       if(flag == null)
        {
           throw new OAException("Please enter valid employee number1.",OAException.ERROR);
        }
       else
       {
           OAMessageCheckBoxBean oamessagecheckboxbean = (OAMessageCheckBoxBean)pageContext.getPageLayoutBean().findIndexedChildRecursive("PreEvent");
           oamessagecheckboxbean.setChecked(true);
       }
      
 
    }

   

public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
  {
      super.processFormRequest(pageContext, webBean);   
      OAApplicationModule am = pageContext.getApplicationModule(webBean);
        
      if ("VariantSelect".equals(pageContext.getParameter(EVENT_PARAM)))
      {
      OAMessageChoiceBean EgoAGBehaviorChoice = (OAMessageChoiceBean)webBean.findIndexedChildRecursive("EgoAGBehaviorChoice");
      String MsgCheckBoxValue = (String)EgoAGBehaviorChoice.getSelectionText(pageContext);
    
       if("Multi-Row".equals(MsgCheckBoxValue))//Multi-Row is option in DropDown
            {         
              pageContext.putSessionValueDirect("flag","EgoAGBehaviorChoice");                             
               pageContext.forwardImmediatelyToCurrentPage(null, true, "Y");
          }   
  }
  }  
  • 1. Re: Enable CheckBox based on DropDown list in OAF Page
    Sandeep Oracle Explorer
    Currently Being Moderated

    Hi ,

     

    Hope this condition is being set to true while you are testing. Otherwise I do not see any else besides this.

     

    Only other thing I can think of is , are you extending the main controller of the page.

     

    Thanks

    Sandeep

  • 2. Re: Enable CheckBox based on DropDown list in OAF Page
    user12246875 Newbie
    Currently Being Moderated

    Hi Sandeep,

     

    Yes, I deployed the CO and tested by changing the drop down to Multi-Row , still the check box was not checked.

    Yes am extending the main controller of the page.

     

    Thanks!

  • 3. Re: Enable CheckBox based on DropDown list in OAF Page
    Sandeep Oracle Explorer
    Currently Being Moderated

    Did you make sure that new or extended controller is being picked up at runtime ??

  • 4. Re: Enable CheckBox based on DropDown list in OAF Page
    user12246875 Newbie
    Currently Being Moderated

    Yes Sandeep, I gave below message inside  if("Multi-Row".equals(MsgCheckBoxValue) condition and the message showed up on top of the OAF page

     

    throw new OAException("Hello",

                             OAException.ERROR);

     

    The part that isn't working is after the Multi-Row  IF Condition.

     

    Thanks!

  • 5. Re: Enable CheckBox based on DropDown list in OAF Page
    Sandeep Oracle Explorer
    Currently Being Moderated

    Hi,

     

    Are you suspecting that pageContext.forwardImmediatelyToCurrentPage(null, true, "Y"); is not refreshing the page ?  . I am kind of getting confused now,  is the "IF CONDITION" not working or the control is not passing back to PR


    Thanks

    Sandeep

  • 6. Re: Enable CheckBox based on DropDown list in OAF Page
    user12246875 Newbie
    Currently Being Moderated

    Hi Sandeep,

     

    The control is not passing back to PR is the issue. In my last post I meant the part inside the Multi-Row  IF Condition isn't working.

     

    Sorry for the confusion.

     

    Thanks!

  • 7. Re: Enable CheckBox based on DropDown list in OAF Page
    Sandeep Oracle Explorer
    Currently Being Moderated

    This is what I asked you in my first post . Is this if condition setting to true . ??? I suspect it is setting to true. Please double check the If condition.

     

    If you are still facing issue, please paste the pg.xml (only the part that you are working or the dropdown). I will take a look

     

    Thanks

    Sandeep

  • 8. Re: Enable CheckBox based on DropDown list in OAF Page
    user12246875 Newbie
    Currently Being Moderated

    Hi Sandeep,

     

    Yes , the IF Condition is setting to true .

     

    Please find below page xml

     

     

    <?xml version="1.0" encoding="UTF-8" ?>

    - <!--

    dbdrv: exec java oracle/jrad/tools/xml/importer XMLImporter.class java &phase=dat+24 checkfile(115.14=120.2):~PROD:~PATH:~FILE &fullpath:~PROD:~PATH:~FILE -username &un_apps -password &pw_apps -dbconnection &jdbc_db_addr -userId "1" -rootPackage /oracle/apps/~PROD -rootdir &fullpath:~PROD:mds:directory 

    --> 

    - <jrad:page xmlns:jrad="http://xmlns.oracle.com/jrad" xmlns:oa="http://xmlns.oracle.com/oa" xmlns:ui="http://xmlns.oracle.com/uix/ui" version="10.1.3_1190" xml:lang="en-US" file-version="$Header: EGOEDITATTRGRPPG.xml 120.7.12010000.2 2008/11/28 06:00:07 nrayi ship $" xmlns:user="http://xmlns.oracle.com/jrad/user">

     

     

    - <jrad:content>

     

     

    - <oa:pageLayout id="EgoEditAttrGrpPG" amDefName="oracle.apps.ego.extfwk.admin.server.EgoEditAttrGroupAM" windowTitle="Create Attribute Group" controllerClass="oracle.apps.ego.extfwk.admin.webui.EgoEditAttrGrpCO" helpTarget="EGO_EGOEDITATTRGRPPG" helpTargetAppShortName="EGO" function="EGO_CREATE_ATTR_EXT">

     

     

    - <ui:corporateBranding>

     

     

    <oa:image id="corporateBrandingImage" source="/OA_MEDIA/FNDSSCORP.gif" />

     

    </ui:corporateBranding>

     

    - <ui:contents>

     

     

    <oa:tableLayout id="EgoRequiredFieldRegion" extends="/oracle/apps/fnd/framework/webui/OAReqFieldDescRG" />

     

     

    <oa:spacer id="EgoSpacer" height="10" />

     

     

    - <oa:labeledFieldLayout id="EgoLabeledFieldLayout" columns="1" width="" labelWidth="21%">

     

     

    - <ui:contents>

     

     

    <oa:messageTextInput id="EgoInterName" prompt="Internal Name" required="yes" viewName="EgoAttrGroupDLVO" viewAttr="AttrGroupName" maximumLength="30" serverUnvalidated="true" />

     

     

    <oa:messageTextInput id="EgoDisplayName" prompt="Display Name" viewName="EgoAttrGroupDLVO" viewAttr="AttrGroupDispName" maximumLength="80" required="yes" serverUnvalidated="true" />

     

     

    <oa:messageTextInput id="EgoDescription" prompt="Description" viewName="EgoAttrGroupDLVO" viewAttr="Description" maximumLength="240" />

     

     

    - <oa:messageChoice id="EgoAGBehaviorChoice" prompt="Behavior" pickListViewName="EgoAttGroupBehaviorPoplistVO" pickListDispAttr="Meaning" pickListValAttr="LookupCode" allowBlankValue="false" viewName="EgoAttrGroupDLVO" viewAttr="AGBehavior" shortDesc="Attribute Group Behavior" serverUnvalidated="true" warnAboutChanges="false">

     

     

    - <ui:primaryClientAction>

     

     

    <ui:firePartialAction event="VariantSelect" unvalidated="true" />

     

    </ui:primaryClientAction>

    </oa:messageChoice>

     

    <oa:messageTextInput id="EgoNumColsSR" required="yes" serverUnvalidated="true" maximumLength="1" viewName="EgoAttrGroupDLVO" viewAttr="NumOfCols" prompt="Number of columns in the page layout" columns="1" dataType="NUMBER" />

     

     

    <oa:messageTextInput id="EgoNumColsMR" required="yes" serverUnvalidated="true" maximumLength="3" viewName="EgoAttrGroupDLVO" viewAttr="NumOfCols" prompt="Number of columns shown in the table" columns="3" dataType="NUMBER" />

     

     

    <oa:messageTextInput id="EgoNumRows" required="yes" serverUnvalidated="true" maximumLength="2" viewName="EgoAttrGroupDLVO" viewAttr="NumOfRows" prompt="Number of rows shown in the table" columns="2" dataType="NUMBER" />

     

    </ui:contents>

    </oa:labeledFieldLayout>

     

    - <oa:contentFooter id="EgoCancelApplyFooterRN">

     

     

    - <ui:contents>

     

     

    - <oa:rowLayout id="CancelApplyRL" width="100%" controllerClass="oracle.apps.ego.common.webui.EgoCancelApplyAddAttributesCO">

     

     

    - <ui:contents>

     

     

    - <oa:cellFormat id="CancelButtonCF" width="100%" hAlign="end">

     

     

    - <ui:contents>

     

     

    <oa:button id="cancelButton" text="Cancel" use="/oracle/apps/fnd/attributesets/Buttons/Cancel" />

     

    </ui:contents>

    </oa:cellFormat>

     

    - <oa:cellFormat id="SpacerCF" width="100%" height="1">

     

     

    - <ui:contents>

     

     

    <oa:spacer id="cancelApplyAddAnotherButtonSpacer" width="5" height="5" />

     

    </ui:contents>

    </oa:cellFormat>

     

    - <oa:cellFormat id="AddAnotherCF" hAlign="end" width="100%">

     

     

    - <ui:contents>

     

     

    <oa:submitButton id="EgoAddAttributesButton" text="Apply and Add Attributes" prompt="Apply and Add Attributes" />

     

    </ui:contents>

    </oa:cellFormat>

     

    - <oa:cellFormat id="SpacerCF2" width="100%" height="1">

     

     

    - <ui:contents>

     

     

    <oa:spacer id="cancelApplyAddAnotherButtonSpacer2" width="5" height="5" />

     

    </ui:contents>

    </oa:cellFormat>

     

    - <oa:cellFormat id="ApplyButtonCF" width="100%" hAlign="end">

     

     

    - <ui:contents>

     

     

    <oa:submitButton id="applyButton" text="Apply" use="/oracle/apps/fnd/attributesets/Buttons/Apply" />

     

    </ui:contents>

    </oa:cellFormat>

    </ui:contents>

    </oa:rowLayout>

     

    <oa:formValue id="cancelDestinationHidden" />

     

     

    <oa:formValue id="applyDestinationHidden" />

     

    </ui:contents>

    </oa:contentFooter>

     

    - <oa:advancedTable id="BusinessEntityTable" unvalidated="true" viewName="EgoAGDataLevelVO" text="Business Entities">

     

     

    - <ui:contents>

     

     

    - <oa:column id="DataLevelCol">

     

     

    - <ui:columnHeader>

     

     

    <oa:sortableHeader id="sortableHeader1" prompt="Name" sortState="yes" sortByViewAttr="DataLevelId" initSortSeq="first" />

     

    </ui:columnHeader>

     

    - <ui:contents>

     

     

    <oa:messageStyledText id="DataLevelName" viewAttr="DataLevelName" prompt="Data Level Name" rendered="true" />

     

    </ui:contents>

    </oa:column>

     

    - <oa:column id="AGDataLevelBehaviorCol">

     

     

    - <ui:columnHeader>

     

     

    <oa:sortableHeader id="sortableHeader2" prompt="Style to SKU" />

     

    </ui:columnHeader>

     

    - <ui:contents>

     

     

    - <oa:flowLayout id="AGDataLevelBehaviorFL">

     

     

    - <ui:contents>

     

     

    <oa:messageChoice id="DLbehavior" pickListViewName="EgoAGDataLevelBehaviorVO" pickListDispAttr="Meaning" pickListValAttr="LookupCode" allowBlankValue="false" prompt="Style to Sku" adminCustomizable="false" viewAttr="Defaulting" readOnly="${oa.EgoAGDataLevelVO.ReadOnlyAttr}" rendered="${oa.EgoAGDataLevelVO.EnableDefault}" />

     

    </ui:contents>

    </oa:flowLayout>

    </ui:contents>

    </oa:column>

     

    - <oa:columnGroup id="PrivilegeColGrp">

     

     

    - <ui:columnHeader>

     

     

    <oa:sortableHeader id="sortableHeader5" prompt="Privilege" />

     

    </ui:columnHeader>

     

    - <ui:contents>

     

     

    - <oa:column id="ViewPrivCol">

     

     

    - <ui:columnHeader>

     

     

    <oa:sortableHeader id="sortableHeader3" prompt="View" />

     

    </ui:columnHeader>

     

    - <ui:contents>

     

     

    - <oa:messageLovInput id="ViewPrivilegeDispName" viewAttr="ViewPrivilegeName" queryable="true" externalListOfValues="/oracle/apps/ego/lov/webui/EGOFORMFUNCNAMELOV" prompt="View Privilege" readOnly="false" rendered="true" disabled="${oa.EgoAGDataLevelVO.EnableViewPriv}">

     

     

    - <jrad:lovMappings>

     

     

    <jrad:lovMap id="EgoViewObjectIdMap" lovItem="EgoLovObjectId" criteriaFrom="EgoObjectId" programmaticQuery="true" />

     

     

    <jrad:lovMap id="EgoViewFuncNameMap" lovItem="EgoLovFunctionName" resultTo="ViewPrivilegeDispName" criteriaFrom="ViewPrivilegeDispName" />

     

     

    <jrad:lovMap id="EgoViewFuncIdMap" lovItem="EgoLovFunctionId" resultTo="EgoViewPrivilegeId" programmaticQuery="true" />

     

    </jrad:lovMappings>

    </oa:messageLovInput>

     

    <oa:formValue id="EgoViewPrivilegeId" dataType="NUMBER" viewAttr="ViewPrivilegeId" queryable="true" />

     

    </ui:contents>

    </oa:column>

     

    - <oa:column id="EdirPrivCol">

     

     

    - <ui:columnHeader>

     

     

    <oa:sortableHeader id="sortableHeader4" prompt="Edit" />

     

    </ui:columnHeader>

     

    - <ui:contents>

     

     

    - <oa:messageLovInput id="EgoEditPrivilegeDispName" viewAttr="EditPrivilegeName" queryable="true" externalListOfValues="/oracle/apps/ego/lov/webui/EGOFORMFUNCNAMELOV" prompt="Edit Privilege" readOnly="false" rendered="true" disabled="${oa.EgoAGDataLevelVO.EnableEditPriv}">

     

     

    - <jrad:lovMappings>

     

     

    <jrad:lovMap id="EgoEditObjectIdMap" lovItem="EgoLovObjectId" criteriaFrom="EgoObjectId" programmaticQuery="true" />

     

     

    <jrad:lovMap id="EgoEditFuncNameMap" lovItem="EgoLovFunctionName" criteriaFrom="EgoEditPrivilegeDispName" resultTo="EgoEditPrivilegeDispName" programmaticQuery="false" requiredForLOV="false" />

     

     

    <jrad:lovMap id="EgoEditFuncIdMap" lovItem="EgoLovFunctionId" resultTo="EgoEgitPrivilegeId" programmaticQuery="true" />

     

    </jrad:lovMappings>

    </oa:messageLovInput>

     

    <oa:formValue id="EgoEgitPrivilegeId" dataType="NUMBER" viewAttr="EditPrivilegeId" queryable="true" />

     

    </ui:contents>

    </oa:column>

    </ui:contents>

    </oa:columnGroup>

     

    - <oa:columnGroup id="AGEventColGrp">

     

     

    - <ui:columnHeader>

     

     

    <oa:sortableHeader id="sortableHeader8" prompt="Raise Attribute Change Event" />

     

    </ui:columnHeader>

     

    - <ui:contents>

     

     

    - <oa:column id="PreEventCol">

     

     

    - <ui:columnHeader>

     

     

    <oa:sortableHeader id="sortableHeader6" prompt="Pre" />

     

    </ui:columnHeader>

     

    - <ui:contents>

     

     

    <oa:messageCheckBox id="PreEvent" viewAttr="RaisePreEvent" prompt="" checkedValue="Y" unCheckedValue="N" readOnly="false" text="" disabled="${oa.EgoAGDataLevelVO.EnablePreEvent}" shortDesc="Raise Pre Event" />

     

    </ui:contents>

    </oa:column>

     

    - <oa:column id="PostEventCol">

     

     

    - <ui:columnHeader>

     

     

    <oa:sortableHeader id="sortableHeader7" prompt="Post" />

     

    </ui:columnHeader>

     

    - <ui:contents>

     

     

    <oa:messageCheckBox id="PostEvent" viewAttr="RaisePostEvent" checkedValue="Y" unCheckedValue="N" text="" prompt="" readOnly="false" disabled="${oa.EgoAGDataLevelVO.EnablePostEvent}" shortDesc="Raise Post Event" />

     

    </ui:contents>

    </oa:column>

    </ui:contents>

    </oa:columnGroup>

     

    - <oa:column id="DataLevelIdCol" rendered="false">

     

     

    - <ui:columnHeader>

     

     

    <oa:sortableHeader id="sortableHeader9" sortState="ascending" />

     

    </ui:columnHeader>

     

    - <ui:contents>

     

     

    <oa:messageTextInput id="DataLevelId" dataType="NUMBER" viewAttr="DataLevelId" rendered="false" />

     

    </ui:contents>

    </oa:column>

    </ui:contents>

     

    - <ui:tableSelection>

     

     

    <oa:multipleSelection id="SelectFlag" viewAttr="Selectionattr" dataType="VARCHAR2" />

     

    </ui:tableSelection>

    </oa:advancedTable>

     

    <oa:formValue id="EgoObjectId" dataType="NUMBER" queryable="true" rendered="true" />

     

    </ui:contents>

    </oa:pageLayout>

    </jrad:content>

    </jrad:page>

  • 9. Re: Enable CheckBox based on DropDown list in OAF Page
    Sandeep Oracle Explorer
    Currently Being Moderated

    Hi,

     

    If you are sure that If condition is setting to true and pagecontext.forwardToCurrent is not working, please try below and check, by giving the absolute path

     

    pageContext.forwardImmediately("OA.jsp?page=/prajkumar/oracle/apps/fnd/searchdemo/webui/SearchPG",

                                             null,

                                             OAWebBeanConstants.KEEP_MENU_CONTEXT,

                                             null,

                                             null,

                                             false, // retain AM

                                             OAWebBeanConstants.ADD_BREAD_CRUMB_NO);



  • 10. Re: Enable CheckBox based on DropDown list in OAF Page
    user12246875 Newbie
    Currently Being Moderated

    Sandeep,

     

    Now the page is refreshing , but the option chosen in the Drop-Down is not retained.

    When the Multi-Row option is chosen in drop down , the page refreshes and the option in drop down changes to Single-Row , Instead How Can I retain Multi-Row option?

     

    Thanks!

  • 11. Re: Enable CheckBox based on DropDown list in OAF Page
    Sandeep Oracle Explorer
    Currently Being Moderated

    Hi ,

     

    Please try below. I have changed the retain AM option to true

     

    pageContext.forwardImmediately("OA.jsp?page=/prajkumar/oracle/apps/fnd/searchdemo/webui/SearchPG",

                                             null,

                                             OAWebBeanConstants.KEEP_MENU_CONTEXT,

                                             null,

                                             null,

                                             true, // retain AM, changed this option.

                                             OAWebBeanConstants.ADD_BREAD_CRUMB_NO);


    Thanks

    Sandeep


  • 12. Re: Enable CheckBox based on DropDown list in OAF Page
    Sandeep Oracle Explorer
    Currently Being Moderated

    Hi user12246875,

     

    May I know if this has worked for you ?

     

    Thanks

    Sandeep

  • 13. Re: Enable CheckBox based on DropDown list in OAF Page
    user12246875 Newbie
    Currently Being Moderated

    Hi Sandeep,

     

    I tried with true for retain AM, this time while I choose Multi-Row the page refreshed but the check box was not checked.

     

    Then when I choose options other than Multi-Row , I get below error message

     

    Error Page

    You have encountered an unexpected error. Please contact the System Administrator for assistance.

     

    Thanks!

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points