3 Replies Latest reply: Feb 6, 2013 8:13 AM by Tshifhiwa RSS

    display lov when page load

    Tshifhiwa
      hi i have a situation where i what lov to popup when the page load.my situation is i what a lov to popup with , the list of organisation when the page load and when the page load it must display only information for that selected organisation,has anyone done that.am in jdeveloper 11.1.1.6.0
        • 1. Re: display lov when page load
          Lovin_JV_941794
          Be clear or specific with your question please.

          On page load how can you show items based on selected organization.

          Where is this organization selected?
          Pls be clear and also mention your jdev version
          • 2. Re: display lov when page load
            Koen Verhulst
            Hi adf009,

            launching the lov on page load, can be done by doing the following:

            1. Place a javascript resource under the af:document component:
                <af:resource type="javascript">
                      function openLov(evt) {  
                        var lov = AdfPage.PAGE.findComponent("departmentId1Id");
                        AdfLaunchPopupEvent.queue(lov, true);
                        evt.cancel();
                      }
            2. By using a clientListener, call the javascript method on load (type=load)
                    <af:clientListener method="openLov" type="load"/>
            Note that the "departmentId1Id" is an LOV component:
                     <af:inputListOfValues id="departmentId1Id"
                                                  popupTitle="Search and Select: #{bindings.DepartmentId1.hints.label}"
                                                  value="#{bindings.DepartmentId1.inputValue}"
                                                  label="#{bindings.DepartmentId1.hints.label}"
                                                  model="#{bindings.DepartmentId1.listOfValuesModel}"
                                                  required="#{bindings.DepartmentId1.hints.mandatory}"
                                                  columns="#{bindings.DepartmentId1.hints.displayWidth}"
                                                  shortDesc="#{bindings.DepartmentId1.hints.tooltip}">
                                <f:validator binding="#{bindings.DepartmentId1.validator}"/>
                                <af:convertNumber groupingUsed="false" pattern="#{bindings.DepartmentId1.format}"/>
                            </af:inputListOfValues>
            Regards,

            Koen Verhulst
            • 3. Re: display lov when page load
              Tshifhiwa
              ok the organisation is selected in the first page which load,i what to select organisation and navigate to next page whare there is only that organisation details
              my first page is below
              <?xml version='1.0' encoding='UTF-8'?>
              <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
                        xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                        xmlns:f="http://java.sun.com/jsf/core">
                <af:panelSplitter id="ps1" orientation="vertical" splitterPosition="148">
                  <f:facet name="first"/>
                  <f:facet name="second">
                    <af:panelStretchLayout id="psl1" startWidth="126px" endWidth="124px">
                      <f:facet name="bottom"/>
                      <f:facet name="center">
                        <af:panelStretchLayout id="psl2" endWidth="137px" startWidth="220px">
                          <f:facet name="center">
                            <af:panelGroupLayout id="pgl1" layout="vertical" valign="middle"
                                                 halign="center">
                              <af:panelStretchLayout id="psl3"
                                                     inlineStyle="width:732px; height:340px;"
                                                     bottomHeight="100px">
                                <f:facet name="bottom">
                                  <af:panelGroupLayout id="pgl2" layout="vertical"
                                                       valign="middle" halign="center">
                                    <af:panelHeader text="Select Organisation To Update" id="ph1"
                                                    inlineStyle="border-style:ridge; border-color:Blue; height:57px;">
                                      <f:facet name="context">
                                        <af:toolbar id="t1">
                                          <af:commandButton text="UpdateOrganisation" id="cb1"
                                                            action="UpdOrg"/>
                                        </af:toolbar>
                                      </f:facet>
                                      <f:facet name="menuBar"/>
                                      <f:facet name="toolbar"/>
                                      <f:facet name="legend"/>
                                      <f:facet name="info"/>
                                    </af:panelHeader>
                                    <af:panelFormLayout id="pfl1"
                                                        inlineStyle="border-color:Blue; border-style:ridge; height:24px; width:720px;">
                                      <af:selectOneChoice value="#{bindings.OrgName.inputValue}"
                                                          label="OrganisationName"
                                                          required="#{bindings.OrgName.hints.mandatory}"
                                                          shortDesc="#{bindings.OrgName.hints.tooltip}"
                                                          id="soc1">
                                        <f:selectItems value="#{bindings.OrgName.items}"
                                                       id="si1"/>
                                      </af:selectOneChoice>
                                    </af:panelFormLayout>
                                  </af:panelGroupLayout>
                                </f:facet>
                                <f:facet name="start"/>
                                <f:facet name="end"/>
                                <f:facet name="top"/>
                              </af:panelStretchLayout>
                            </af:panelGroupLayout>
                          </f:facet>
                          <f:facet name="top"/>
                        </af:panelStretchLayout>
                      </f:facet>
                      <f:facet name="start"/>
                      <f:facet name="end"/>
                      <f:facet name="top"/>
                    </af:panelStretchLayout>
                  </f:facet>
                </af:panelSplitter>
              </jsp:root>
              Edited by: adf009 on 2013/02/06 5:12 PM