How getValue of a declarative component

jdev12.1.3

My declarative component drop-down list looks like the following. According to unique attribute is FALSE, it will choose to use component selectManyListBox or selectOneListBox.

I also defined a value attribute for my conponentDef from the drop-down list. I want to be able to retrieve the selected values of the listBox and use it on the calling page.

I'm confused about the use of the attribute value in componentDef. My question is how to access the value selected the component of this drop-down list of the calling page?

" < = xmlns:af af:componentDef ' http://xmlns.Oracle.com/ADF/faces/rich "var ="uploading"componentVar ="dropListComp"definition"private"= "

' xmlns:afc = ' http://xmlns.Oracle.com/ADF/faces/rich/component "xmlns:f =" http://Java.Sun.com/JSF/Core ">

< af:xmlContent >

< afc:component >

< afc:description / >

< afc:display - name > drop < / afc:display - name >

< afc:component - class >glog.fusion.common.otmcomponents.DropList< / afc:component - class >

< afc:attribute >

< afc:attribute - name > queryClassName < / afc:attribute - name >

< afc:attribute - class > java.lang.String < / afc:attribute - class >

< afc: required > true < / afc: required >

< / afc:attribute >

< afc:attribute >

< afc:attribute - name > displayLabel < / afc:attribute - name >

< afc:attribute - class > java.lang.String < / afc:attribute - class >

< afc: required > true < / afc: required >

< / afc:attribute >

< afc:attribute >

< afc:attribute - name > single < / afc:attribute - name >

< afc:attribute - class > java.lang.Boolean < / afc:attribute - class >

< afc: required > true < / afc: required >

< / afc:attribute >

< afc:attribute >

< afc:attribute - name >value< / afc:attribute - name >

< afc:attribute - class > java.lang.String < / afc:attribute - class >

< / afc:attribute >

< afc:component - extension >

< afc:component - tag-namespace > glog.fusion.common.otmcomponents < / afc:component - tag-namespace >

< afc:component - taglib-uri > http://www.GLOG.com/OTM < / afc:component - taglib-uri >

< / afc:component - extension >

< / afc:component >

< / af:xmlContent >

< af:panelLabelAndMessage label = "#{attrs.displayLabel}" id = "dc_plam1" > "

< af:switcher id = "dc_s1" defaultFacet = "a lot" facetName = "#{attrs.single eq 'true'?' unique ': 'a lot'}" >

< f: facet name = "a lot" >

< af:selectManyListbox id = "selectManyListBox_DropList" simple = 'true '.

value = "#{uploading." "Value}" binding = "#{dropListComp.selectManyListBox}" autoSubmit = 'true' valueChangeListener = "#{dropListComp.selectManyValueChange}" >

< / af:selectManyListbox >

< / f: facet >

< f: facet "single" = name >

< af:selectOneListbox id = "selectOneListBox_DropList" simple = "true" label = "#{attrs.queryClassName} '"

autoSubmit Binding = "#{dropListComp.selectOneListBox}" = "true" valueChangeListener = "#{dropListComp.selectOneValueChange}" > "

< / af:selectOneListbox >

< / f: facet >

< / af:switcher >

< / af:panelLabelAndMessage >

< / af:componentDef >

In my jsf calling page, I got the following text. The field properly. I don't know what I should spend in the value attribute, or how to get the selected value from the ListBox control.

"< otm:dropList displayLabel ="MyuShipmentTypeDropList"value ="? »

queryClassName = "glog.server.query.shipment.ShipmentTypeQuery" unique = "false" id = "dl1"

Binding = "#{ShipmentFinderTest.dropList}" / >

Thank you.

Hello

Create a bean managed with a property and a pair of getter/setter and use EL #{managedBean.propertyName} to reference the value property.

Frank

Tags: Java

Similar Questions

  • How to use the declarative component without deployed as JAR

    Hi all
    I want to create a reusable component (declarative component) for PanelHeader with default features packed in I want to use in my application. Because this component will be used only in my project, I don't see a use to go through the process of creating a jar and deploying it before using it. Is it possible to use this component without creating a JAR.

    Thank you
    -Srini.

    User 895137,

    your welcome to ignore the best practices in the development of the ADF. The declarative elements are deployed in the libraries of the ADF. If you keep the declarative component in the application then project you will have a chance to deploy independent of the application (which means that your ADF library contain more than just the source of the component (which is where your nightmare begins)). Therefore, best practices

    1. create the declarative component in a new project in JDeveloper. Follow

    http://download.Oracle.com/docs/CD/E21764_01/Web.1111/b31973/af_reuse.htm#BABJBFDD

    2. If you don't ant to deploy components in a tag library, use declarative dynamic components (will not deploy-able in many applications, as you mentioned your future plan is), as shown here

    http://download.Oracle.com/docs/CD/E21764_01/apirefs.1111/e12419/tagdoc/af_declarativeComponent.html
    http://download.Oracle.com/docs/CD/E21764_01/apirefs.1111/e12419/tagdoc/af_componentDef.html
    http://download.Oracle.com/docs/CD/E21764_01/apirefs.1111/e12419/tagdoc/af_xmlContent.html

    Frank

  • Question about the use of the custom component class define what declarative component

    12.1.3 jdev

    I'm trying to define a declarative component with my custom component class.

    This is the code for my component jsf declarative. I'm trying to use the label on selectManyListbox attribute to pass queryClass for my component class name. It does not work. I also try to use f: attribute to my component class. It does not work too. Question 1: how to move my declarative component attribute to my class of component?

    < af:panelLabelAndMessage label = "#{attrs.displayLabel}" id = "dc_plam1" > "

    < af:switcher id = "dc_s1" defaultFacet = "a lot" facetName = "#{attrs.single eq 'true'?' unique ': 'a lot'}" >

    < f: facet name = "a lot" >

    < af:selectManyListbox id = "namingp1" simple = "true" label = "#{attrs.queryClass}" "

    ' autoSubmit Binding = "#{dropListComp.selectManyListBox}" = "true" valueChangeListener = "#{dropListComp.selectManyValueChange}" >

    < f: attribute name = "queryClass" value = "#{attrs.queryClass}" / >

    < / af:selectManyListbox >

    < / f: facet >

    < f: facet "single" = name >

    < af:selectOneListbox id = "sl_2" simple = "true" label = "#{attrs.queryClass} '"

    autoSubmit Binding = "#{dropListComp.selectOneListBox}" = "true" valueChangeListener = "#{dropListComp.selectOneValueChange}" > "

    < / af:selectOneListbox >

    < / f: facet >

    < / af:switcher >

    < / af:panelLabelAndMessage >

    That's how I try to retrieve the label or f: attribute queryClass in my component class. I get null for both directions.

    {} public void setSelectManyListBox (RichSelectManyListbox selectManyListBox)
    this.selectManyListBox = selectManyListBox;
    If (this.selectManyListBox.getChildCount () == 0) {}
    queryClass = (String) this.selectManyListBox.getLabel ();
    System.out.println (".. queryClass of the label..." + queryClass);
    If (queryClass is nothing)
    {
    queryClass = (String) this.selectManyListBox.getAttributes () .get ("queryClass");
    System.out.println (".. queryClass of attr..." + queryClass);
    }
    If (queryClass is nothing)
    queryClass = "glog.server.query.powerdata.InvolvedPartyQualQuery";
    this.selectManyListBox.getChildren () .addAll (buildDropListSelectItems (queryClass));
    }
    }

    Thank you.

    Hello

    If your declarative component has a defined class of request attribute then #{attrs.name_of_attribute} called from Java should be able to solve

    Frank

  • How to conditionally bind the declarative component custom ADF ADF Faces

    Hi gurus,

    I created the custom declarative component called "Historical Record", following the article of Frank Nimphus Oracle ADF Code corner: How to bind custom declarative ADF Faces components and it works perfectly find.

    But I want to strengthen further to make more generic, as in Oracle EBS we can go to all the blocks and choose Tools-> history of the record and it shows WHO columns to the currently selected record.

    The intention is conditionally bind the attributes of the component with columns of WHO bodies VO.

    The scenario is:

    * all tables have Created_Date, Modified_Date for columns of the WHO.

    * the page containing the 2 instances of VO with different source (for example:-> emp dept)

    * whenever I have navigate dept records it should display columns WHO selected dept and the same thing then to move through the records of the emp.

    Kind regards

    Ferrere

    Well as I said, you shouldn't try to rebuild the Oracle Forms technology-specific behavior in some other technologies such as ADF (because it is not usually possible).

    It is probably best to have a separate button for each shape (square to a coherent position on all pages - as some form, toolbar header...)

    If you want to rebuild the behavior of forms, then you can use the combination of af: clientListener / af:serverListener to set a flag (as the name iterator) see scope that can be used by your 'global' button to retrieve the correct data. Therefore, add af:clientListener to each component entry...

    Dario

  • How to set a partialTriggers for the declarative component

    12.1.3 jdev

    I try to set partialTriggers for my component declarative.

    From another forum, people suggested using one different name other than partialTriggers to avoid override a final method in RichDeclarativeComponent.

    Then, I set this:

    < afc:attribute >

    < afc:attribute - name > myPartialTriggers < / afc:attribute - name >

    < afc:attribute - class > java.lang.String [] < / afc:attribute - class >

    < / afc:attribute >

    and

    "< af:selectOneChoice id = simple =" #{attrs.simple "dc_droplist_soc"} "readOnly =" #{attrs.readOnly} "disabled =" #{attrs.disabled} ' "

    value = "#{uploading." "Value}" label = "#{attrs.label}" binding = "#{dropListComp.selectOneChoice}".

    "autoSubmit =" #{attrs.autoSubmit} "required =" #{attrs.required} "visible =" #{attrs.visible} ' "

    valueChangeListener = "#{dropListComp.handleValueChangeListener} '"

    partialTriggers = "#{attrs.myPartialTriggers} ' / >"

    But it does not work. I don't see a partialTriggers work.

    Any suggestions?

    Thank you.

    Hello

    try to use PartialTrigger on the declarative component and then reference it from

    partialTriggers = ' #{uploading. '. PartialTriggers}' / >

    Frank

  • How to define an attribute of the declarative component with the list of options

    12.1.3 jdev

    I'm trying to define a declarative component UOM. It has a text box with a selectOneChoice of the optional codes for this type of unit of MEASURE.

    I have uomType as one of the attributes of my unit of MEASURE. It may be of WEIGHT, VOLUME, LENGTH, etc. Is it possible to provide a list of the channels supported for my uomType? So, when the user uses this component, they can select a type they want in the list, instead of typing in themselves.

    < afc:attribute >
    < afc:attribute - name > uomType < / afc:attribute - name >
    < afc:attribute - class > java.lang.String < / afc:attribute - class >
    < afc: required > true < / afc: required >
    < / afc:attribute >

    Thank you.

    Hello

    Unfortunately the lists are not an option with the declarative elements

    Frank

  • Declarative component ADF - TagLib version

    Hi experts. I use jDeveloper 11.1.1.7.0.

    I upgraded a declarative component and I want to publish it with version 2.0.

    I added a MANIFEST. MF file with version 2.0 to generate the ADF library JAR but JDeveloper continued showing me version 1.0 when I add the JSP tag library to my test application. (attached printscreen)

    How can I do for jDeveloper displays the library with version 2.0 when they are imported as JSP tag library into an application?

    TagLib version is contained in the tag library descriptor (TLD) file

    On your screenshot: "META-INF/Combo AutoSuggest.tld.

    Dario

  • Declarative component in the form layout Panel

    Hello

    I use jdev 11.1.1.4. I created a declarative component which is similar to the component date. MinValue, but has its disabled text entry field. The problem is that if I put this component within a group shape panel presentation with other fields of the form (IE with the label and text field) then my full component comes below the textfield object. How can I make it to appear as the original component date. MinValue when placed inside formatting has its label below the other labels and textfield below other textfields. The only reason to have this component is to get the disabled text input field. Please suggest if there is another way to achieve this goal, or if any other information is needed.

    Thank you

    You can try this?

    (1) to date. MinValue as simple so that only the date part of the declarative component (the label does not appear in the declarative component)
    (2) use the declarative component by enclosing it inside a panelLabelMessage with the label in the panelLabelMessage.
    (3) place all the components Panel formatting.

    Thank you
    Nini

  • Result of a declarative component

    Hello!

    Threre is a workflow that contains two activities from view, which are interconnected with a control box - from View1 to view2. The View1 contains a declarative component, which, in turn, contains a menuCommandButton. When I set the action attribute of the menuCommandButton to a static string corresponding to the result of the case of control - all right.

    But when I tried to add an attribute to the comp. VAT statement. replaced static text with #{attrs.myAttr}, I got the error: method not found:. myAttr() {}.

    Is it possible, in a way, a result to the menuCommandButton in JDev 11.1.1.3.0 set declaratively?

    If not, what code is in the method of the bean, which is called via declarative method of a component?

    Thanks in advance.

    Hello

    You must use a declarative managed bean in the component method.

    1 bind the property of the action to the managed bean method. The method looks like

    public String commandAction(){
    
       String outcome = null;
    
        //lookup the component instance and the attribute
        FacesContext fctx = FacesContext.getCurrentInstance();
        ELContext elctx = fctx.getELContext();
        Application app = fctx.getApplication();
        ExpressionFactory efactory = app.getExpressionFactory();
    
      ValueExpression componentExpr =
            efactory.createValueExpression(elctx,"#{component}", Object.class);
            RichDeclarativeComponent _this = (RichDeclarativeComponent)  componentExpr.getValue(elctx);
            outcome = (String) _this.getAttributes().get("myAttr");
    
       return outcome;
    }
    

    Make sure that you set the managed bean scope backingBean so you can have several component declarative on one page (the use of managed bean should not limit the use of your device)

    Frank

  • By aligning a declarative component in panelFormLayout

    Hello
    I use 11gr1p1. I created a declarative component to get a multi feature select lov. I have an inputText in my component and I'm passing the tag as an attribute to the declarative element.
    Everything works fine. But the declarative component aligns well in the panelFormLayout. How can I fix?

    Thank you

    Hello

    in fact you can not because the declarative component is not recognized by the panelLayout component is rendered. Instead, you can try and use a panelLabelAndMessage component and specify the label here. Then you component declarative would become the child of the label and message comoponent. In this way the alignment works

    Frank

  • Model of ADF for use within the declarative component project

    Hello

    JDev 11.1.2.4

    I created a project for my declarative components. I want to create an element with an attribute of type oracle.jbo.Row, but this class is not recognized. What are the libraries I need to include if I want to use the object Row.

    Some basic information: my declarative component is bound to a managed bean.

    Import oracle.jbo.Row;

    @ManagedBean (name = "audit")

    @RequestScoped

    public class AuditBean {}

    Online Privacy;

    public AuditBean() {}

    Var UIXDeclarativeComponent = (UIXDeclarativeComponent) JSFUtils.resolveExpression("#{comp}");

    If (vars == null) {}

    again, throw PropertyNotFoundException ("could not find the name of the attribute [comp] component declarative Vars.");

    }

    line = vars.getAttributes () .get ("row");

    }

    }

    Most of our table have the same fields of audit, and we want to create a component that displays audit information. The component would take the line and check if the attributes are present, if so, display them.

    Thank you

    Hello

    Line belongs to the ADF runtime library. However, your declarative component seems to have another flaw, that is, it uses a bean managed within the scope of the request. She should better use backingBean range (a range of task flow) so it can be used multiple times on a page without the substitution of a previous rendering information. Maybe this isn't a problem if the component cannot forget his condition after rendering

    Frank

  • Create a custom as container declarative component

    Hi all

    I use Jdev 12 c.

    I want to create a custom declarative component like this:

    Container.JSF:

    <af:panelGroupLayout id="#{attrs.Name}_VIEWPORT" layout="scroll" binding="#{attrs.Binding}"
                             inlineStyle="position:absolute;width:#{attrs.ViewportWidth}px;height:#{attrs.ViewportHeight}px;top:#{attrs.ViewportY}px;left:#{attrs.ViewportX}px;border:1px solid;background:#c6c6ff;z-index:#{attrs.ZIndex};">
            <af:panelGroupLayout id="#{attrs.Name}" layout="scroll"
                                 inlineStyle="position:absolute;width:#{attrs.Width}px;height:#{attrs.Height}px;">
              
            </af:panelGroupLayout>
        </af:panelGroupLayout>
    <af:xmlContent>
            <afc:component>
                <afc:description/>
    ....
    ....
    </af:xmlContent>
    

    I use this custom component to group some child components like this:

    < abc: container... >

    < af:inputText... / >

    < af:inputText... / >

    < / abc: container >

    But the things is in the Java code, I can't get components RichInputText:

    It is my function:

        private void getFacetAndChild(UIComponent parent) {
            Iterator childrens = parent.getFacetsAndChildren();
            while (childrens.hasNext()) {
                UIComponent child = (UIComponent)childrens.next();
                System.out.println("Log child >> " + child);
                getFacetAndChild(child);
            }
        }
    


    this function will print only the second RichPanelGroupLayout.

    Any ideas to help me get all the RichInputText?

    Thank you and best regards!

    Hi all

    I found the solution. Just add a facet for custom container

    1. inlineStyle = "position: absolute;" width: #{uploading. ViewportWidth} px; height: #{uploading. ViewportHeight} px; top: #{uploading. ViewportY} px; left: #{uploading. ViewportX} px; border: 1px solid; background: #c6c6ff; z index: #{uploading. ZIndex}; » >
    2. inlineStyle = "position: absolute;" width: #{uploading. Width} px; height: #{uploading. Height PX}; » >
    3. ....
    4. ....

    And the used page:

    Maybe this solution will help others to create a custom container

    Thank you and best regards!

  • Declarative component and passing variable and resource group

    Hello

    I have the doubt in the component using declarative

    I'm call declarative component as...

    < af:declarativeComponent = viewId "folder/dc.jsff" id = "dc_dc10" > "

    < name f: attribute = "var" value = "Display" / >

    < / af:declarativeComponent >

    In dc.jsff

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

    " < = xmlns:jsp jsp:root ' http://Java.Sun.com/JSP/page "version ="2.1"xmlns:af =" " http://xmlns.Oracle.com/ADF/faces/rich " " > "

    < var af:componentDef = "uploading" >

    < af:xmlContent >

    " < element xmlns =" http://xmlns.Oracle.com/ADF/faces/rich/component "> "

    < description > < / description >

    < attribute >

    < name of the attribute - > var < / attribute name >

    java.lang.String < class attribute > < / attribute class >

    < / attribute >

    < / component >

    < / af:xmlContent >

    Threshold works perfectly...

    "{[< af:outputText id ="dc_ot1"value =" #{bundle ['Display.one]} "]}" / >

    Threshold of does not work...

    Trail 1)

    < af:outputText id = value = "#{bundle ['var.one']}" / "dc_ot1" >

    Reason for not working: var is not taken as a variable

    Trail 2)

    < c:set var = 'temp' value = "#{bundle ['display']}" / >

    < af:outputText id = value = "#{temp.one'}" / "dc_ot1" >

    < / af:componentDef >

    < / jsp:root >

    User, please tell us your jdev version!

    I do not understand your question.

    I understand what you try to do, is to reassess a variable inside an EL. There is no reassessment within an EL (as you have already discovered).

    Why don't spend you the ' #{bundle ['Display.one']} "directly on the declarative component instead of pass the name of the key to read from the package?

    Timo

  • Declarative component are not available in the page fragment

    Hello

    I created the declarative component... But it can only access *.jsf page not page fragment...

    Hello

    Had in fact I created declarative component by using the page faclet (*.jsf)...  If I create DC using .jspx page... It's work

    Thank you

    Nitesh

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

    Hello

    I have a declarative component written in JSF 1.2. I want to integrate this declarative component in an ADF application using JSF 2.0.

    On creating a page jspx in JSF 2.0 & coating component decalrative it works very well, but I have to integrate in a JSF page instead, which does not work.

    Any suggestions?

    Thank you
    Serge

    Hello

    for JDeveloper 11 g R2, you will need to know before I know if the application that you build using JSPX or Facelets pages documents. The technologies are different (introduced with JSF 2) and declarative elements must be build for the type of document used by the application

    Frank

Maybe you are looking for

  • My Ipod doesn t work "more after that I tried to update.

    I tried to update my ipod with the latest update of the software then it just crashed. now there's just the connection to the screen of itunes, but when I connect to my computer, nothing. When I ran troubleshoot he continues saying my ipod, a disk is

  • Cannot start Windows 7 after the update of the system

    I don't speak of Windows 7 RTM, I know is RC forum but I downloaded the RC of microsoft's official website and I can't install it, it reached the "end of installation"(ou quelque chose comme ça) phase and blue screen of death appears, saying "memory

  • I have QuickCAD Millennium 6th edition and need to install in Windows 7

    I got QuickCAD Millennium #6 for a few years and I need to install it in a new PC with Windows 7 Edition Pro... it will not be installed... I suspect it is a 32-bit 64-bit issue so I need a workaround solution. Please answer... All what she reads is

  • BlackBerry Smartphones music Glitch

    Hello I just bought the blackberry storm and I started to download music top, downloaded on the end device and played fine... until I have move the phone. If I shake it or turn it sideways, it freezes and says that there is a read error. This befor t

  • I need help to know how to trust the PC

    Original title: trust to pc I do not understand this trust pc thing, they give me a website to go to, which is this one, but still nothing is resolved... ?? How should we trust the pc... ???