FindComponent in pagetemplate ??

Hi,
I have a pagetemplate in which I would like to put some javascript functionality.
Therefore I need the AdfPage.PAGE.findComponent function.
The problem is that in my other pages the reference to the page template has different ids (sometimes the
pagetemplate - which is a naming container - is called templateID, sometimes chickenID, or testID,...whatever).
I have read that it is possible to "search" within containers using several colons, but this does not (seem to) work in my case.
Here is some info on what I am trying to achieve :
I wish to have a dialog box asking the user if he wishes to save changes before he exits. Not too much asked I guess.
-----quote-----
Hi,
I think in the upcoming R1 release there is an automated option for this (though not customizable. I am not aware of anything in the current build of JDeveloper 11g . What about using an af:clientListener in an unload event to call a serverListener to check the state of the transaction ?
Frank
----end quote----
Re: how to popup confirm dialog trying to navigate away with unsaved change
Now that looks like a good idea, but here's the hick-up.
When using a custom event AdfCustomEvent.queue(...) you NEED a valid source UIComponent or the framework will never deliver the event to the serverlistener.
Now it seems pretty clear to me that that user, and myself, did not intend to write this same code over and over in each and every page...
Lets put the code in our template...oh..hell..the (triple) colons in AdfPage.PAGE.findComponent(":::comp1") don't work in a template!
EDIT : Using ADF 11g

Thanks a lot, and sorry for the crude way of putting it..but I had been looking for an answer for some time now
and got kinda frustrated ;D
But thanks a lot!
No it did not work.
Well at least what I thought you meant did not work.
Here is what I have now :
template
        <af:commandButton text="commandButton 1" immediate="true" partialSubmit="true" action="#{Bb_Common_Template.testbis}"/>
        <af:inputText visible="false" id="dummyInputTextForOnBeforeUnloadClientListener">
                <af:serverListener type="saveBeforeLeaveEvent" method="#{Bb_Common_Template.test}"/>
            </af:inputText>
        <f:verbatim>           
      <script>
      var targetUIComponent = "";
      window.onbeforeunload = function(event)
             * Todo : add dialog logic here, in case the user wants to save
             * we do so. Else we just continue navigating.
            // if we want to save, tell the server
            var source = AdfPage.PAGE.findComponent(targetUIComponent);           
            AdfCustomEvent.queue(source,
                         "saveBeforeLeaveEvent",
                         {doSave:1},
                         true);
      </script>
      </f:verbatim>html source code in firefox
<input id="templateID:dummyInputTextForOnBeforeUnloadClientListener::content" name="templateID:dummyInputTextForOnBeforeUnloadClientListener" class=...backing bean
    public void testbis()
        FacesContext fctx =  FacesContext.getCurrentInstance();
        UIComponent uic = fctx.getViewRoot().findComponent("dummyInputTextForOnBeforeUnloadClientListener");
        System.out.println("With 0 " + uic );
        uic = fctx.getViewRoot().findComponent(":dummyInputTextForOnBeforeUnloadClientListener");
        System.out.println("With 1 " + uic );
        uic = fctx.getViewRoot().findComponent("::dummyInputTextForOnBeforeUnloadClientListener");
        System.out.println("With 2 " + uic );
        uic = fctx.getViewRoot().findComponent(":::dummyInputTextForOnBeforeUnloadClientListener");
        System.out.println("With 3 " + uic );
        uic = fctx.getViewRoot().findComponent("::::dummyInputTextForOnBeforeUnloadClientListener");
        System.out.println("With 4 " + uic );
        uic = fctx.getViewRoot().findComponent(":::::dummyInputTextForOnBeforeUnloadClientListener");
        System.out.println("With 5 " + uic );
        uic = fctx.getViewRoot().findComponent("::::::dummyInputTextForOnBeforeUnloadClientListener");
        System.out.println("With 6 " + uic );
        if (uic != null)
            String clientid = uic.getClientId(fctx);
            ExtendedRenderKitService extendedRenderKitService = Service.getRenderKitService(fctx,ExtendedRenderKitService.class);
            extendedRenderKitService.addScript(fctx,"targetUIComponent = '"+clientid + "';");
        } else {
            System.out.println("Nope didnt work...");
    public void test(ClientEvent cl)
        System.out.println(cl);
    }console output when pressing commandButton1
With 0 null
With 1 null
With 2 null
With 3 null
With 4 null
With 5 null
With 6 null
Nope didnt work...Edited by: Charles (OBASI) on 12-aug-2009 7:11
Edited by: Charles (OBASI) on 12-aug-2009 7:16

Similar Messages

  • Problems in creating a generic toolbar in the pageTemplate (11.1.1.1.0)

    I tried to create a generic toolbar in a pageTemplate using the first method suggested in the Nimphius' blog (ADF declarative method) but I failed to understand and the execute 2 things.
    First created the VO actions as describet but I didn't understand how to connect them to the template buttons.
    Second I identified buttons as suggested (nextButt and prevButt) but I wasn't able to understand the correct syntax for partial trigger in my panelForm.
    Could someone explain me better how to get my result ?
    Tks
    Tullio

    Hi,
    actually I would use a declarative component instead and have a facet in the template to add the declarative component in.
    See http://www.oracle.com/technology/products/jdev/tips/fnimphius/index.html -->" How to build a reusable toolbar with Oracle ADF declarative components"
    Instead of ADF binding references you can use managed bean methods as well.. I am currently working on getting method expressions in page templates (meaning I am trying to get this on a new feature list), after which templates could invoke listener methods. This then makes the process of creating a toolbar in a template easier
    Frank

  • Using AdfPage.PAGE.findComponent to find a popUp in a region

    Adf11g
    Hello
    I have a task flow in a region on a page - the region is named regionTrans.
    The main page in the taskflow has a popUp in the jsp:root - the popUp is named popTrans
    As I need to do a CreateInsert() before displaying the popUp I'm displaying the popUp using the following code :
        public static void showPopup(String popupId) {
           FacesContext context = getFacesContext();
           ExtendedRenderKitService extRenderKitSrvc =
                    Service.getRenderKitService(context, ExtendedRenderKitService.class);
           extRenderKitSrvc.addScript(context,
                                           "AdfPage.PAGE.findComponent('" + popupId + "').show();");
            }   In order to show the popUp in the region when the user clicks a button I have to use "regionTrans:0:popTrans" for the popupId.
    "regionTrans:0:popTrans" was found be looking at the source of the generated page.
    What I don't understand is what the "0" represents in the "regionTrans:0:popTrans"
    Can anybody explain ?
    Regards
    Paul

    Hi
    Here's where the region is defined in the main page :
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
              xmlns:c="http://java.sun.com/jsp/jstl/core">
      <c:set var="viewcontrollerBundle"
             value="#{adfBundle['ch.mit.trac.view.resourceBundle.ViewControllerBundle']}"/>
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1" title="TRAC v#{bindings.Version.inputValue}">
          <af:messages id="m1"/>
          <af:form id="f1">
            <af:decorativeBox theme="light" topHeight="30px" id="db1">
              <f:facet name="center">
                <af:region value="#{bindings.transaction1.regionModel}"
                           id="regionTrans"/>
              </f:facet>
              <f:facet name="top">
                <af:panelGroupLayout layout="scroll"
                                     xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                                     id="pgl1">
                  <af:menuBar id="mb1">And here's the entire jsff
    <?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"
              xmlns:c="http://java.sun.com/jsp/jstl/core">
      <c:set var="viewcontrollerBundle"
             value="#{adfBundle['ch.mit.trac.view.resourceBundle.ViewControllerBundle']}"/>
      <af:panelStretchLayout id="psl1" topHeight="42px" visible="true"
                             inlineStyle="width:1367px; height:851px;">
        <f:facet name="center">
          <af:panelStretchLayout id="psl2" topHeight="29px" bottomHeight="49px">
            <f:facet name="bottom">
              <af:panelGroupLayout layout="horizontal"
                                   xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                                   id="pgl5">
                <af:separator id="s3"/>
                <af:outputText value="Warnings : 5" id="ot2"/>
                <af:commandButton actionListener="#{bindings.Rollback.execute}"
                                  text="Rollback"
                                  disabled="#{!bindings.Rollback.enabled}"
                                  immediate="true" id="cb5">
                  <af:resetActionListener/>
                </af:commandButton>
                <af:commandButton actionListener="#{bindings.Commit.execute}"
                                  text="Commit"
                                  disabled="#{!bindings.Commit.enabled}" id="cb4"/>
              </af:panelGroupLayout>
            </f:facet>
            <f:facet name="center">
              <af:panelSplitter id="ps1" splitterPosition="690">
                <f:facet name="first">
                  <af:panelGroupLayout layout="scroll"
                                       xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                                       id="pgl3">
                    <af:panelHeader text="#{viewcontrollerBundle.BUY}" id="ph1">
                      <f:facet name="context">
                        <af:inputComboboxListOfValues popupTitle="Search and Result Dialog"
                                                      id="inputComboboxListOfValues1"/>
                      </f:facet>
                      <f:facet name="menuBar"/>
                      <f:facet name="toolbar">
                        <af:commandToolbarButton text="#{viewcontrollerBundle.NEW}"
                                                 id="ctb1"/>
                      </f:facet>
                      <f:facet name="legend"/>
                      <f:facet name="info"/>
                    </af:panelHeader>
                  </af:panelGroupLayout>
                </f:facet>
                <f:facet name="second">
                  <af:panelHeader text="#{viewcontrollerBundle.SELL}"
                                  id="panelHeader1">
                    <f:facet name="context">
                      <af:inputComboboxListOfValues popupTitle="Search and Result Dialog"
                                                    id="inputComboboxListOfValues2"/>
                    </f:facet>
                    <f:facet name="menuBar"/>
                    <f:facet name="toolbar">
                      <af:commandToolbarButton text="#{viewcontrollerBundle.NEW}"
                                               id="commandToolbarButton1"/>
                    </f:facet>
                    <f:facet name="legend"/>
                    <f:facet name="info"/>
                  </af:panelHeader>
                </f:facet>
              </af:panelSplitter>
            </f:facet>
            <f:facet name="top">
              <af:panelGroupLayout layout="scroll"
                                   xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                                   id="pgl4">
                <af:outputText value="outputText1" id="ot1"/>
                <af:separator id="s2"/>
              </af:panelGroupLayout>
            </f:facet>
          </af:panelStretchLayout>
        </f:facet>
        <f:facet name="top">
          <af:panelGroupLayout layout="horizontal"
                               xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                               id="pgl2">
            <af:selectOneChoice value="#{bindings.UserPositionView.inputValue}"
                                required="#{bindings.UserPositionView.hints.mandatory}"
                                shortDesc="#{bindings.UserPositionView.hints.tooltip}"
                                id="soc1" autoSubmit="true">
              <f:selectItems value="#{bindings.UserPositionView.items}" id="si1"/>
            </af:selectOneChoice>
            <af:spacer width="10" height="10" id="s1"/>
            <af:selectOneChoice value="#{bindings.SttTransactionViewViaPosition.inputValue}"
                                shortDesc="#{bindings.SttTransactionViewViaPosition.hints.tooltip}"
                                id="soc2" partialTriggers="soc1">
              <f:selectItems value="#{bindings.SttTransactionViewViaPosition.items}"
                             id="si2"/>
            </af:selectOneChoice>
            <af:commandToolbarButton text="#{viewcontrollerBundle.PREVIOUS}"
                                     id="cb2"
                                     actionListener="#{bindings.Previous.execute}"
                                     disabled="#{!bindings.Previous.enabled}"
                                     partialSubmit="true"/>
            <af:commandToolbarButton text="#{viewcontrollerBundle.NEXT}" id="cb1"
                                     actionListener="#{bindings.Next.execute}"
                                     disabled="#{!bindings.Next.enabled}"
                                     partialSubmit="true"/>
            <af:spacer width="10" height="10" id="s4"/>
            <af:commandToolbarButton id="commandToolbarButton2"
                                     text="#{viewcontrollerBundle.NEW}"
                                     actionListener="#{transactionBean.newTransactionOnClick}"/>
            <af:spacer width="25" height="10" id="spacer1"/>
            <af:commandToolbarButton text="#{viewcontrollerBundle.LIMIT}"
                                     id="ctb2"/>
            <af:commandToolbarButton text="#{viewcontrollerBundle.WARNINGS}"
                                     id="ctb3"/>
            <af:commandToolbarButton text="#{viewcontrollerBundle.INFORMATION}"
                                     id="ctb4"/>
            <af:commandToolbarButton text="#{viewcontrollerBundle.DOCUMENTS}"
                                     id="ctb5"/>
            <af:commandToolbarButton text="#{viewcontrollerBundle.TRANS_REP}"
                                     id="ctb6"/>
          </af:panelGroupLayout>
        </f:facet>
      </af:panelStretchLayout>
      <af:popup id="popTrans">
        <af:panelWindow id="pw1" title="#{viewcontrollerBundle.TRANSACTION}">
          <af:panelFormLayout id="pfl1" labelAlignment="top">
            <af:inputText value="#{bindings.TransactionId.inputValue}"
                          label="#{bindings.TransactionId.hints.label}"
                          required="#{bindings.TransactionId.hints.mandatory}"
                          columns="#{bindings.TransactionId.hints.displayWidth}"
                          maximumLength="#{bindings.TransactionId.hints.precision}"
                          shortDesc="#{bindings.TransactionId.hints.tooltip}"
                          id="it2">
              <f:validator binding="#{bindings.TransactionId.validator}"/>
            </af:inputText>
            <af:inputText value="#{bindings.Designation.inputValue}"
                          label="#{bindings.Designation.hints.label}"
                          required="#{bindings.Designation.hints.mandatory}"
                          columns="#{bindings.Designation.hints.displayWidth}"
                          maximumLength="#{bindings.Designation.hints.precision}"
                          shortDesc="#{bindings.Designation.hints.tooltip}"
                          id="it1">
              <f:validator binding="#{bindings.Designation.validator}"/>
            </af:inputText>
            <f:facet name="footer">
              <af:commandButton text="#{viewcontrollerBundle.OK}" id="cb3"/>
            </f:facet>
          </af:panelFormLayout>
        </af:panelWindow>
      </af:popup>
    </jsp:root>If there's too much or too little info let me know
    Regards
    Paul

  • Invoking PageTemplate Bug?

    Hi folks,
       I'm using jdev 11.1.2.4.0 by with that i h've been created fusion web app. it comprise  of model-viewcontroller projects. In VC i h've been created a custom pagetemplate.jsf then i try to invoke that in all my .jsf.
    it's fine.
    but i'm trying to do that same in jdev11.1.1.6.0. in this case i created my custom pagetemplate.jspx then i try to invoke that in all my .jspx. it's throwing some feedback window is appearing each and every time. so i can't achieve this. Is this Bug in this specific version? or else i'm doing mistake.
    i got a message like this in jdev11.1.1.6.0.
    SEVERE: Error calling postJSPCreationHook for oracle.adfdtinternal.view.rich.addin.plugin.ADFFacesJsfWizardExtension
    java.lang.NoSuchMethodError: oracle.adfdt.view.rich.template.PageTemplateInfo.configureProject(Loracle/ide/model/Project;)V
      at oracle.adfdt.view.rich.template.TemplateDTUtils.applyPageTemplate(TemplateDTUtils.java:301)
      at oracle.adfdtinternal.view.rich.pagelayout.quickstart.PageTemplateFlowLayout.configure(PageTemplateFlowLayout.java:60)
      at oracle.adfdtinternal.view.rich.addin.plugin.ADFFacesJsfWizardExtension.postNodeCreationHook(ADFFacesJsfWizardExtension.java:251)
      at oracle.adfdtinternal.view.rich.addin.plugin.ADFFacesJsfWizardExtension.postJSPCreationHook(ADFFacesJsfWizardExtension.java:150)
      at oracle.jdevimpl.webapp.jsp.AbstractJspFileBuilderModel.postProcessNode(AbstractJspFileBuilderModel.java:95)
      at oracle.jdevimpl.webapp.jsp.taglibraries.jsf.JsfJspFusionWizard$JsfJspFileBuilderModel.postProcessNode(JsfJspFusionWizard.java:465)
      at oracle.jdevimpl.webapp.wizards.AbstractWebAppFileBuilderModel.postProcess(AbstractWebAppFileBuilderModel.java:121)
      at oracle.jdeveloper.builder.AbstractBuilderModel.addFileToProject(AbstractBuilderModel.java:278)
      at oracle.jdeveloper.builder.AbstractBuilderModel.commitWizardState(AbstractBuilderModel.java:225)
      at oracle.jdevimpl.webapp.fusion.wizards.AbstractWebAppFileWizard$4.run(AbstractWebAppFileWizard.java:192)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:642)
      at java.awt.EventQueue.access$000(EventQueue.java:85)
      at java.awt.EventQueue$1.run(EventQueue.java:603)
      at java.awt.EventQueue$1.run(EventQueue.java:601)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:612)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
      at java.awt.Dialog$1.run(Dialog.java:1046)
      at java.awt.Dialog$3.run(Dialog.java:1098)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.awt.Dialog.show(Dialog.java:1096)
      at java.awt.Component.show(Component.java:1585)
      at java.awt.Component.setVisible(Component.java:1537)
      at java.awt.Window.setVisible(Window.java:842)
      at java.awt.Dialog.setVisible(Dialog.java:986)
      at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:395)
      at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:356)
      at oracle.ide.dialogs.ProgressBar.start(ProgressBar.java:352)
      at oracle.ide.dialogs.ProgressBar.start(ProgressBar.java:243)
      at oracle.ide.dialogs.ProgressBar.start(ProgressBar.java:215)
      at oracle.jdevimpl.webapp.fusion.wizards.AbstractWebAppFileWizard.doFinish(AbstractWebAppFileWizard.java:93)
      at oracle.jdevimpl.webapp.fusion.wizards.AbstractWebAppWizard.invoke(AbstractWebAppWizard.java:151)
      at oracle.ide.wizard.WizardManager.invokeWizard(WizardManager.java:372)
      at oracle.ide.wizard.WizardManager$1.run(WizardManager.java:420)
      at oracle.ide.util.IdeUtil$3.run(IdeUtil.java:1089)
      at oracle.javatools.util.SwingUtils.invokeAfterRepaint(SwingUtils.java:509)
      at oracle.ide.util.IdeUtil.invokeAfterRepaint(IdeUtil.java:1102)
      at oracle.ide.wizard.WizardManager$2.run(WizardManager.java:428)
      at oracle.ide.util.IdeUtil$3.run(IdeUtil.java:1089)
      at oracle.javatools.util.SwingUtils.invokeAfterRepaint(SwingUtils.java:509)
      at oracle.ide.util.IdeUtil.invokeAfterRepaint(IdeUtil.java:1102)
      at oracle.ide.wizard.WizardManager.invokeSecondaryWizard(WizardManager.java:424)
      at oracle.ide.gallery.ObjectGallery.invokeWizard(ObjectGallery.java:383)
      at oracle.ide.gallery.ObjectGallery.runDialog(ObjectGallery.java:204)
      at oracle.ide.gallery.ObjectGallery.runDialog(ObjectGallery.java:124)
      at oracle.ide.gallery.ObjectGalleryAddin._invokeGallery(ObjectGalleryAddin.java:405)
      at oracle.ide.gallery.ObjectGalleryAddin.handleEvent(ObjectGalleryAddin.java:208)
      at oracle.ide.controller.IdeAction.performAction(IdeAction.java:529)
      at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:897)
      at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:501)
      at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
      at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
      at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
      at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
      at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
      at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
      at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)
      at java.awt.Component.processMouseEvent(Component.java:6289)
      at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
      at java.awt.Component.processEvent(Component.java:6054)
      at java.awt.Container.processEvent(Container.java:2041)
      at java.awt.Component.dispatchEventImpl(Component.java:4652)
      at java.awt.Container.dispatchEventImpl(Container.java:2099)
      at java.awt.Component.dispatchEvent(Component.java:4482)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
      at java.awt.Container.dispatchEventImpl(Container.java:2085)
      at java.awt.Window.dispatchEventImpl(Window.java:2478)
      at java.awt.Component.dispatchEvent(Component.java:4482)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
      at java.awt.EventQueue.access$000(EventQueue.java:85)
      at java.awt.EventQueue$1.run(EventQueue.java:603)
      at java.awt.EventQueue$1.run(EventQueue.java:601)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
      at java.awt.EventQueue$2.run(EventQueue.java:617)
      at java.awt.EventQueue$2.run(EventQueue.java:615)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Nov 1, 2013 3:31:07 AM com.oracle.webapp
    SEVERE: Error calling postJSPCreationHook for oracle.adfdtinternal.view.rich.addin.plugin.ADFFacesJsfWizardExtension
    java.lang.NoSuchMethodError: oracle.adfdt.view.rich.template.PageTemplateInfo.configureProject(Loracle/ide/model/Project;)V
      at oracle.adfdt.view.rich.template.TemplateDTUtils.applyPageTemplate(TemplateDTUtils.java:301)
      at oracle.adfdtinternal.view.rich.pagelayout.quickstart.PageTemplateFlowLayout.configure(PageTemplateFlowLayout.java:60)
      at oracle.adfdtinternal.view.rich.addin.plugin.ADFFacesJsfWizardExtension.postNodeCreationHook(ADFFacesJsfWizardExtension.java:251)
      at oracle.adfdtinternal.view.rich.addin.plugin.ADFFacesJsfWizardExtension.postJSPCreationHook(ADFFacesJsfWizardExtension.java:150)
      at oracle.jdevimpl.webapp.jsp.AbstractJspFileBuilderModel.postProcessNode(AbstractJspFileBuilderModel.java:95)
      at oracle.jdevimpl.webapp.jsp.taglibraries.jsf.JsfJspFusionWizard$JsfJspFileBuilderModel.postProcessNode(JsfJspFusionWizard.java:465)
      at oracle.jdevimpl.webapp.wizards.AbstractWebAppFileBuilderModel.postProcess(AbstractWebAppFileBuilderModel.java:121)
      at oracle.jdeveloper.builder.AbstractBuilderModel.addFileToProject(AbstractBuilderModel.java:278)
      at oracle.jdeveloper.builder.AbstractBuilderModel.commitWizardState(AbstractBuilderModel.java:225)
      at oracle.jdevimpl.webapp.fusion.wizards.AbstractWebAppFileWizard$4.run(AbstractWebAppFileWizard.java:192)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:642)
      at java.awt.EventQueue.access$000(EventQueue.java:85)
      at java.awt.EventQueue$1.run(EventQueue.java:603)
      at java.awt.EventQueue$1.run(EventQueue.java:601)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:612)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
      at java.awt.Dialog$1.run(Dialog.java:1046)
      at java.awt.Dialog$3.run(Dialog.java:1098)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.awt.Dialog.show(Dialog.java:1096)
      at java.awt.Component.show(Component.java:1585)
      at java.awt.Component.setVisible(Component.java:1537)
      at java.awt.Window.setVisible(Window.java:842)
      at java.awt.Dialog.setVisible(Dialog.java:986)
      at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:395)
      at oracle.bali.ewt.dialog.JEWTDialog.runDialog(JEWTDialog.java:356)
      at oracle.ide.dialogs.ProgressBar.start(ProgressBar.java:352)
      at oracle.ide.dialogs.ProgressBar.start(ProgressBar.java:243)
      at oracle.ide.dialogs.ProgressBar.start(ProgressBar.java:215)
      at oracle.jdevimpl.webapp.fusion.wizards.AbstractWebAppFileWizard.doFinish(AbstractWebAppFileWizard.java:93)
      at oracle.jdevimpl.webapp.fusion.wizards.AbstractWebAppWizard.invoke(AbstractWebAppWizard.java:151)
      at oracle.ide.wizard.WizardManager.invokeWizard(WizardManager.java:372)
      at oracle.ide.wizard.WizardManager$1.run(WizardManager.java:420)
      at oracle.ide.util.IdeUtil$3.run(IdeUtil.java:1089)
      at oracle.javatools.util.SwingUtils.invokeAfterRepaint(SwingUtils.java:509)
      at oracle.ide.util.IdeUtil.invokeAfterRepaint(IdeUtil.java:1102)
      at oracle.ide.wizard.WizardManager$2.run(WizardManager.java:428)
      at oracle.ide.util.IdeUtil$3.run(IdeUtil.java:1089)
      at oracle.javatools.util.SwingUtils.invokeAfterRepaint(SwingUtils.java:509)
      at oracle.ide.util.IdeUtil.invokeAfterRepaint(IdeUtil.java:1102)
      at oracle.ide.wizard.WizardManager.invokeSecondaryWizard(WizardManager.java:424)
      at oracle.ide.gallery.ObjectGallery.invokeWizard(ObjectGallery.java:383)
      at oracle.ide.gallery.ObjectGallery.runDialog(ObjectGallery.java:204)
      at oracle.ide.gallery.ObjectGallery.runDialog(ObjectGallery.java:124)
      at oracle.ide.gallery.ObjectGalleryAddin._invokeGallery(ObjectGalleryAddin.java:405)
      at oracle.ide.gallery.ObjectGalleryAddin.handleEvent(ObjectGalleryAddin.java:208)
      at oracle.ide.controller.IdeAction.performAction(IdeAction.java:529)
      at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:897)
      at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:501)
      at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
      at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
      at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
      at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
      at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
      at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
      at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)
      at java.awt.Component.processMouseEvent(Component.java:6289)
      at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
      at java.awt.Component.processEvent(Component.java:6054)
      at java.awt.Container.processEvent(Container.java:2041)
      at java.awt.Component.dispatchEventImpl(Component.java:4652)
      at java.awt.Container.dispatchEventImpl(Container.java:2099)
      at java.awt.Component.dispatchEvent(Component.java:4482)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
      at java.awt.Container.dispatchEventImpl(Container.java:2085)
      at java.awt.Window.dispatchEventImpl(Window.java:2478)
      at java.awt.Component.dispatchEvent(Component.java:4482)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
      at java.awt.EventQueue.access$000(EventQueue.java:85)
      at java.awt.EventQueue$1.run(EventQueue.java:603)
      at java.awt.EventQueue$1.run(EventQueue.java:601)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
      at java.awt.EventQueue$2.run(EventQueue.java:617)
      at java.awt.EventQueue$2.run(EventQueue.java:615)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Nov 1, 2013 3:31:07 AM oracle.adfdtinternal.view.rich.metadata.ADFFacesMetadataMethods
    WARNING: Can't find resource for bundle oracle.adfdtinternal.view.rich.resource.AFUTaglibBundle, key GRID_CELL
    Nov 1, 2013 3:31:07 AM oracle.adfdtinternal.view.rich.metadata.ADFFacesMetadataMethods
    WARNING: Can't find resource for bundle oracle.adfdtinternal.view.rich.resource.AFUTaglibBundle, key CODE_EDITOR
    Nov 1, 2013 3:31:07 AM oracle.adfdtinternal.view.rich.metadata.ADFFacesMetadataMethods getShortDescription
    WARNING: Can't find resource for bundle oracle.adfdtinternal.view.rich.resource.AFUTaglibBundle, key PANEL_GRID_LAYOUT
    Nov 1, 2013 3:31:07 AM oracle.adfdtinternal.view.rich.metadata.ADFFacesMetadataMethods
    WARNING: Can't find resource for bundle oracle.adfdtinternal.view.rich.resource.AFUTaglibBundle, key GRID_ROW
    Nov 1, 2013 3:31:07 AM oracle.adfdtinternal.view.rich.metadata.ADFFacesMetadataMethods
    WARNING: Can't find resource for bundle oracle.adfdtinternal.view.rich.resource.AFUTaglibBundle, key LIST_VIEW
    Nov 1, 2013 3:31:07 AM oracle.adfdtinternal.view.rich.metadata.ADFFacesMetadataMethods
    WARNING: Can't find resource for bundle oracle.adfdtinternal.view.rich.resource.AFUTaglibBundle, key LIST_ITEM
    Nov 1, 2013 3:31:15 AM oracle.adfdtinternal.view.rich.metadata.ADFFacesMetadataMethods
    WARNING: Can't find resource for bundle oracle.adfdtinternal.view.rich.resource.AFUTaglibBundle, key GRID_CELL
    Nov 1, 2013 3:31:15 AM oracle.adfdtinternal.view.rich.metadata.ADFFacesMetadataMethods
    WARNING: Can't find resource for bundle oracle.adfdtinternal.view.rich.resource.AFUTaglibBundle, key CODE_EDITOR
    Nov 1, 2013 3:31:15 AM oracle.adfdtinternal.view.rich.metadata.ADFFacesMetadataMethods
    WARNING: Can't find resource for bundle oracle.adfdtinternal.view.rich.resource.AFUTaglibBundle, key PANEL_GRID_LAYOUT
    Nov 1, 2013 3:31:15 AM oracle.adfdtinternal.view.rich.metadata.ADFFacesMetadataMethods
    WARNING: Can't find resource for bundle oracle.adfdtinternal.view.rich.resource.AFUTaglibBundle, key GRID_ROW
    Nov 1, 2013 3:31:15 AM oracle.adfdtinternal.view.rich.metadata.ADFFacesMetadataMethods
    WARNING: Can't find resource for bundle oracle.adfdtinternal.view.rich.resource.AFUTaglibBundle, key LIST_VIEW
    Nov 1, 2013 3:31:15 AM oracle.adfdtinternal.view.rich.metadata.ADFFacesMetadataMethods
    WARNING: Can't find resource for bundle oracle.adfdtinternal.view.rich.resource.AFUTaglibBundle, key LIST_ITEM
    I hope this bug?.
    if it is bug i h've a question.? one of my collegue project pagetemplate created using jdev11.1.1.6.0 consuming the template in all jspx page it working fine till now.
    I tired the same jdev11.1.1.7.0 "unexpected error throwing". even though i ignore the error. In some case pagetemplate is affecting all my pages.some other case it is not..
    Thanks.

    Hi,
    What means "try to invoke that in all my .jspx."
    i re-phrase in another words i have pagetemplate. i'm trying to apply the template in my jspx page.
    In detail, After creation of template. while i'm trying to creating the jspx page in the Intial Page Layout and content i choose my template radiobox. after hitting ok. the above log prints in message tab.
    i hope that i make it more clear.
    Page based on that template does not work ?.
    yes.

  • PageTemplates error while developing

    Hi all.
    Sometimes when i'm developing WebCenter Portal Applications. JDeveloper crash with:
    SEVERE:
    java.lang.NullPointerException
         at oracle.webcenter.portal.dt.config.PortalConfigUtil.getPageTemplateFromConfig(PortalConfigUtil.java:69)
    After the exception when i create a new JSPX Page ins't selectable my registered templates and all pages that includes <af:pageTemplate> says that can't resolve pageTemplate. However, it runs at Runtime.
    Is there any solution other than creating a new WebCenter Portal Application project?. Why crash getting adf-config for default page template?.
    Thanks.
    Edited by: Daniel Merchán on 07-nov-2011 14:29

    This happens sometimes - I don't know why ?
    But resolution is -
    check few points -
    1)The first time you use the wizard to create a JSF page template in a project, JDeveloper automatically creates the pagetemplate-metadata.xml file, which is placed in the /ViewController/src/META-INF directory in the file system. For webcenter application ,you can find pagetemplate-metadata.xml at Application Sources/META-INF directory.-------Check whether pagetemplate-metadata.xml is present or not ?
    2)For each page template that you define using the wizard, JDeveloper creates a page template definition file (for example, sampleTemplateDef1.jspx), and adds an entry to the pagetemplate-metadata.xml file.- ---------check whether pagedef is created or not ?
    3)check whether the entry for your page template is present in pagetemplate-metadata.xml or not. Like -
    <?xml version="1.0" encoding="US-ASCII" ?>
    <pageTemplateDefs xmlns="http://xmlns.oracle.com/adf/faces/rich/pagetemplate">
    <pagetemplate-jsp-ui-def>/oracle/webcenter/portalapp/pagetemplates/pageTemplate_custom.jspx</pagetemplate-jsp-ui-def>
    <pagetemplate-jsp-ui-def>/sampleTemplateDef1.jspx</pagetemplate-jsp-ui-def>
    <pagetemplate-jsp-ui-def>/sampleTemplateDef2.jspx</pagetemplate-jsp-ui-def>
    <pagetemplate-jsp-ui-def>/oracle/webcenter/portalapp/pagetemplates/pageTemplate_globe.jspx</pagetemplate-jsp-ui-def>
    <pagetemplate-jsp-ui-def>/oracle/webcenter/portalapp/pagetemplates/pageTemplate_swooshy.jspx</pagetemplate-jsp-ui-def>
    </pageTemplateDefs>
    4)If you selected the page template as default template for your application then check it in ADF META-INF/adf-config.xml file.
    <portal:preference id="oracle.webcenter.portalapp.pagetemplate.pageTemplate"
    desc="Default Page Template"
    value="/oracle/webcenter/portalapp/pagetemplates/pageTemplate_custom.jspx"
    resourceType="Template" display="true"/>
    Hope ,the problem will be resolved .
    Regards,
    Hoque

  • How to get af:column in the bean using findComponent

    Hi
    I am getting null if I find the component using id in the bean. The component does exist in the JSP though. Can someone tell me how it can be done please? I am trying to set the header text in the bean.
    <af:panelCollection id="pc1" inlineStyle="width:900px;">
                        <f:facet name="menus"/>
                        <f:facet name="toolbar"/>
                        <f:facet name="statusbar"/>
                            <af:table value="#{bindings.Invoice.collectionModel}"
                                      var="row" rows="#{bindings.Invoice.rangeSize}"
                                      emptyText="#{bindings.Invoice.viewable ? 'No data to display.' : 'Access Denied.'}"
                                      fetchSize="#{bindings.Invoice.rangeSize}"
                                      rowBandingInterval="0"
                                      selectedRowKeys="#{bindings.Invoice.collectionModel.selectedRow}"
                                      selectionListener="#{bindings.Invoice.collectionModel.makeCurrent}"
                                      rowSelection="single" id="invoiceTable">
                              <af:column sortProperty="OrganizationName"
                                         sortable="true"
                                         headerText="#{bindings.Invoice.hints.OrganizationName.label}"
                                         id="c16">in the bean
          RichColumn crdWrtRfncolumn = (RichColumn)context.getViewRoot().findComponent("c26");
          if(crdWrtRfncolumn != null){
            log.info(">>>>> Column 2 " + ((RichColumn)context.getViewRoot().findComponent("c16")).getId());
           crdWrtRfncolumn.setHeaderText(crdWrtRfndamountColumnLabel);
        

    I refered
    http://kr.forums.oracle.com/forums/thread.jspa?threadID=970889 and it is resolved.

  • AdfActionEvent and AdfPage.PAGE.findComponent not working - Sample Provided

    Ladies and Gents,
    Using JDev 11.1.2.3.0.
    I just can't get this simple example to work.  On page load, I'm calling ADF's find component by id method, which for some reason, returns null.  I can do the same thing by using javascript's getElementById and that finds the component just fine.  However, if I use the getElementById and then push that into the AdfActionQueue, I get a different error 'Error: Object doesn't support property or method 'queueEvent''
    Can anyone see off-hand what I'm doing wrong here?
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
        <jsp:directive.page contentType="text/html;charset=UTF-8"/>
        <f:view>
            <af:document title="home.jspx" id="d1">
                <af:form id="f1">
                    <af:commandButton text="commandButton 1" id="myRefreshButton" action="#{myBean.onAction}"/>
                </af:form>
                <af:resource type="javascript" source="/resources/js/jqPlot/jquery.min.js"/>
                <af:resource type="javascript" source="/resources/js/jqPlot/jquery.jqplot.min.js"/>
                <af:resource type="javascript" source="/resources/js/jqPlot/plugins/jqplot.canvasTextRenderer.min.js"/>
                <af:resource type="javascript" source="/resources/js/jqPlot/plugins/jqplot.canvasAxisLabelRenderer.min.js"/>
                <af:resource type="javascript" source="/resources/js/jqPlot/plugins/jqplot.dragable.min.js"/>
                <af:resource type="css" source="/resources/js/jqPlot/jquery.jqplot.min.css"/>
                <af:resource type="javascript">
                  function doClick() {
                      var clientId = 'myRefreshButton'; // id of the button in the page's HTML code
                      // This returns null
                      // var button = AdfPage.PAGE.findComponent(clientId);
                      // button is found but then receive error
                      var button = document.getElementById(clientId);
                      AdfActionEvent.queue(button, true);
                  $(document).ready(function () {
                      doClick();
                </af:resource>
            </af:document>
        </f:view>
    </jsp:root>

    Hi Frank,
    I agree manipulating the DOM directly is generally bad (I've watched those training videos!), but after doing some decent searching (with quite a bit of trial and error) I'm not sure there exists a purely ADF way of achieving a solution.
    Inside of a region, I have a master (Companies) and a child (Orders) table relationship.  Within the same region, I also have a charting tool which displays the monthly order totals of the selected company.  A customer can select a company and see the related monthly orders in the orders table along with a graph showing the visual sales.  If I were using ADF DVTs, this would be pretty straightforward, but I am not.  To get this to work then, I have a few obstacles.
    1) On jsff load, the chart must initialize with the displayed monthly order data.
    2) On new customer select, the chart must refresh with the newly displayed order data.
    The easiest way to update the chart would be to hook into the orders table component and, whenever the shown data refreshes or initializes, also refresh the chart.  However, I'm not sure where the hook is located for that so I'm back to my two obstacles.
    For the first obstacle, ADF does not (to my knowledge) have an "on jsff load" option so I'm stuck with jquery's load and corresponding id lookup functions.  In my case, that load function looks for a hidden output text component's value whose getter returns the order table row's current monthly data.  This is somewhat of a hack that, in effect, calls a managed bean method from javascript.  Now that I have that data, I can input that into my chart and refresh.
    For the second obstacle, I simply hook into the customer table's selection listener and after the current row is updated, retrieve the order table's current monthly data, refresh chart, etc.
    The question I asked is a simplified version of overcoming the two obstacles above and while my jquery $('#myRefreshButton')[0] is extremely brittle, it was only meant as a quick demonstration.  One could make it less brittle by iterating through the returned array, making sure the desired element contained any regions / naming containers and had the myRefreshButton portion at the end of the id string.
    What would be the desired ADF way of achieving this result?  Do you do something with your Data Visualization Tools that might be applicable here?  Is there a way to hook into the child table and refresh my chart any time child table refreshes or initializes?

  • AdfPage.PAGE.findComponent FAILED with WebCenter

    Dear all,
    I have to get in javascript a component with id="pdfBtn"
    BUT I have to set the parameter r1:0:pdfBtn => AdfPage.PAGE.findComponent('r1:0:pdfBtn')
    It works when I develop a task flow and manage by myself, but it failed when I add this into WebCenter the ID change.
    Any Idea?
    Thanks

    Have you tried
    AdfPage.PAGE.findComponentByAbsoluteId('pdfBtn')Timo

  • AdfPage.PAGE.findComponent method usage

    I have a function.js file which has the showMap() function. I am trying to display something using the AdfPage.PAGE.findComponent method which keeps returning undefined for any component I try to find from the js file. What am I doing wrong? Is it because I am finding the component before page loading. Please advise
    function.js file
    function showMap() {
    alert(AdfPage.PAGE.findComponent('f1'));
    baseURL = "http://"+document.location.host+"/mapviewer";
    var mapCenterLon = 145.07;
    var mapCenterLat = -37.57;
    var mapZoom = 1;
    mapview = new MVMapView(AdfPage.PAGE.findComponent('map'), baseURL);
    //var map = AdfPage.PAGE.findComponent("map");
    //mapview = map.getMVMapView();
    mapview.addMapTileLayer(new MVMapTileLayer("gis_data.AV_VICMAP"));
    mapview.setCenter(MVSdoGeometry.createPoint(mapCenterLon,mapCenterLat,4283));
    mapview.setZoomLevel(mapZoom);
    mapview.addNavigationPanel("WEST");
    showOverviewMap();
    addThemeBasedFOI();
    mapview.display();
    JSPX file
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:trh="http://myfaces.apache.org/trinidad/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    xmlns:dvt="http://xmlns.oracle.com/dss/adf/faces">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1" binding="#{backingBeanScope.mapsBean.d1}">
    <f:facet name="metaContainer">
    <af:group id="g3" binding="#{backingBeanScope.mapsBean.g3}">
    <trh:script id="script1" source="/jslib/oraclemaps.js"
    binding="#{backingBeanScope.mapsBean.script1}"/>
    <trh:script id="script2" source="/jslib/functions.js"
    binding="#{backingBeanScope.mapsBean.script2}"/>
    <trh:script text='' id="script3"
    binding="#{backingBeanScope.mapsBean.script3}"/>
    </af:group>
    </f:facet>
    <af:form id="f1" binding="#{backingBeanScope.mapsBean.f1}">
    <af:panelStretchLayout id="psl1" topHeight="5px" bottomHeight="115px"
    endWidth="373px"
    binding="#{backingBeanScope.mapsBean.psl1}">
    <f:facet name="bottom">
    <af:panelBox text="Watch Options" id="pb1"
    binding="#{backingBeanScope.mapsBean.pb1}">
    <f:facet name="toolbar"/>
    <af:selectBooleanCheckbox label="Auto Refresh"
    id="sbc2"
    binding="#{backingBeanScope.mapsBean.sbc2}"/>
    <af:selectBooleanCheckbox label="Show Vehicle Locations"
    id="sbc1"
    binding="#{backingBeanScope.mapsBean.sbc1}"/>
    <af:commandButton text="Refresh Now"
    id="cb1"
    partialSubmit="true"
    binding="#{backingBeanScope.mapsBean.cb1}"/>
    </af:panelBox>
    </f:facet>
    <f:facet name="center">
    <af:panelGroupLayout layout="scroll"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    id="pgl1"
    binding="#{backingBeanScope.mapsBean.pgl1}">
    <af:group id="g1" binding="#{backingBeanScope.mapsBean.g1}">
    <dvt:mapToolbar mapId="map"
    id="mt1"
    binding="#{backingBeanScope.mapsBean.mt1}"/>
    <dvt:map startingY="-36.88" startingX="145.26" mapZoom="1"
    mapServerConfigId="mapConfig1"
    baseMapName="GIS_DATA.AV_VICMAP"
    inlineStyle="width:100%; height:793px;"
    id="map" binding="#{backingBeanScope.mapsBean.map}">
    <f:facet name="rtPopup"/>
    <f:facet name="popup"/>
    </dvt:map>
    </af:group>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="end">
    <af:panelBox text="List Vechicles"
    id="pb2" binding="#{backingBeanScope.mapsBean.pb2}">
    <f:facet name="toolbar"/>
    <af:inputText label="Area Code"
    id="it1"
    binding="#{backingBeanScope.mapsBean.it1}"/>
    <af:inputText label="Vehicle Number"
    id="it2"
    binding="#{backingBeanScope.mapsBean.it2}"/>
    <af:commandButton text="Search"
    id="cb2"
    binding="#{backingBeanScope.mapsBean.cb2}"/>
    </af:panelBox>
    </f:facet>
    </af:panelStretchLayout>
    </af:form>
    <af:clientListener type="load" method="showMap()" />
    </af:document>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:mapsBean-->
    </jsp:root>
    Edited by: user5108636 on 29/04/2010 18:22

    It is now detecting the map component, but the map object retrieved in the javascript seems to a new object. I had set the srid and ceterX and centerY.
    In my javascript, I do
    var map = AdfPage.PAGE.findComponent('map');
    mapview = map.getMVMapView();
    alert("Zoom:"+ mapview.getZoomLevel());
    alert("Srid:"+ mapview.getSrid());
    alert("CenterX:"+ mapview.getPointX());
    alert("CenterY:"+ mapview.getPointY());
    where the map object parameters are already set in the ADF page, which is not reflecting. I am not getting access to the same map
    object. My javascript method runs on page load. Is it because the javascript method is getting called before the ADF map object exists.
    dvt:map id="map" startingX="145.26"
    mapServerConfigId="mapConfig1"
    baseMapName="GIS_DATA.MAP" mapZoom="1"
    startingY="-36.88" unit="METERS"
    inlineStyle="width:100%; height:793px;" srid="4283"
    />
    Let me know if any more code needs to be posted for clarification.
    Regards
    Edited by: user5108636 on 9/05/2010 19:20

  • To find the popup root from pagetemplate in adf..

    Dear,
    I'm using jdev11g.
    In my project having pagetemplate, inside the template i'm adding favorite menu like IE favorite with same functionalities.
    Is there any possiblities to find the pagetemplate Id, which will use to find the popup. i want to avoid page overwrite. OR can set the pagetemplate id dynamically
    Now i'm using the popup with two button(add and cancel).
    while clicking the add button, if the page is already added in favorite, i want to show one more popup to get the confirmation from the user. In the second popup having two button(ok and cancel).
    if the user click ok, it will overwrite,
    if click cancel the page should not overwrite. For this case, instead of second popup, i'm using javascript confirm() method. but it is overwrite, while click the cancel button.
    can any one help me.
    Thanks in advace
    Regards,
    Rengaraj
    Edited by: user11129216 on Jul 8, 2009 11:19 PM

    Hi,
    can you try setting the ComponentVar attribute on the template definition (e.g. "mytemplate")
    You can then access the template instance from Java
    private RichPageTemplate getTemplateHandle(){
      FacesContext fctx = null;
      fctx = FacesContext.getCurrentInstance();
      ELContext elctx  = fctx.getELContext();
      Application app = fctx.getApplication();
      ExpressionFactory elFactory = null; 
      elFactory = app.getExpressionFactory();
      ValueExpression valueExpr = null;   
      valueExpr  = elFactory.createValueExpression(
                   elctx,
                   "#{mytemplate}",
                   Object.class);
      RichPageTemplate template =
        (RichPageTemplate) valueExpr.getValue(elctx);
      return template;
    }You should be able to get the id of this instance in Java and make it available to your popup search
    Frank

  • Popup with information message in pageTemplate

    Hi all.
    It's a mixed question about ADF and WebCenter but i think it's an ADF Issue.
    Scenario:
    - Page Template with an af:popup.
    - Page Style base of my ADF Pages.
    I have next goal:
    I have an af:popup in Page Template that i want to invoke during page load. In page style (where is af:document...) i'm able to launch popup during "load". However i need to do all in Page Template.
    Is there any way to invoke af:popup in a pageTemplate render? ADF Javascript... etc... .
    Is there any way to show easily contextual information in Page Template when all page is loaded?.
    My enviroment information is:
    - Oracle WebCenter Portal : Spaces PS5 (11.1.1.6).
    - ADF 11.1.1.6
    Thanks.
    Regards.

    You could also try the approach mentioned in the forum thread:
    How to use Javascript in template
    Thanks,
    Navaneeth

  • IllegalArgumentException in findComponent

    Hi,
    I get following exception when i try to find a component. I have an af:selectOneRadio with id="questionRadio". It is inside iterator tag and so it generates id like "_id90:0:_id98:0:questionRadio:_0".
    Here is the code to i use in my managed bean: context.getViewRoot().findComponent("_id90:0:_id98:0:questionRadio:_0")
    Here is the exception.
    Caused by: java.lang.IllegalArgumentException
         at oracle.adf.view.faces.component.UIXComponentBase.findComponent(UIXComponentBase.java:420)
         at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:545)
         at mccs.risk.view.audit.website.WebsiteAudit.save(WebsiteAudit.java:191)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
    Let me know what am i doing wrong.
    --Chintan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
    When i tried finding component with just id "questionRadio", it returned null.
    What also i found is that when i removed the first underscore "_", it didn't raised the exception but still it didnt find the component. Is that it does not like underscore to start with?
    --Chintan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • FindComponent() in client doesnot always work in firefox

    in the adf page, there is a commandImageLink and a showdetail component.
    the showdetail is not disclosed by default when page loaded. after click the commandImageLink ,then make the showdetail disclosed through javascript in client.
    adf code is like this:
    <af:commandImageLink id="gil0"
    partialSubmit="true">
    <af:clientListener method="init" type="click"/>
    </af:commandImageLink>
    <af:showDetail id="viewSD" disclosed="false" visible="true" clientComponent="true">
    </af:showDetail>
    javascript code:
    function init(event) {
    var src = event.getSource();
    var showDetail = src.findComponent("viewSD");
    if (showDetail != null) {
    if (showDetail.getDisclosed() == false) {
    showDetail.setDisclosed(true);
    but the problem is this code doesn't always work in Firefox.
    in the javascript init(event) function, the src.findComponent("viewSD") will return null sometimes, but sometimes it works.
    is this because the showDetail component may not be rendered completely when try to find it through javascript?
    but it seems always works in chrome and ie.
    any ideal?
    thanks!
    -ken

    Hi,
    it should work as in IE and Chrome because the JS objects are created the same. If this continues reproducing, please file a bug with customer services for the dev team to track the issue. I assume you tried JDeveloper 11.1..4
    Frank

  • FindComponent(..)  problem. -repost.

    I'm posting this issue again as a separate thread as the subject was little off the topic.
    <original post>:
    I went through the JavaDocs but still could not figure out how findComponent really works. Here's an example:
    <f:view>
    <h:form id="Home" >
    <xx:comp1 id="id1" ...>
    <xx:comp2 parentID="id1"/>
    </xx:comp1>
    where comp1 and comp2 are two custom components. Now I'd like comp2 to find out about comp1 and hence the parentID attribute. In comp2 i've code like this:
    facesContext.getViewRoot().findComponent( parentID ); where parentID is the string containing the id value of comp1 as shown above.
    However I get null.
    The reason I'm doing this is to be able to have alternate jsp syntax for these components, something like this:
    <f:view>
    <h:form id="Home" >
    <xx:comp1 id="id1" .../>
    <xx:comp2 parentID="id1"/>
    I guess this is the same approach as <h:message for="blah".. /> and any of the nested component tags like <h:selectmany.. >
    <f:selectitem...>
    </h:selectmany..>
    Maybe I'm misunderstanding some fundamental concepts about referencing other components in the same tree. Can someone please enlighten me on this?
    Thanks - AM
    Re: Accessing an UIComponent object from a .java
    Author: w.drai
    In Reply To: Re: Accessing an UIComponent object from a .java Apr 18, 2004 7:36 PM
    Reply 6 of 8
    You should call findComponent from the comp2 component itself : comp2.findComponent(parentId)
    If you call findComponent from the viewRoot, you have to supply the whole component path (i.e. with all the NamingContainers). In your example, that would "Home:id1".
    Re: UIComponent.findComponent(..) -- help!
    Author: arun_manta
    In Reply To: Re: Accessing an UIComponent object from a .java Apr 19, 2004 8:47 AM
    Reply 7 of 8
    You should call findComponent from the comp2 component
    itself : comp2.findComponent(parentId)
    If you call findComponent from the viewRoot, you have
    to supply the whole component path (i.e. with all the
    NamingContainers). In your example, that would
    "Home:id1".Thanks for your reply, but this doesnt work either. - It still returns null. I have tried the following cases:
    Comp2.findComponent(parentId) from Comp2 tag handler -----> returns null.
    Comp2.findComponent(parentId) from Comp2 (decode, encodeEnd etc.. ) -----> returns null.
    Comp2.findComponent("Home:"+parentId) -- returns null.
    However this works:
    call getParentUIComponentTag() from Comp2 tag -> which returns me the Comp1 tag handler.
    call getComponentInstance() on the Comp1 tag handler -> returns the Comp1 component.
    ( Now I have the parent component ) but this restricts us to using nested tags only.
    AM
    Re: UIComponent.findComponent(..) -- help!
    Author: arun_manta
    In Reply To: Re: UIComponent.findComponent(..) -- help! Apr 19, 2004 9:45 AM
    Reply 8 of 8
    You should call findComponent from the comp2component
    itself : comp2.findComponent(parentId)
    If you call findComponent from the viewRoot, youhave
    to supply the whole component path (i.e. with allthe
    NamingContainers). In your example, that would
    "Home:id1".Thanks for your reply, but this doesnt work either. -
    It still returns null. I have tried the following
    cases:
    Comp2.findComponent(parentId) from Comp2 tag
    handler -----> returns null.
    Comp2.findComponent(parentId) from Comp2
    (decode, encodeEnd etc.. ) -----> returns null.
    Comp2.findComponent("Home:"+parentId) -- returns null.
    However this works:
    call getParentUIComponentTag() from Comp2 tag -> which
    returns me the Comp1 tag handler.
    call getComponentInstance() on the Comp1 tag handler
    -> returns the Comp1 component.
    ( Now I have the parent component ) but this restricts
    us to using nested tags only.
    AMOops. well this one works:
    Comp2.findComponent("Home:"+parentId)
    but then I have to know the form ID within the component. Also if I do not specify the form Id in the jsp, i.e.
    <h:form>
    </h:form> I have the same problem.

    Really strange. We use findComponent(id) in some custom renderers with no problem.
    Is comp2 the UIComponent or the UIComponentTag in your examples ?
    If this is the tag handler, you could try comp2.getComponentInstance().findComponent(parentId)

  • FindComponent using relative naming container

    I am unable to locate a component in an actionListener method using relative notation. The page uses templates and regions, so I'm wondering if that is part of my problem.
    Here are the absolute paths of the two components:
    :templatePage:region1:templateFragment:netIdInput
    :templatePage:region1:templateFragment:panelCollection1:createInsertButton'createInsertButton' is the actionSource and I want to find the 'netIdInput' component.
    In the handler method this works:
    UIComponent netIdComponent = event.getComponent().findComponent(":templatePage:region1:templateFragment:netIdInput");but I can't get any relative paths to work, such as:
    UIComponent netIdComponent = event.getComponent().findComponent("::netIdInput");Does anyone have a suggestion, or know if the use of templates causes findComponent() to behave differently?

    Hi,
    try
    AdfPage.PAGE.findComponent()
    to start your serach from the root
    Frank

Maybe you are looking for

  • Adobe bridge wont show my .orf files

    ok, I have updated to the last version of adobe bridge, I have the last light room plugin for photoshop and still wont work, I mean, I only see the icons of the .orf files in bridge, but it just won't show all the metadata neither the thumbnails!!! t

  • MDM Archiving Error

    We are trying to archive a repository on our MDM instance and we receive the following error: $$$ Operation ended in ERROR : 84020008H : Database binary object error. I then went on to check the repository and got this 1 warning: $$$ Warning(1329): T

  • How do I resolve a 412 error?

    When trying to delete a Calendar, I get the following error from iCloud: 412 to operation CalDAVCalendarSplitDualTypeCalendarQueueableOperation

  • New Subscription issue

    I just signed up for 3 month subscription, and it is not showing up in my account. I am new to Skype, and concerned. I was trying to figure out how to cancel it before 3 months are up. I do not want it to automatically renew, but I followed the direc

  • Classic Freezing & OSX Illustrator crash with error 37

    Recently forced into using Tiger as the newest G5's will no longer run 10.3.9. We use 2 classic applications, but these are freezing the whole machine at random intervals - causing the power button to be held to restart the machine (Tiger completely