Issue invoking Popup as Declarative component on mouseHover

Hi,
My use case is to show a popup and display some more details on the Popup on mouseHover on a tree of Links. (Something similar to tooltip but little more advanced)
Since this Popup is reused in many UIs, I created a Declarative component (DC).
Unfortunately when I try to link this declarative component to the <af:showPopupBehavior of a link component, id of the DC is not recognized as a valid "popupId"?
<af:showPopupBehavior popupId="infoPopup" triggerType="mouseHover"/>
Kindly let me know if there's a work around or any alternate ways to achieve this.
Thanks in advance,
Paskal Sanil

Hi,
try declarativecompid:popupid
like
<af:showPopupBehavior popupId="declarativeCompId:infoPopup" triggerType="mouseHover"/>Else you can use javascript to open popup manually using client listener.
http://sameh-nassar.blogspot.in/2010/02/javascript-functions-sample.html
Regards,
Edited by: Santosh Vaza on Aug 8, 2012 12:36 PM

Similar Messages

  • Declarative component stops working after taskflow-call-in-popup

    Hi!
    JDev 11.1.1.3.0
    I need a component, much like the commandToolbarButton, but I have the requirement that the user should still be able to select from the popup even if the button is disabled.
    So I created a declarative component, combining two buttons and a popup with a menu in a panelGroupLayout. The one button, the mainButton, actually executes the action, the other (with an icon only) opens a menu in a popup.
    The user selects an item from the popup, the component then PPRs the main button in code to display the user's choice in the main buttons text.
        <af:panelGroupLayout layout="horizontal" id="${component.id}_layout">
          <af:commandToolbarButton id="mainButton" text="#{component.mainButtonText}"
                                   clientComponent="true" disabled="#{!component.enabled}"
                                   partialSubmit="true"
                                   actionListener="#{component.mainButtonPressed}"/>
          <af:commandToolbarButton id="menuButton" icon="/images/arrowDownComboBox.png"
                                   partialSubmit="true" disabled="#{!component.enabled}">
            <af:showPopupBehavior alignId="mainButton" align="afterStart" popupId="commandPopup"/>
          </af:commandToolbarButton>
          <af:facetRef facetName="extensionButton"/>
          <af:popup id="commandPopup" contentDelivery="lazyUncached" childCreation="immediate"
                    clientComponent="true">
            <af:menu id="commandMenu" clientComponent="true" binding="#{component.commandMenu}"/>
          </af:popup>
        </af:panelGroupLayout>That works fine ... until the user opens a taskflow in a popup.
    I have a bounded taskflow, jspx-based, opened by a button with an action that navigates to a taskflow-call activity in a modal dialog. The user opens the taskflow, does what needs to be done, then closes the dialog.
    Still fine.
    But, after the dialog has closed, when the user selects an item from the popup menu of my declarative component, I suddenly get an NPE:
    <26.04.2011 19:07 Uhr MESZ> <Notice> <Stdout> <BEA-000000> <<RegistrationConfigurator><handleError> Server Exception during PPR, #1
    java.lang.NullPointerException: UIComponent is null
         at org.apache.myfaces.trinidad.component.UIXComponent.addPartialTarget(UIXComponent.java:498)
         at org.apache.myfaces.trinidadinternal.context.RequestContextImpl.addPartialTarget(RequestContextImpl.java:513)
         at com.ge.med.web.components.button.CommandComboButton.refreshMainButton(CommandComboButton.java:213)
         at com.ge.med.web.components.button.CommandComboButton.setSelectedCommand(CommandComboButton.java:177)
         at com.ge.med.web.components.button.CommandComboButton.commandItemPressed(CommandComboButton.java:243)
         at com.ge.med.web.components.button.CommandComboButton.processAction(CommandComboButton.java:129)
         at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)To track the problem down, I have pointed the binding attribute of the declarative component to a property in a session-scoped bean, to see what the component looks like that is set, what the children and grand children are, and who the parent is.
    This prints:
    <26.04.2011 19:07 Uhr MESZ> <Notice> <Stdout> <BEA-000000> <Setter called: DemoComboButtonComponent[oracle.adf.view.rich.component.fragment.UIXInclude$ContextualFacesBeanWrapper@1762a87, id=demoAdd]>
    <26.04.2011 19:07 Uhr MESZ> <Notice> <Stdout> <BEA-000000> <Parent: RichPanelGroupLayout[UIXFacesBeanImpl, id=cbll1]>
    <26.04.2011 19:07 Uhr MESZ> <Notice> <Stdout> <BEA-000000> <Children: [RichPanelGroupLayout[UIXFacesBeanImpl, id=demoAdd_layout]]>
    <26.04.2011 19:07 Uhr MESZ> <Notice> <Stdout> <BEA-000000> <Grand kids: [RichCommandToolbarButton[UIXFacesBeanImpl, id=mainButton], RichCommandToolbarButton[UIXFacesBeanImpl, id=menuButton], RichPopup[UIXFacesBeanImpl, id=commandPopup]]> That's fine. But when I add the same debug code to my setSelectedCommand() method (which is called when the user selects an item from the popup's menu), I get:
    <26.04.2011 19:07 Uhr MESZ> <Notice> <Stdout> <BEA-000000> <I am: DemoComboButtonComponent[oracle.adf.view.rich.component.fragment.UIXInclude$ContextualFacesBeanWrapper@ba2b1c, id=demoAdd]>
    <26.04.2011 19:07 Uhr MESZ> <Notice> <Stdout> <BEA-000000> <My Parent: null>
    <26.04.2011 19:07 Uhr MESZ> <Notice> <Stdout> <BEA-000000> <My Children: []> The empty children property explains the NPE. This NPE only happens when the user selects an item from the popup after the dialog has closed.
    Debugging showed that the new DemoComboButtonComponent is created during the restoration of (tree) state after the closing of the modal dialog. But why has it no parent? And where are the kids?
    Could the binding of the declaratice component to a session-scoped bean be the problem? Somehow prevent the state mechanism from re-building the UI component tree correctly?
    I am at the end of my wits.
    Any help is appreciated!
    Sascha

    Hi Frank,
    no, not yet. I had the feeling that it's me who is doing something wrong. Declarative components are pretty common, right? So are taskflow calls in dialogs. Someone should have noticed if there's a bug in the framework, right?!
    But I changed the scope of the bean (to backing scope and request scope) that the declarative component is bound to and I still get the error.
    I will try to create a simpler test case, and if I can reproduce with that, then I will file a bug, if there's no one that can explain the phenomenon.
    Sascha

  • Invoking popup component programmatically

    Hi
    I am invoking popup component programmatically for that
    i have a link
    i have added a popup componet inside the af|form (for eg:popup id=p3) and bind the popup to a managed bean with name popup
    In the Action property of my commandlink, i have invoked a method in the managed bean( for eg.the method caller() )
    In my bean class i have used:-
    public class classname{
    private RichPopup popup;
    public void setPopup(RichPopup popup) {
    this.popup = popup;
    public RichPopup getPopup() {
    return popup;
    public String caller() {
    showPopup(popup, null);
    return null;
    public static void showPopup(RichPopup popup, UIComponent component) {
    FacesContext context = FacesContext.getCurrentInstance();
    String alignId = (component==null) ? null : component.getClientId(context);
    StringBuilder script = new StringBuilder();
    script.append("var popup = AdfPage.PAGE.findComponent('").append("p3").append("'); ")
    .append("if (!popup.isPopupVisible()) { ")
    .append("var hints = {}; ");
    if (alignId!=null) {
    script.append("hints[AdfRichPopup.HINT_ALIGN_ID] = '").append(alignId).append("'; ")
    .append("hints[AdfRichPopup.HINT_ALIGN] = AdfRichPopup.ALIGN_AFTER_END; ");
    script.append("popup.show(hints);}");
    ExtendedRenderKitService erks = Service.getService(context.getRenderKit(), ExtendedRenderKitService.class);
    erks.addScript(context, script.toString());
    But in my page when i clicked the link it doesnot invoke the popup component....
    am i missing with something......... please help
    Thanks
    sudeep

    yeah i even tried to call the "showPopup(popup, null);" from the actionlistener of the commandlink but no invoke........
    as u suggested http://ifelix.blogspot.com/2010/11/how-to-invoke-popup-component.html i followed this ........
    and my jsff
    <af:column sortProperty="contractFileName" sortable="false" id="c10"
    headerText="Contract File Name" width="166">
    <af:commandLink text="#{row.bindings.contractFileName.inputValue}"
    id="cl2" partialSubmit="true"
    actionListener="#{selContractName.OnClickOfContract}"
    binding="#{selContractName.conName}"
    action="#{selContractName.caller}">
    </af:commandLink>
    </af:column>
    Edited by: SKD on Sep 12, 2011 7:02 PM

  • 11.1.2: Declarative-component problem!

    Hi!
    We're just evaluating 11.1.2. I converted some declarative components to 11.1.2/Facelets style, but I am running into problems.
    As a test, I created some new components from scratch, confirming the issue.
    I create a declarative component and choose "Facelets" and choose "Use custom component class".
    JDeveloper then creates an entry in the jsf:
            <afc:component>
                <afc:display-name>testComponent</afc:display-name>
                <afc:component-class>component.TestComponent</afc:component-class>
                <afc:facet>
    ....After deployment, I just get an error. Facelets is reporting that there is no tag for "component-class", and examining component.taglib.xml in adf-richclient-impl-11.jar shows: Facelets is right! There is none!
    Now, I cannot just remove the component-class entry. If I do that, then deployment works, but then JDeveloper creates during compilation a wrong "TestComponentComponent" class (which should extend TestComponent but doesn't!).
    It just extends RichDeclarativeComponent, just like my original TestComponent class. All code in TestComponent is not available at runtime.
    RichDeclarativeComponent
       |
       |
    TestComponent    <---- This class is now for the birdsand
    RichDeclarativeComponent
       |
       |
    TestComponentComponent      <----- That class is used by the handlerIf I leave the component-class entry in, then - as expected - I get the correct hierarchy:
    RichDeclarativeComponent
       |
       |
    TestComponent
       |
       |
    TestComponentComponentbut the component doesn't run.
    So, now what? This cannot be the way it's supposed to work, can it. Manually edit the "component-class" stuff out of the jsf in the jar after deployment!?
    Edit: Created SR 3-3856944401: Facelets-based declarative component with custom component class not working
    Sascha
    Edited by: Sascha Herrmann on Jun 17, 2011 6:41 PM

    This is bug 12717940.
    Sascha

  • JDeveloper 11.1.2.3, ADF Faces: need declarative component idea for table

    Some background:
    I'm trying to create a reusable toolbar for standard af:table behavior, see screen shot
    http://wesfang.files.wordpress.com/2013/05/dc.jpg
    I got the idea from the from using documentation Frank has published in the past
    1. http://www.oracle.com/technetwork/developer-tools/adf/learnmore/001-access-declarative-comp-attr-169113.pdf
    2. Adding a new row programatically
    The consuming subsystem's page passes in a "MyPageBean" which is a subclass of a "ArchBean" where all actionlistener operations are defined. The idea here is to minimize developer customization when using this component.
    ... <f:facet name="toolbar">             <af:toolbar id="t2">                 <mskcc:basicTransactionToolbar id="btt1" pageBean="#{MyPageBean}" tableId="t1"/>             </af:toolbar> </f:facet> ...
    The table within the consuming page is by default dropped off as a "editable" table. The developer needs to further modify the "disable" attribute to true for all the input fields and command components within the table. I would like to remove this developer step and instead have it in an architectural component. All ideas are welcome.

    Ok, finally got it working (sort of)
    Using the following method as you suggested:
    public void encodeChildren(FacesContext fc){
            try {          
                super.encodeChildren(fc);
                RichTable table =
                    (RichTable)ADFFacesUtil.findComponentInRoot((String)this.getAttributes().get("tableId"));
                lockUnlockTable(table); //method for toggling disable attribute for all command and input components
            } catch (IOException e) {
                e.printStackTrace();
    }Now the strange problem I encountered is that the encode methods are not called if the declarative component is defined within a panelCollection's f:facet-toolbar like below:
    <f:facet name="toolbar">
                        <mskcc:basicTransactionToolbar id="btt1" tableId="t1" pageBean="#{TestBean}"/>
    </f:facet>Also the above code has to be manually created because the design time editor does not allow me to drop off the dc within the toolbar facet (even though the dc is a toolbar!)
    Instead, If I move the dc outside the panelcollection, then the encode methods are invoked and the desired enable/disable behavior is correctly displayed.

  • ADF:LOV declarative component not working inside table component.

    Hi,
    I have created a custome LOV control,I am using this custom LOV control inside the table component,I am passing the below values as the parameter
    KeyValue="#{row.bindings.Value.inputValue}"
    LovModel="#{row.bindings.Value.listOfValuesModel}"
    Value- is the list of value attribute.
    When i click on the LOV search icon, the popup displays the Query model(it displays the list name at the top in the search page.so it is able to recognise the LOVmodel) but it is not able to retrive the list values.I am getting Query page with no values
    in the jspx page it is giving warning as "reference not found for row.bindings.Value.listOfValuesModel"
    Please can anyone help me on this?
    Thanks,
    Harish

    Hi Frank,
    below is my actual requirement and the solution i tried till now.
    I have a table and it has two columns let’s say “Columns” and “Values”. The first column i.e. “Columns” will be a dropdown and it will have predefined values, the other column “Values” will be a “List of value” control or similar kind of control in which the user can search and select multiple values from the popup list, and that list should dynamically bounded to the first column selected value.
    For Ex: if I select a value “Product” from the dropdown of the first column “Columns” , the control in the other column “Values” should bound to “product” list and I should be able to search and select multiple values from the pop up. And the popup should return the multiple selected values as a comma separated string to the textbox.
    In my requirement I have to use only VO’s to create the list and the control in the “Values” column should switch between these VO’s depending on the value selected in the first column.
    The solution we tried till now.
    I used a LOV switcher to achieve the above requirement. But we have a limitation in this approach as we could not do the multi select. Then we created a declarative LOV component in which we can select multiple values as a comma separated string from the popup.
    I retained the LOV switch model , instead of binding LOV switch model to the basic “Input List of Value” control in the JSPX page ,I used the LOV declarative component. Below is the code snippet which calls the declarative LOV component from JSPX page.
    <af:panelFormLayout id="pfl2">
    <af:selectOneChoice value="#{bindings.Columns.inputValue}"
    label="#{bindings.Columns.label}"
    required="#{bindings.Columns.hints.mandatory}"
    shortDesc="#{bindings.Columns.hints.tooltip}"
    id="soc3" autoSubmit="true">
    <f:selectItems value="#{bindings.Columns.items}" id="si5"/>
    </af:selectOneChoice>
    <mc:OraMultiSelect
    KeyValue="#{bindings.Value.inputValue}"
    LovModel="#{bindings.Value.listOfValuesModel}"
    id="oms2"/>
    </af:panelFormLayout>
    Where Value attribute is having LOVModel.
    The above code perfectly fine as I used it inside the “Form layout” and with the parameters passed as KeyValue="#{bindings.Value.inputValue}"
    LovModel="#{bindings.Value.listOfValuesModel}"
    The problem I am facing:
    The actual problem comes when I use this control inside the table which I required in my implementation.
    I called the declarative LOV control as shown below inside the table as I used to call the basic “Input List of value” control which works fine inside the table.
    . <af:column sortProperty="Value" sortable="false"
    headerText="#{bindings.OpPlanning1.hints.Value.label}"
    id="c1" width="133">
    <mc:OraMultiSelect KeyValue="#{row.bindings.Value.inputValue}"
    LovModel="#{row.bindings.Value.listOfValuesModel}"
    id="oms1"/>
    </af:column>
    Above code doesn’t works fine when I select value from the “Column” dropdown it displays the corresponding list model in the pop up but not able to retrieve the value of the list in the popup .
    If I pass the parameters as
    . <af:column sortProperty="Value" sortable="false"
    headerText="#{bindings.OpPlanning1.hints.Value.label}"
    id="c1" width="133">
    <mc:OraMultiSelect KeyValue="#{bindings.Value.inputValue}" --instead of ="#{row.bindings.Value.inputValue}"
    LovModel="#{bindings.Value.listOfValuesModel}"--}" --instead of ="#{row.bindings.Value.inputValue}"
    id="oms1"/>
    </af:column>
    It works fine for the first row.The subsequent rows refers the value selected in the first row dropdown.
    Thanks For the help,
    Harish
    Edited by: 886523 on Nov 3, 2011 8:04 AM

  • Declarative Component : UploadedFile Isssue for multiple file Upload case.

    Hi,
    I have made one declarative component for the multiple file upload case; where i have add button that dynamically adds af:inputFile component to the popup dialog and similarly delete button to dynamically delete the selected inputFile component. Everything work fine such as:
    1. add button adds the inputfile component properly and delete does the same.
    2. upload of Multiple files also works fine. ( I keep the uploadedFile in the java.util.Map which is the pageFlowScope and once, Dialog box ok/cancel is clicked, i clear everything back).
    IT WORKS GREAT WHEN:
    User hit 5 times add button if they want to upload 5 images. and do upload for all the 5 inputFile components . (Add or Delete button should not be clicked after any upload , but before you can.)..
    THE ONLY PROBLEM IS WHEN:
    1. user uploaded; say 2 images but not yet clicked in the ok/cancel button yet... they are still in the upload dialog ..and hit ADD button again.
    2. After that user uploads say another file/image and now UploadedFile's getInputStream() returns null, length becomes 0 for all the other uploadedFile except this newly uploaded file.
    Now, here is the thing, i wrote my own customUplodedFile class which is just a wrapper and it return getInputStream() from this class and length from this class and it is working.... But i am not sure why does the uploadedFile loses it's value...
    import org.apache.myfaces.trinidad.model.UploadedFile;
    public interface ICustomUploadedFile
      extends Serializable, UploadedFile
      public String getFilename();
      public String getContentType();
      public long getLength();
      public Object getOpaqueData();
      public InputStream getInputStream();
      public void dispose();
    ====================
    public class CustomUploadedFile
      implements ICustomUploadedFile, Serializable
      private transient UploadedFile mUploadedFile;
      private transient InputStream mInputStream;
      private long mLength;
      public CustomUploadedFile()
      public CustomUploadedFile(UploadedFile pUploadedFile)
        this.mUploadedFile = pUploadedFile;
        this.mLength = pUploadedFile.getLength();
        try
          this.mInputStream = pUploadedFile.getInputStream();
        catch (IOException e)
          e.printStackTrace();
      public String getFilename()
        return mUploadedFile.getFilename();
      public String getContentType()
        return mUploadedFile.getContentType();
      public long getLength()
        return mLength;
      public Object getOpaqueData()
        return mUploadedFile.getOpaqueData();
      public InputStream getInputStream()
        return mInputStream;
      public void dispose()
        mUploadedFile.dispose();
    } Now, my questions are:
    1. Is there a way i could follow to not to lose the UploadedFiles's inputStream and length by not using my wrapper class but in a standard way/best way.
    2. I am not happy although it works because it is not making sense to me at all.....Why does the wrapper working though when i have transient variables; like UploadedFiles... and it's transient variables are lost why not mine.
    I am totally confused at this stage.. Need your help.
    Thanks

    any one??

  • Unable to read view Id of Declarative Component from "var" of af:iterator

    Hi,
    I am facing a weird issue where when i assign "var" of af:iterator to the view Id of declarative component, it is saying "<DynamicIncludeTag> <getViewId> Encountered null from the viewId expression: #{row}"
    And Page is showing blank.
    My JSPX code is as follows :
    <af:iterator value="#{pageFlowScope.stageBean.pathList}" var="row">
    <af:outputText value="#{row}" id="ot1"/>
    <af:declarativeComponent viewId="#{row}"/>
    </af:iterator>
    And code snippet for getter in Java bean is as follows:
    public List<String> getPathList()
    List<String> pathList = new ArrayList<String>();
    pathList.add("/Test.jspx");
    return pathList;
    The weird thing here is output text is printing the path /Test.jspx but declarative component is not recognizing it. Its showing blank page and in logs, error says "Encountered null from the viewId expression: #{row}"
    If i remove #{row} from viewId and manually give like viewId = "/Test.jspx" , its displaying the page correctly.
    Can anyone please help me solve this issue?
    Regards,
    Rakesh.

    http://stackoverflow.com/questions/12183735/adf-unable-to-read-view-id-of-declarative-component-from-var-of-afiterator

  • Dynamic Declare Component cannot find property

    We currently have one main page calls a DDC(Dynamic declarative component) page fragment to create/update a record in database. The main page pass in a key to DDC when it loads DDC. The DDC binds to a view object with bind variable (get value from the passed key and load data from table) and several LOV attributes. Once user clicks submit button in main page, we wish that all the fields displayed in DDC could be committed to a database table to save.
    I use 11.1.1.5.
    In order to assign the bind variable of VO, we wrote a method in Application Module and make it invoked as the first executable when the main page is loaded. The deployment is fine. However, the runtime always thrown some exception to complain it cannot find property definition like this:
    ####<Aug 15, 2011 6:32:24 PM CDT> <Warning> <oracle.adfinternal.view.faces.lifecycle.LifecycleImpl> <curmailts1-corp> <AdminServer> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <6b1af60b3a40d50a:-6c52e935:131cfc2d522:-8000-000000000000024c> <1313451144494> <BEA-000000> <ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase RENDER_RESPONSE 6
    javax.el.PropertyNotFoundException: Target Unreachable, 'WorkDescription' returned null
         at com.sun.el.parser.AstValue.getTarget(Unknown Source)
         at com.sun.el.parser.AstValue.isReadOnly(Unknown Source)
         at com.sun.el.ValueExpressionImpl.isReadOnly(Unknown Source)
         at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer._getUncachedReadOnly(EditableValueRenderer.java:486)
         at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.cacheReadOnly(EditableValueRenderer.java:416)
         at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.beforeEncode(LabeledInputRenderer.java:128)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:334)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
    Questions: 1) Why my method in Application Module not called?
    2) Whether DDC is a right solution for our use case? Any suggestion or sample are welcomed!
    Thanks,

    Hi,
    I appreciate if you can show your code, but before that, make sure if you're following this tip below:
    "Declarative Components are regular JSF components except that they are built as a composite out of existing ADF Faces components. Declarative components cannot have a PageDef file associated with it and instead use value or method attribute to communicate with the consuming page. When creating a declarative component, the attrs implicit object is defined that allow you to reference the component's exposed value attribute from ADF Faces components within.
    An input text field contained in an declarative component may reference a value attribute "compValue" defined on the declarative component by using the following EL
    #{attrs.compValue}
    The declarative component compValue attribute then would us an EL reference like shown next to read/write values from or to the ADF binding layer:
    #{bindings.attribute_name.inputValue}"
    (Oracle ADF Code Corner)
    Regards,

  • Declarative component - data getting vanished

    Hi, Greetings.
    In our application we have a declarative component to display some common information and is used across the screens.
    The declarative component is binded with a view object to display data.
    All our screens are of bounded taskflow kind and each taskflow's property are set to use new transaction always and not to share data controls.
    Using breadcrum, we have implemented a workflow to navigate to next few screens.
    In this scenario, while navigating forward from one screen to another screen, everything works as exprected. So far, so good.
    But, while navigating back to any previous screen, the declarative component data is missing initially. The declarative component's data gets displayed once we perform some full page submission using some action buttons or in case any validation message gets popped up.
    I checked the program flow and the data to the declarative component's view object is getting executed and data is available at model layer.
    I also tried refreshing the component through my bean after performing an initial activity method call.
    Nothing works out.
    How can I make the declarative component display the records during initial launch of the screen.
    Any help in this regards is greatly appreciated.
    Thanks and regards,
    Guru K

    Hi, Greetings.
    The problem is with refreshing the iterator. On providing refreshCondition property for the iterator in the corresponding pagedef file as well as for the UI component, the issue got resolved.
    Thanks and regards,
    Guru K

  • Error while saving changes of declarative component to MDS

    Hi,
    Using ADF Faces 11gR1PS1.
    I am trying to create a declarative component where user can close a panel box (not just minimize) by setting rendered property to false. It works fine.
    Next I tried to save the attribute change to MDS so that user settings are preserved across sessions. However I got the following error:
    <FilteredPersistenceChangeManager><_getQualifiedTagName> WebAppDesignContext is not available at application scope. Please ensure that your application is built as a 'Fusion Web Application (ADF)', and that taglib.jar and facesconfigmodel.jar are in class path.
    <FilteredPersistenceChangeManager><_isChangeAllowedThroughPersistentChangeManager> Could not obtain tag name for the component being changed. Component ref: RichPanelBox[UIXFacesBeanImpl, id=dc_pb2]
    <FilteredPersistenceChangeManager><_addDocumentChangeImpl> The DocumentChange is not configured to be allowed for the component: RichPanelBox[UIXFacesBeanImpl, id=dc_pb2]Following is the page code:
              <af:panelBox text="#{attrs.p2Header}" id="dc_pb2"
                           rendered="#{attrs.p2Header ne null and dashboardXBean.portletRendered.dc_pb2}"
                           showDisclosure="false">
                <af:componentDragSource discriminant="portlet"/>
                <f:facet name="toolbar">
                  <af:commandImageLink id="p_cil2"
                                       icon="/images/removeselected_dwn.png"
                                       hoverIcon="/images/removeselected_ovr.png"
                                       depressedIcon="/images/removeselected_ena.png"
                                       actionListener="#{dashboardXBean.handleHideEvent}"
                                       rendered="#{attrs.sideNavRendered}">
                    <f:attribute name="portletId" value="dc_pb2"/>
                  </af:commandImageLink>
                </f:facet>
                <af:facetRef facetName="p2"/>
              </af:panelBox>Following is the code in the managed bean to persist changes:
        private void saveShowHideChange(String portletId, boolean isRendered) {
            FacesContext fc = FacesContext.getCurrentInstance();
            ChangeManager cm = RequestContext.getCurrentInstance().getChangeManager();
            //ChangeManager pcm = AdfFacesContext.getCurrentInstance().getPersistentChangeManager();
            UIComponent puc = boundedDashboard.findComponent(portletId);
            ComponentChange pcc = new AttributeComponentChange("rendered", Boolean.toString(isRendered));
            cm.addComponentChange(fc, puc, pcc);
        }I am not really sure if the above code needs to be in the component managed bean or in the bean of the page that uses this declarative component.
    Any pointers are appreciated.
    Thanks,
    Husain

    Thanks for the reply Frank.
    For declarative components do we have separate renderer?
    The [Developers Guide|http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/ad_persist.htm#BABBGCJA] didnt seem very helpful on this topic.
    Can you point me to some reference material if available.
    Thanks,
    Husain

  • JDeveloper 11.1.2.3, ADF Faces: declarative component does not support af:clientListener?

    I am trying to create a declarative component with the following code:
    <?xml version='1.0' encoding='UTF-8'?>
    <af:componentDef xmlns:af="http://xmlns.oracle.com/adf/faces/rich" var="attrs" componentVar="comp" definition="private"
                     xmlns:afc="http://xmlns.oracle.com/adf/faces/rich/component">
        <af:xmlContent>
            <afc:component>
                <afc:display-name>DoubleClickTableDialogClientServerListener</afc:display-name>
                <afc:component-extension>
                    <afc:component-tag-namespace>org.mskcc.crdb.common.declarativecomponent</afc:component-tag-namespace>
                    <afc:component-taglib-uri>http://www.mskcc.org</afc:component-taglib-uri>
                </afc:component-extension>
            </afc:component>
                <af:clientAttribute name="serverListenerType" value="TableDoubleClickEvent"/>
                <af:clientListener method="handleTableDoubleClick" type="dblClick"/>
                <af:serverListener type="TableDoubleClickEvent"
                                   method="#{EditAddDialogTemplateBean.handleTableDoubleClick}"/>
        </af:xmlContent>
    </af:componentDef>
    At runtime I recieve the following error:
    javax.faces.view.facelets.FaceletException: ADF_FACES-60023:Component: DoubleClickTableDialogClientServerListenerComponent[oracle.adf.view.rich.component.fragment.UIXInclude$ContextualFacesBeanWrapper@7170a7, id=dctdcsl1] does not support client listeners.
      at oracle.adfinternal.view.faces.facelets.rich.BaseClientListenerHandler.apply(BaseClientListenerHandler.java:53)
    This component was intended to be dropped off within an af:table component. I would like to hear suggestions on workarounds, one other way I thought about was to create a code template for the three tags, however, the con to this approach is each developer would need to configure this template within jdeveloper. Ideas are appreciated.
    Also a side question, how can I embed code properly with the new forum? [code] tag does not seem to work now.

    Wes, can't help with the real question, but can tell you how to format code
    Change to the advanced editor (top right over the editor field), then you get more options. The one you are looking for is behind the blue '>>'. Here you select the language you want to insert and you get nice code formatting and color.
    Timo

  • Error in accessing attributes of a declarative component in BackinBeanScope

    Hello,
    I'm using JDeveloper 11.1.1.4.0.
    For pagination we have created a declarative component. It's bean when in request scope works fine when the dec.comp. is used in page only once.
    In order to use it multiple times in the same page, I changed the scope to BackingBeanScope. It works fine the first time bean's method gets called. However on the next request, I'm getting NullPointerException when it tries to access the dec. comp's attribute.
    Why am I getting this error and how to correct it?
    As an alternative, we can store the attribute value received first time in a hidden form field and retrieve it every subsequent time. But this would be my last alternative.
    Appreciate a reason and a better way to resolve this.
    Regards,
    Amar

    Hi,
    Yes. The bean is declared in the dec. comp.
    Following is the code in my bean's c'tor:
    FacesContext fc                    = FacesContext.getCurrentInstance();
    ELContext elctx                    = fc.getELContext();
    ExpressionFactory elFactory    = fc.getApplication().getExpressionFactory();
    ValueExpression valueExpr      = elFactory.createValueExpression(elctx, "#{component}", UIXDeclarativeComponent.class);
    UIXDeclarativeComponent currDeclarativeComp            = (UIXDeclarativeComponent)   valueExpr.getValue(elctx);
    String currVOObjectName                                         = currDeclarativeComp.getAttributes().get("VOObject").toString();"VOObject" is the attribute name for the dec. comp. It's getting correct value the first time. Every subsequent time,the last line throws null pointer exception.
    Regards,
    Amar

  • Embedding a declarative component written in JSF 1.2 in a jsf page

    Hi ,
    I have a declarative component written in JSF 1.2 . I want to embed this declarative component in an ADF application which is using JSF 2.0.
    On creating a jspx page in JSF 2.0 & embedding decalrative component it just works fine but I have to embed it in a JSF page instead , which is not working.
    Any suggestions ?
    Thanks
    Vinit

    Hi,
    for JDeveloper 11g R2 you will need to know before whether the application you build uses JSPX page documents or Facelets. The technologies are different (introduced with JSF 2) and declarative components thus need to be build for the document type used by teh application
    Frank

  • Creating Declarative Component problem.

    Dear all
    I use Jdeveloper 11.1.1.4.0.
    I am planing to create an ADF declarative Component.The component will be a panel collection layout which contains menu (Action>Export to excel) and command button (Add new record).
    The scenario will be like this:
    1- The developer will drag my new component (myCustomPanel) to his page and will drag the data control inside this comonent to create ADF Read only table.
    2- at runtime the table should appear surrounded by (myCustomPanel) and the user can use the "Action" menu to export the content to Excel, and can click on "Add new Record"to navigate to another page to add record.
    The solution I made is:
    in my "myCustomPanel" I created two attributes , the first one is "tableID" and the second is "targetPage" represents the outcome of the navigation to the "Add new record" page.
    The developer must provide these two attributes when using "myCustomPanel".
    The problem is:
    at runtime when the user click on "Add new record" button an error is raised .
    The error in this line:
    <af:commandToolbarButton text="Add" id="dc_ctb1" action="#{attr.targetPage}"/>
    the action property of the command button expects a managed bean. But i proved it with page attribute.
    I want to dynamicly provides the naviation outcome to the button using attribute name. Is this possible?
    regards

    Thank you so much for you replying.
    Your solution is helpful
    I tried to do the following :
    1- in my "customcomponent" project I removed the attribute "taregtPage"
    2- I added a method attribute
    name: targetPage
    method-signature: java.lang.String method()
    <af:componentDef var="attrs" componentVar="component">
        <af:panelCollection id="collection">
          <f:facet name="menus">
            <af:menu text="Action" id="dc_m1">
              <af:commandMenuItem text="Export To excel" id="dc_cmi1"/>
            </af:menu>
          </f:facet>
          <f:facet name="toolbar">
            <af:toolbar id="dc_t1">
              <af:commandToolbarButton text="Add" id="dc_add"
                                       action="#{attrs.targetPage}"/>
            </af:toolbar>
          </f:facet>
          <f:facet name="statusbar"/>
          <af:facetRef facetName="tableContent"/>
        </af:panelCollection>
        <af:xmlContent>
          <component xmlns="http://xmlns.oracle.com/adf/faces/rich/component">
            <display-name>dhamanTable</display-name>
            <facet>
              <facet-name>tableContent</facet-name>
            </facet>
            <attribute>
              <attribute-name>tableID</attribute-name>
              <attribute-class>java.lang.String</attribute-class>
              <required>true</required>
            </attribute>
            <component-extension>
              <component-tag-namespace>dhaman.custom</component-tag-namespace>
              <component-taglib-uri>/componentLib</component-taglib-uri>
              <method-attribute>
                <attribute-name>targetPage</attribute-name>
                <method-attribute>
                  <attribute-name>targetPage</attribute-name>
                  <method-signature>java.lang.String method()</method-signature>
                </method-attribute>
                <required>false</required>
              </method-attribute>
            </component-extension>
          </component>now My question is how to use it?
    I do not understand this
    action="#{component.handleTargetPage}" Do you mean that i will create amanaged bean "component" and add a methos "handleTargetPage"??
    Edited by: ta**** on Mar 9, 2011 1:58 PM
    Edited by: ta**** on Mar 9, 2011 2:00 PM
    Edited by: ta**** on Mar 9, 2011 2:01 PM

Maybe you are looking for