Declarative components based on declarative elements

Hello

I defined a declarative component (buttonBarRow) that comes from the other declarative elements (row and column). The record is correct, but the value of the attribute is not passed. So I was wondering if it is possible to create declarative components based on a declarative component in the same project.

JDev 11.1.2.4

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

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

' xmlns:afc = ' http://xmlns.Oracle.com/ADF/faces/rich/component "xmlns =" http://www.example.org/Components " "

                 xmlns:f=" http://Java.Sun.com/JSF/core "xmlns:h =" " http://Java.Sun.com/JSF/HTML ">

< xxx:row id = "dc_r1" >

< f: facet = 'content of the line' name >

< xxx:column number = '12' id = 'dc_c1' >

< f: facet = 'content of the column' name >

< h:panelGroup id = "pg1" layout = "block" styleClass = "#{!}" empty attrs.align? {'text -' + attrs.align: 'text on the left'} ">"

< af:facetRef facetName = "primaryButton" / >

< af:outputText value = "#{attrs.align}-#{empty attrs.align}" / >

< af:spacer width = "10" height = "10" id = "dc_s1" / >

< af:facetRef facetName = "secondaryButton" / >

< / h:panelGroup >

< / f: facet >

< / xxx:column >

< / f: facet >

< / xxx:row >

< af:xmlContent >

< afc:component >

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

< afc:facet >

< afc:facet - name > primaryButton < / afc:facet - name >

< / afc:facet >

< afc:facet >

< afc:facet - name > secondaryButton < / afc:facet - name >

< / afc:facet >

< afc:attribute >

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

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

< / afc:attribute >

< afc:component - extension >

< afc:component - tag-namespace > org.example.components < / afc:component - tag-namespace >

< afc:component - taglib-uri > http://www.example.org/components < / afc:component - taglib-uri >

< / afc:component - extension >

< / afc:component >

< / af:xmlContent >

< / af:componentDef >

The only clue that I found is the use of declarative components in other definitions of component declarative

Doesn't look like this is supported.

Timo

Tags: Java

Similar Questions

  • partial trigger on the declarative elements

    Hello

    I have a declarative component with many facets and a high component < af:panelGroupLayout >. I would like to refresh the entire component with PPR. In my page, I have a selectOneChoice with autoSubmit = 'true', but now I have to set the property partialTriggers to the declarative elements.

    So I created a new myPartialTriggers to attribute for declarative components as a string and changed the top element to < af:panelGroupLayout partialTriggers = "#{attrs.myPartialTriggers}" >. So now I can define the component property myPartialTriggers declarative the ID of the SelectOneChoice. It is not work that I get an exception:

    Error occurred: Houston-29000: Unexpected exception caught: java.lang.IllegalArgumentException, msg = cannot convert: c42:iflt9:dc_r2:dc_c2:naturalPersonSoc of type java.lang.String class at class [Ljava.lang.String;

    Thank you

    JDev 11.1.2.4

    Essentially, you surround the declarative component with a container and the container ppr. Read the whole story http://www.oracle.com/technetwork/developer-tools/adf/learnmore/005-how-to-bind-decl-comp-169123.pdf

    Timo

  • ADF Mobile: Models, reusable, declarative elements

    Hello

    Unfortunately, the developer's guide has no mention on the creation of templates, the reusable parts and declarative elements. ADF Mobile them currently support? Please enlighten us.

    Thank you
    Srini

    Not immediately.
    But you can use the deployment feature to develop reusable features which can be shared between applications.
    http://docs.Oracle.com/CD/E35521_01/doc.111230/e24475/deploying.htm#CHDCGBIE

  • Display list items based on another element of the list

    Hi all

    I want to display the list item based on another element of the list, but his does not work.

    This is my code:


    / * WHEN-NEW-FORM-INSTANCE * /-his work.
    DECLARE

    rg_district recordgroup;

    rg_name VARCHAR2 (40): = "district";

    vtemp NUMBER;

    BEGIN

    rg_district: = FIND_GROUP (rg_name);

    IF ID_NULL (rg_district)

    THEN

    rg_district: =.

    CREATE_GROUP_FROM_QUERY (rg_name,

    'select dist, dist district_mas.

    );

    vtemp: = POPULATE_GROUP (rg_district);

    POPULATE_LIST ('BLOCK3.) Of RIDING ", rg_name);

    END IF;

    END;

    * / CHANGED AFTER a - list * /-does not work. Cannot complete the list based on the list

    DECLARE

    rg_branch recordgroup;

    rg_name1 VARCHAR2 (1000): = "branch";

    vtemp NUMBER;

    BEGIN

    rg_branch: = FIND_GROUP (rg_name1);

    IF this is ID_NULL (rg_branch)

    THEN

    DELETE_GROUP (rg_name1);

    rg_branch: =.

    CREATE_GROUP_FROM_QUERY

    ("rg_branch",

    "SELECT FROM dist_branch WHERE district IN branch (DIST DISTRICT_MAS WHERE DISTRICT = SELECT').

    || : BLOCK3. DISTRICT OF

    );

    vtemp: = POPULATE_GROUP (rg_branch);

    POPULATE_LIST ('BLOCK3.) Branch of THE ', rg_branch);

    END IF;

    END;

    Table:

    CREATE TABLE DISTRICT_MAS

    (

    DIST VARCHAR2 (100 CHAR)

    );

    CREATE TABLE DIST_BRANCH

    (

    NEIGHBORHOOD VARCHAR2 (100 CHAR),

    DIRECTORATE GENERAL OF THE VARCHAR2 (100 CHAR)

    );

    Values:

    insert into district_mas values ('chennai');

    insert into district_mas values ('coimbatore');

    insert into dist_branch values ('chennai', 'chennai_north');

    insert into dist_branch values ('coimbatore', 'Podanur');


    Concerning

    Nassik M

    I tested the code below when the list has changed


    DECLARE

    rg_branch recordgroup;

    rg_name1 VARCHAR2 (1000): = "branch";

    vtemp NUMBER;

    QT VARCHAR2 (10): = "';

    BEGIN

    rg_branch: = FIND_GROUP (rg_name1);

    IF this is ID_NULL (rg_branch)

    THEN

    DELETE_GROUP (rg_name1);

    END IF;

    rg_branch: =.

    CREATE_GROUP_FROM_QUERY

    (rg_name1,

    'SELECT branch, branch OF THE DISTRICT WHERE the dist_branch =' | QT | : BLOCK3. DISTRICT OF | QT);

    vtemp: = POPULATE_GROUP (rg_branch);

    POPULATE_LIST ('BLOCK3.) Branch of THE ', rg_branch);

    END;

    Hope it's work...

    Hamid

  • Execution of a declarative elements AJAX requests

    HI guys,.

    We are building an ADF based portal application and design involves the creation of a declarative component which will be 'built' in the jspx parent page. This declarative component, during rendering, you must call an AJAX JavaScript application, based on the attributes that have been passed into the constructor of declarative components highlighted below. Essentially, we need to take the value of the ss_Email field and use it in a custom js function (defined in the declarative component) to call an AJAX request to an external resource and view the results online in the component. The reason why this component must call the AJAX code is our end point expects a connection token that is generated from the browser. The call of the declarative component is defined as follows:

    < af:form id = "f1" >
    < af:panelGroupLayout id = "pgl1" layout = "vertical" >
    < ss:ssConsumer id = "sc1" ss_Email = "[email protected]" ss_LastName = "Pradhan" / >
    < / af:panelGroupLayout >
    < / af:form >

    What I did in my component declarative is to set the value of the attributes of elements in a field of entry as follows:

    < af:inputText label = "email" id = "inputEmail" value = "#{ss_Email}. uploading" columns = "40" clientComponent = "true" >

    It works and I can see the correct value passed into the component. I have a problem with is hang what component text input, such that I can call a method of Javascript that I can read my af:inputText value in a method and begin my AJAX call. I tried to attach an af:ClientListener but it does not help because there is no interaction of the user within that component, that is why none of the types of events (mouseover, blur, click, etc.) are useful. I need actually an event 'onload' for the declarative component, but of course, this does not exist. To solve this problem, I used a block of standard script to force the component to call my js method that is

    < script language = "javascript" reporter = 'reporter' >
    getTextValue();
    < /script >

    The problem I am facing now, is that I'm not sure that ADF JS API will give me the value of my input text. I tried the methods AdfPage.PAGE and tried to retrieve the correct value, but have so far failed.

    var label = AdfPage.PAGE.findComponent('dc_pgl1:dc_pfl2:inputEmail').getValue();)
    var Label2 = AdfPage.PAGE.findComponentById('dc_pgl1:dc_pfl2:inputEmail').getValue();)
    var Label3 = document.getElementById('dc_pgl1:dc_pfl2:inputEmail').value;

    I guess because it is a declarative component and not in the Page, I can't use these methods. Are there alternatives that should I try or pointers to other ADF JS method calls that I should try to get the value of my javascript input text.

    Many thanks in advance,

    Sanjay

    Hello

    as far as I know, all Trinidada component trh:script did the same thing as

  • The declarative elements (DC): how to access to the #{component} out

    Hello

    I created a DC of JSF, defind an attribute on it, has added a unlimited workflow, created a bean and added to it as a backingBean.

    In the bean, I have:
        public final String getAttrValue(String attrName) {
            ExpressionFactory ef = FacesContext.getCurrentInstance().getApplication().getExpressionFactory();
            ELContext ec = FacesContext.getCurrentInstance().getELContext();
            RichDeclarativeComponent rdc = (RichDeclarativeComponent)ef.createValueExpression(ec, "#{component}", Object.class).getValue(ec);
            return (String)rdc.getAttributes().get(attrName);
        }
    The code works fine, when it is called from within the DC. But when it is called from a page of your, I get a NPE.

    I need to note that a component call the getAttrValue and the DC are in the same branch of the hierarchy, that is the calling component is inside the facet of the DC.

    All the abovesaid was done in JDEV 11.1.1.3.0.

    I think that #{component} should be changed.

    Could someone advise me how to do the code works?

    Hello

    "component" is an internal variable of the component declarative which has no visibility to the outside. To access his property of binding component using declarative and create a Set/getter accessor in a managed bean that creates an entry of type RichDeclarativeComponent. This allows you to access the component.

    Frank

  • Conditional masking based on two elements

    Hello gentlemen,

    I'm trying to hide elements based on two conditions.
    Currently I can only do it based on either:
    1 expression = Expression 2 (i.e. EMPNO = JOHN).

    Is there a category that would allow me to say e.g. "equation in Expression 1 or equation in the Expression 2 is true"?

    See you soon,.
    Mauricio

    Hi Mauricio,.

    You can still use the condition type "PL/SQL Expression" to form more complicated conditions.

    for example: P1_ITEM1 = 'X' OR: P2_ITEM2 = 'Y '.

    brgds,

    Peter

    Blog: http://www.oracle-and-apex.com

  • How to display the value of an element based on another element

    Hello
    In a page, I have to display name for the corresponding id displayed in id element. I can write a query based on the id and full name as soon as I enter this item.if, so is there any properties that I need? I'm looking for just post_text_item functionality in forms?

    Thank you
    Manoi

    Hello Eric,

    You must alert gReturn instead of get.
    But it is your call to this public page? And Page 0 requires an authorization?

    Greetings,
    Roel

    http://roelhartman.blogspot.com/

  • How to view the title of region of APEX 4.2 dynamic chart based on an element of the APEX?

    Hello

    I use APEX4.2 and created

    (1) a list drop-down menu item called P38_DESK that contains a list of offices, such as A, B, C

    (2) a region of the graph with the region title: graphic Mvt by & P38_DESK.

    (3) a dynamic action "Refresh" the area of table if the value of P38_DESK is changed.

    I can see that whenever the office is changed from the dropdown list, the chart section/region becomes therefore refreshed but NOT the title of the chart area. He showed only the first value I chose. for example graph by A Mvt

    So in APEX4.2, how the title of the editable region dynamically (without submitting the entire page) to account for the value in the drop-down list P38_DESK?

    Thank you.

    Dynamic Refresh action updates only the area of the region which changes, rather than the HTML block for the region as a whole. The title bar is outside the area of update.

    This must be done dynamically, by a slight change to the region and adding another real action for the da r.

    1. Change the title of the region toChart Mvt by &P38_DESK.
    2. Add another real action to DA update:
      1. Action: Set value
      2. Fire on Page load: NO.
      3. Type of value: Expression of JavaScript

        $v('P38_DESK')

      4. Selection type: DOM object

        p38-title-desk

    This simply copies the value of the selection of P38_DESK as the content list of the p38-title-desk HTML element. A more complex expression of the JS is necessary if the selection list option text is different from underlying values.

  • How to render components based on the value selected in a list of values

    Hello
    I created a form of the ADF. I have a drop down that is a list of values. I want to toggle certain fields based on the values selected in the menu drop-down. Could you please let me know how to do it in the ADF?

    Kind regards
    Murielle

    Hello

    It should work. It is important to note that in case you use a component selectOneChoice for category then the value returned by #{bindings. Category.inputValue}
    is the index of the selected value in the list and not the value auto. To get the value, you must use ' #{bindings. " Category.attributeValue}"in the disabled state.

    If the problem is no display of code in your page to take a look.

    Gabriel.

  • How to keep the alignment of a group logo based on four elements?

    I created and aligned a logo based on four letters. Subsequently I've grouped. The alignment is correct. But if I copy the Group and place it in a different location, alignment falls slightly out of place. What should I do to keep the aligned group?

    Thank you for answer

    Angelika

    I see two things that could cause this.

    First of all is to line up on the starting grid. If enabled for a letter, but not others, you may see changes in the vertical postioning of this letter of treation to others. If applied to all you letters could find, you cannot position the logo vertically accurate spot you want. More likely, however, you would see one or several letters go in excess at least executives were very deep.

    Second is text wrapping. If the letters are individual images, they would be individually affected by the text applied to another object wrapping. You could overcome this by turning on "Ignore the text of not dress" for images of logo in the text frame options.

    Other things you could do: convert the text to outlines text. When you convert to outines you have editable text, and it is not subject to the skin or the complications of grid planning.

    Or create the logo in a second document and export to PDF, then place the PDF file. It will behave like a picture. If you need be able to easily modify the logo, save it in a separate ID doc and place the page of the .indd. The original update will update the copy placed.

  • analyzing XML based on the elements of the array...

    Hello

    I wonder why two of my three tracks below are undefined or 'white', I think that everything is set up the way it should be, however, when I try and draw the attributes, they are not defined. What I am doing wrong? I hope it's an easy place for someone, my head popped up a bit (I show my naiviety).

    I will not go into why I do it this way, but I'm trying to get this data model to work.

    Thanks for any help,

    Chipleh

    var teamXML:XML = <team headerText="Field1,Field2,Field3,Field4,Field5,Field6,Field7" hitsFieldNumber="5">
      <player Field1="BLAH 1" Field2="BLAH 2" Field3="BLAH 3" Field4="BLAH 4" Field5="BLAH 5" Field6="BLAH 6" Field7="BLAH 7"/>
    </team>
                    
        var xmlHeaderText:XMLList = teamXML.@headerText;        
        var headerTextArray:Array = [];    
        var headerTextString:String = teamXML.@headerText;        
        headerTextArray = headerTextString.split(",");
        trace("headerTextArray = "+ headerTextArray);
        for(var i:int = 0;i<headerTextArray.length;i++)
        {
            trace(i + " : " + headerTextArray[i]);        
            trace("teamXML.player.@headerTextArray[i] = " + teamXML.player.@headerTextArray[i]);        
            var theField:String = headerTextArray[i];
            trace("teamXML.player.@headerTextArray[i] = " + teamXML.player.@theField);        
        }    
        
    
    use:
    
    var teamXML:XML = 
      
    
    
        var xmlHeaderText:XMLList = teamXML.@headerText;
        var headerTextArray:Array = [];
        var headerTextString:String = teamXML.@headerText;
        headerTextArray = headerTextString.split(",");
        trace("headerTextArray = "+ headerTextArray);     for(var i:int = 0;i 
               
  • NUMBER based on the elements implemented.

    Hi all

    Sorry I cound not think of a better.

    I've been hitting my head against the wall, all that for about a week and the only thing I have to show that it is a headache.

    My table examples

    WITH tests,)
    SELECT 1 AS 'ID', 'Reading' AS 'TEST_TTILE', TO_DATE (null) AS 'EFFECTIVE_DATE', TO_DATE (null) AS "Correspondents" OF the DOUBLE
    UNION ALL
    SELECT 2, 'Writing', TO_DATE (null), (null) TO_DATE FROM DUAL
    UNION ALL
    SELECT 3, 'Arithmetic', TO_DATE (null), (null) TO_DATE FROM DUAL
    UNION ALL
    4. SELECT "basket weaving 101", TO_DATE('01-FEB-2009'), TO_DATE (null) FROM DUAL.
    UNION ALL
    SELECT 5, "basket weaving 102", TO_DATE('01-FEB-2009'), TO_DATE('28-FEB-2009') FROM DUAL
    UNION ALL
    SELECT 6, 'prehistoric history', TO_DATE (null), TO_DATE('31-JAN-2009') FROM DUAL
    )
    SELECT * FROM test


    WITH STUDENTS HAVE)
    SELECT 1 AS ID, 'Read' AS 'TEST_TTILE', TO_DATE('01-JAN-2009') AS 'TEST_DATE' OF the DOUBLE
    UNION ALL
    SELECT 1, 'Writing', TO_DATE('02-JAN-2009') OF the DOUBLE
    UNION ALL
    SELECT 1, 'Arithmetic', TO_DATE('03-JAN-2009') OF the DOUBLE
    UNION ALL
    SELECT 1, 'prehistoric history', TO_DATE('04-JAN-2009') OF the DOUBLE
    UNION ALL
    SELECT 2, 'Read', TO_DATE('01-JAN-2009') OF the DOUBLE
    UNION ALL
    SELECT 2, 'Writing', TO_DATE('02-JAN-2009') OF the DOUBLE
    UNION ALL
    SELECT 2, 'Arithmetic', TO_DATE('03-JAN-2009') OF the DOUBLE
    UNION ALL
    SELECT 3, 'Read', TO_DATE('15-FEB-2009') OF the DOUBLE
    UNION ALL
    SELECT 3, 'Writing', TO_DATE('15-FEB-2009') OF the DOUBLE
    UNION ALL
    SELECT 3, 'Arithmetic', TO_DATE('15-FEB-2009') OF the DOUBLE
    UNION ALL
    SELECT 3, 'Basket weaving 101', TO_DATE('15-FEB-2009') OF the DOUBLE
    UNION ALL
    SELECT 3, 'basket weaving 102', TO_DATE('15-FEB-2009') OF the DOUBLE. "
    UNION ALL
    Select OPTION 4, 'Writing', TO_DATE('01-MAR-2009') OF the DOUBLE
    UNION ALL
    Select OPTION 4, "Arithmetic", the DOUBLE TO_DATE('01-MAR-2009')
    UNION ALL
    4. SELECT "basket weaving 101", TO_DATE('01-MAR-2009') OF the DOUBLE ".
    UNION ALL
    SELECT 5, 'Read', TO_DATE('15-FEB-2009') OF the DOUBLE
    UNION ALL
    SELECT 5, 'Writing', TO_DATE('01-MAR-2009') OF the DOUBLE
    UNION ALL
    SELECT 5, "Arithmetic", the DOUBLE TO_DATE('01-MAR-2009')
    UNION ALL
    SELECT 5, "Basket weaving 101", the DOUBLE TO_DATE('01-MAR-2009')
    UNION ALL
    SELECT 5, "basket weaving 102', TO_DATE('01-MAR-2009') OF the DOUBLE".
    )
    SELECT * FROM STUDENTS


    Students take tests in a certain order,
    but the existence of a test in a date selection will trigger the search for all the tests in force.

    "In force" is
    WHERE STUDENTS. TEST_DATE BETWEEN TESTS. TESTS AND EFFECTIVE_DATE. CORRESPONDENTS.
    AND THE STUDENTS. TEST_TITLE IS TESTING. TEST_TITLE

    What is in effect is always subject to change at the whim of those in "userland".

    Date selection could be as close as a day or as wide as infinity.
    but the outcome of each student in the trials should be counted only once and
    counted as 1 no matter how much testing is in effect at the time.

    It is possible for the same student to do the same test several times, but all the tests in force is supposed to be counted.

    TESTS of null. EFFECTIVE_DATE indicates the date of entry into force is the beginning of time.
    TESTS of null. EFFECTIVE_DATE indicates the expiry date is the end of time.

    Charges will be consolidated on MAX (STUDENTS. TEST_DATE) AS "COMPLETION_DATE" for STUDENTS.ID.

    Student 1 is counted because all tests in force have been taken.
    Student 2 is not counted as test "Prehistoric history" was in force but not taken.
    Student 3 is running out because all the tests in force have been taken.
    4 student is not counted because test in force, but not 'Read' was taken.
    5 student is counted for all the tests in force have been taken.

    Can someone show me how to go in the right direction please?

    I tried to clarify this but if it does not please let me know.

    Thanks in advance for your help,

    Lou

    Published by: wind on May 11, 2009 14:16

    Published by: wind on May 11, 2009 14:20

    Hey, Lou,

    I'm still not clear about the criteria of selection.
    I understand that each student must have completed all the tests that were in force for a certain period, but I don't know what it is from the period.
    After reading your last post, I guess the time is actually just a point in time, to the point where the student took his last test (i.e. MAX (test_date).
    If I guessed wrong, you may only change the definition of begin_date in the subquery student_date_range, below.

    If this query gets good results of your test data, but I don't know it's for the right reason, and this is why I'm not sure that it will work on all the data.

    WITH     student_date_range  AS
    (
         SELECT       id
         ,       MAX (test_date)     AS begin_date
         ,       MAX (test_date)     AS end_date
         FROM       students
         GROUP BY  id
    )
    SELECT     end_date
    ,     COUNT (*)     AS total
    FROM     student_date_range     m
    WHERE     NOT EXISTS (
                     SELECT  test_ttile
                 FROM        tests
                 WHERE   NVL (effective_date,  m.begin_date) <= m.end_date
                 AND        NVL (expiration_date, m.end_date)   >= m.begin_date
                 MINUS
                 SELECT  test_ttile
                 FROM        students
                 WHERE   id     = m.id
                     )
    GROUP BY  end_date
    ORDER BY  end_date;
    

    As you can see, it's just a matter of seeing if there are all the exams the student should have taken, but did not.
    I looked in the NOT EXISTS subquery
    b - tests to find which tests the student should have taken, then I looked
    (b) to students to see those who take the student.
    Find if there is in the first peloton which are not in the second one is simply an operation LESS: (a) (b).

    Published by: Frank Kulash, May 11, 2009 18:43

  • Hi, can I get App demo on how to create the model &amp; components declarative in ADF?

    Hi, can I get App demo on how to create the model & components declarative in ADF?

    Hello

    You can get the demo at the following link

    Models in pages ADF and declarative elements

  • When to use the declarative components?

    What is the declarative elements and when to use them?

    You will find all kinds of documentation/Articles by searching.

    http://technology.AMIS.nl/Blog/2562/JDeveloper-11g-declarative-components-rapid-no-programming-composition-of-custom-JSF-components is the one I've used in the past.

    John

Maybe you are looking for