Forum Stats

  • 3,872,032 Users
  • 2,266,366 Discussions
  • 7,911,029 Comments

Discussions

Using regions on custom components (facets)

LCabaco
LCabaco Member Posts: 66
edited Dec 4, 2018 7:37AM in JDeveloper and ADF

Hello guys,

I've been working with custom components lately. And i have custom components with two facet areas.

One of the facets is a child of the component, and the second faced is inside a popup, on the custom component too.

It seems that i can not render the popup childs when passing a region to the faced, but when i place UI components (button as example) it works as expected.

It's not a problem of the region because I've placed the popup facet content on the root facet content and works as expected.

Any idea why direct components are rendered but the regions are not ?

Best regards,

Luís cabaço

Best Answer

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,894 Red Diamond
    edited Nov 24, 2018 10:23AM Answer ✓

    Have you tried to run the popup outside the declarative component with the region?

    Does it work there?

    If yes I assume that this is one of the cases you can't implement using declarative components.

    Timo

Answers

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,894 Red Diamond
    edited Nov 22, 2018 4:23AM

    Can you tell us more about how you build the pop-up inside the custom component?

    Can be a problem with the point in time the pop-up is rendered.

    Timo

  • LCabaco
    LCabaco Member Posts: 66
    edited Nov 22, 2018 5:24AM

    Hello Timo,

    This is the code i use inside the custom component:

              <af:popup autoCancel="disabled" id="widgetPopup" animate="false"

                               contentDelivery="immediate">

                <af:dialog id="d1" type="none" closeIconVisible="false">

                    <af:panelStretchLayout id="dc_psl2" dimensionsFrom="parent">

                        <f:facet name="top">

                            <af:panelGridLayout id="pgl42">

                                <af:gridRow marginTop="0px" height="100%" marginBottom="0px" id="gr25">

                                    <af:gridCell marginStart="0px" width="50%" marginEnd="0px" id="gc41"

                                                 valign="middle" halign="start">

                                        <af:panelGroupLayout id="pgl17" layout="vertical"

                                                             inlineStyle="margin-left: 20px;">

                                            <af:outputText value="#{attrs.title}" id="ot12"/>

                                        </af:panelGroupLayout>

                                    </af:gridCell>

                                    <af:gridCell marginStart="0px" width="50%" marginEnd="0px" id="gc42"

                                                 valign="middle" halign="end">

                                        <af:button id="b1" partialSubmit="true" immediate="true"

                                                   styleClass="icon icon-close"

                                                   actionListener="#{widgetBean.closePopupListener}"/>

                                    </af:gridCell>

                                </af:gridRow>

                            </af:panelGridLayout>

                        </f:facet>

                        <f:facet name="center">

                            <af:facetRef facetName="settings"/>

                        </f:facet>

                    </af:panelStretchLayout>

                </af:dialog>

            </af:popup

    I've tried with several combinations of "child creation" and "content delivery" but none seems to work for the region component.

    As i said before, it works perfectly with direct components on the facet (example: button or output text) .

    The second facet (outside this popup) works perfectly with the region i'm trying to place inside the popup, so I think it's not a problem with the region itself.

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,894 Red Diamond
    edited Nov 24, 2018 10:23AM Answer ✓

    Have you tried to run the popup outside the declarative component with the region?

    Does it work there?

    If yes I assume that this is one of the cases you can't implement using declarative components.

    Timo

  • LCabaco
    LCabaco Member Posts: 66
    edited Dec 3, 2018 4:26AM

    Hello Timo,

    I've done some popups with regions on the application without issues.

    I think that you are right, and the regions inside Popup on custom component simply doesn't work.

    Thanks for the help!

    Best regards,

    Luís Cabaço