How to get all attributes of a component

Hi all,
In a component I'm trying to get attributes of some primefaces components, but somehow I cannot retrieve them all.
Here's a little bit of a table:
          <p:dataTable styleClass="ptable100" title="${msg.contractlist_title}" id="contractlistTable" var="contract" value="#{contractList.contracts}" width="100%" height="200px"
                    emptyMessage="#{msg.all_lists_no_records_found}" paginator="#{contractList.rowSize > 10}" rows="10" rowsPerPageTemplate="5,10,20,50,100"
                    paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}  #{msg.all_lists_numberOfRowsDisplayed_label}{RowsPerPageDropdown}">
               <p:column id="column_id" resizable="true" sortBy="#{contract.id}" style="white-space:normal">
                  <f:facet name="header"><h:outputText styleClass="headerText" value="#{msg.contractlist_contract_id}" /></f:facet>
                     <h:outputLink value="#{path.dynamicUrl}contract/detail.xhtml" onclick="Richfaces.showModalPanel('busy_nav');">
                         <h:outputText value="#{contract.id}"/>
                         <f:param name="contractid" value="#{contract.id}" />
                     </h:outputLink>
              </p:column>Then, I try to get the attributes like this (where table is the UIData component):
          String title = "";
          System.out.println("table.getAttribs.keys= " + table.getAttributes().keySet());
          System.out.println("table.getAttribs.vals= " + table.getAttributes().values());
          if (table.getAttributes().containsKey("title")) {
               title = String.valueOf(table.getAttributes().get("title"));
          }The function getAttributes() is implemented on UIComponentBase so I believe it's independent of the component.
This prints the following:
table.getAttribs.keys= [com.sun.facelets.MARK_ID]
table.getAttribs.vals= [5756abfa]When I do the same for the columns, all attributes I get is MARK_ID, style and styleClass.
Obviously I'd like to get all attributes, in this case the "title" on the p:dataTable.
Any thoughts why this isn't working and how I could do that?
Thank you,
Steven

Hi all,
In a component I'm trying to get attributes of some primefaces components, but somehow I cannot retrieve them all.
Here's a little bit of a table:
          <p:dataTable styleClass="ptable100" title="${msg.contractlist_title}" id="contractlistTable" var="contract" value="#{contractList.contracts}" width="100%" height="200px"
                    emptyMessage="#{msg.all_lists_no_records_found}" paginator="#{contractList.rowSize > 10}" rows="10" rowsPerPageTemplate="5,10,20,50,100"
                    paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}  #{msg.all_lists_numberOfRowsDisplayed_label}{RowsPerPageDropdown}">
               <p:column id="column_id" resizable="true" sortBy="#{contract.id}" style="white-space:normal">
                  <f:facet name="header"><h:outputText styleClass="headerText" value="#{msg.contractlist_contract_id}" /></f:facet>
                     <h:outputLink value="#{path.dynamicUrl}contract/detail.xhtml" onclick="Richfaces.showModalPanel('busy_nav');">
                         <h:outputText value="#{contract.id}"/>
                         <f:param name="contractid" value="#{contract.id}" />
                     </h:outputLink>
              </p:column>Then, I try to get the attributes like this (where table is the UIData component):
          String title = "";
          System.out.println("table.getAttribs.keys= " + table.getAttributes().keySet());
          System.out.println("table.getAttribs.vals= " + table.getAttributes().values());
          if (table.getAttributes().containsKey("title")) {
               title = String.valueOf(table.getAttributes().get("title"));
          }The function getAttributes() is implemented on UIComponentBase so I believe it's independent of the component.
This prints the following:
table.getAttribs.keys= [com.sun.facelets.MARK_ID]
table.getAttribs.vals= [5756abfa]When I do the same for the columns, all attributes I get is MARK_ID, style and styleClass.
Obviously I'd like to get all attributes, in this case the "title" on the p:dataTable.
Any thoughts why this isn't working and how I could do that?
Thank you,
Steven

Similar Messages

  • How to get all the values from the dropdown menu

    How to get all the values from the dropdown menu
    I need to be able to extract all values from the dropdown menu; I know how to get all those values as a string, but I need to be able to access each item; (the value in a dropdown menu will change dynamically)
    How do I get number of item is selection dropdown?
    How do I extract a ?name? for each value, one by one?
    How do I change a selection by referring to particular index of the item in a dropdown menu?
    Here is the Path to dropdown menu that I'm trying to access (form contains number of similar dropdowns)
    RSWApp.om.GetElementByPath "window(index=0).form(id=""aspnetForm"" | action=""advancedsearch.aspx"" | index=0).formelement[SELECT](name=""ctl00$MainContent$hardwareBrand"" | id=""ctl00_MainContent_hardwareBrand"" | index=16)", element
    Message was edited by: testtest

    The findElement method allows various attributes to be used to search. Take the following two examples for the element below:
    <Select Name=ProdType ID=testProd>
    </Select>
    I can find the element based on its name or any other attribute, I just need to specify what I am looking for. To find it by name I would do the following:
    Set x = RSWApp.om.FindElement("ProdType","SELECT","Name")
    If I want to search by id I could do the following:
    Set x = RSWApp.om.FindElement("testProd","SELECT","ID")
    Usually you will use whatever is available. Since the select element has no name or ID on the Empirix home page, I used the onChange attribute. You can use any attribute as long as you specify which one you are using (last argument in these examples)
    You can use the FindElement to grab links, text boxes, etc.
    The next example grabs from a link on a page
    Home
    Set x = RSWApp.om.FindElement("Home","A","innerText")
    I hope this helps clear it up.

  • How to get all users under an organizations?

    Hello everyone.
    Just want to know if anyone knows how to get all users under a particular organization.
    From the Search User form, I found they may kind of user such attribute conditions:
    MemberObjectGroup
    is in
    XXXX(organization)
    But unfortunately, the "is in" is not a valid AttributeConditionOperator, so besides using "recursive" self-written function, anyone knows any possible buit-in trick?

    Here is my solution:
    <Rule'>
        <RuleArgument name='organization'/>
        <RuleArgument name='context'/>
        <block>
            <defvar name='orgs'>
                <new class='java.util.ArrayList'/>
            </defvar>
            <invoke name='getChildObjectGroupNames'>
                <invoke name='getObject' class='com.waveset.ui.FormUtil'>
                    <ref>context</ref>
                    <s>ObjectGroup</s>
                    <ref>organization</ref>
                </invoke>
                <ref>orgs</ref>
            </invoke>
            <append name='orgs'>
                <ref>organization</ref>
            </append>
            <invoke name='getUsers' class='com.waveset.ui.FormUtil'>
                <ref>context</ref>
                <map>
                    <s>conditions</s>
                    <list>
                        <new class='com.waveset.object.AttributeCondition'>
                            <s>MemberObjectGroups</s>
                            <s>in</s>
                            <ref>orgs</ref>
                        </new>
                    </list>
                </map>
            </invoke>
        </block>
        <MemberObjectGroups>
            <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
        </MemberObjectGroups>
    </Rule>

  • How to Get Navigational attributes of dso in Report ...

    Hi i have a dso with many fields ,
    In the report i need to get some navgational attributes which are in dso..
    How to Get Navigational attributes of dso in Report ..??
    Thanks All..

    hai naiduz,
    in the dso u find folder with navigational attributes, there select the Navigation check box the fields which u need in the report.
    and further if ur dso through multiprovider and also identify them at multi provider level.
    then u will be able to see the fields at query designer level, then u can use the nav. fields u need in the report.
    regards,
    Vj

  • How to get the attribute values out?

    Hi everyone,
    <root>
    <category name="Mens Clothing" id="0">
    <subcategory>Active/Baselayer Tops</subcategory>
    <subcategory>Active/Baselayer
    Bottoms</subcategory>
    </category>
    <category name="Womens Clothing" id="1">
    <subcategory>aaa</subcategory>
    <subcategory>bbb</subcategory>
    </category>
    </root>
    How to get the attribute values out? For example "Mens
    Clothing" and "Womens Clothing".
    // the line below returns "Active/Baselayer Tops" and
    "Active/Baselayer Bottoms"
    var myXml:XML = new XML(event.result);
    Thanks,
    May

    Here is attribute identifier operator from FB Help:
    @ attribute identifier Operator
    Usage myXML.@attributeName
    Identifies attributes of an XML or XMLList object. For
    example, myXML.@id identifies attributes named id for the myXML XML
    object. You can also use the following syntax to access attributes:
    myXML.attribute("id"), myXML["@id"], and myXML.@["id"]. The syntax
    myXML.@id is recommended. To return an XMLList object of all
    attribute names, use @*. To return an attribute with a name that
    matches an ActionScript reserved word, use the attribute() method
    instead of the @ operator.
    Operands attributeName:* — The name of the attribute.
    Example
    How to use examples
    The first example shows how to use the @ (at sign) operator
    to identify an attribute of an element:
    var myXML:XML =
    <item id = "42">
    <catalogName>Presta tube</catalogName>
    <price>3.99</price>
    </item>;
    trace(myXML.@id); // 42The next example returns all attribute
    names:
    var xml:XML =<example id='123' color='blue'/>
    var xml2:XMLList = xml.@*;
    trace(xml2 is XMLList); // true
    trace(xml2.length()); // 2
    for (var i:int = 0; i < xml2.length(); i++)
    trace(typeof(xml2
    )); // xml
    trace(xml2.nodeKind()); // attribute
    trace(xml2
    .name()); // id and color
    } The next example returns an attribute with a name that
    matches a reserved word in ActionScript. You cannot use the syntax
    xml.@class (since class is a reserved word in ActionScript). You
    need to use the syntax xml.attribute("class"):
    var xml:XML = <example class='123'/>
    trace(xml.attribute("class"));

  • How to get zclass attribute's value inside  "Execute_default" method

    Hi all,
    I am displaying a link in UD step under "Objects & Attachmnents".I am using zclass. I created a attribute in zclass and i am creating a instance (background task) before this UD step and i will be setting a attribute of the zclass inside this create instance method.
    My problem is, if i click the link, this method "BI_OBJECT~EXECUTE_DEFAULT_METHOD" is getting executed but i am not able to get the attribute value inside this method, eventhough i am setting the attribute value before the UD step.
    Pls let me know, how to get the attribute's value inside "Execute_default" method, as i need to process further using this attribute.
    P.S: I tried with both static & instance attribute. I can achieve the same using ZBO but my client needs to use only class.
    -Vinoth
    Edited by: S Vinoth on Jan 29, 2010 7:23 AM

    Lei,
    If you are concerned only about a couple of attributes, then you can manage with a separate copy of the data. But if the data is in bulk, better leave it to pl/sql side of validation.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to get all rows that are returned in inner sub query of select statemen

    If a sub query in select statement returns more than one row than how to get all those returned rows in the final
    output of the query .It will be all right if all column's value repeat and that multiple output of inner query comes
    in another column .
    How to get that ?

    As Frank said, you likely want a join, and likely an outer join to replicate the select in the projection. Something like:
    SELECT id,stat, section, USER_ID concerned_person
    FROM table_all,
      left join table2
        on room_id = sectoion and
           sur_role = 'r001'
    WHERE section IN (SELECT code
                      FROM t_area
                      WHERE dept= 'p002')An alternative, depending on where and how you are using the statement would be something like:
    SQL> WITH t AS (
      2    select 1 id from dual union all
      3    select 2 id from dual),
      4  t1 as (
      5    select 1 id, 'One' descr from dual union all
      6    select 1, 'Un' from dual union all
      7    select 1, 'Une' from dual)
      8  SELECT t.id, CURSOR(SELECT t1.id, t1.descr from t1
      9                      WHERE t1.id = t.id)
    10  FROM t;
                      ID CURSOR(SELECTT1.ID,T
                       1 CURSOR STATEMENT : 2
    CURSOR STATEMENT : 2
                      ID DESCR
                       1 One
                       1 Un
                       1 Une
                       2 CURSOR STATEMENT : 2
    CURSOR STATEMENT : 2
    no rows selectedJohn

  • How to get all INDEXes from a database

    How to get all INDEXes in a database? I need to store them in script file (.SQL). My database version is 10.2.0.3.0.
    Edited by: Iniyavan on Sep 18, 2009 1:39 PM

    --Thanks, Koppelaars. The second query works. But I'm unable to store in spool file. May be it's due to CLOBs in the output. I did the following:
    set head off
    set feedback off
    set linesize 32727
    set pagesize 50000
    spool c:\indexes.sql
    select dbms_metadata.get_ddl('INDEX',INDEX_NAME,'MYSCHEMA')
    from user_indexes;
    spool off
    --In the spool file, I find only this
    CREATE UNIQUE INDEX "MYSCHEMA"."A" ON "MYSCHEMA"."BNK_DEALID" ("DEAL_ID")
    PCTF
    CREATE INDEX "MYSCHEMA"."ACCENT_RAC_REPORT" ON "MYSCHEMA"."ACCENT" ("SCHEME", "VAL
    CREATE INDEX "MYSCHEMA"."ACCENT_REPORT" ON "MYSCHEMA"."ACCENT" ("SCHEME", "APP_REF
    CREATE UNIQUE INDEX "MYSCHEMA"."ACCENT_X" ON "MYSCHEMA"."ACCENT" ("DEAL_ID")
    P
    CREATE UNIQUE INDEX "MYSCHEMA"."ACCNAV_X" ON "MYSCHEMA"."ACCNAV" ("SCHEME", "ACCNA
    --How to get all the DMLs in one SQL file?
    --Nagappan, I'm using WIN.

  • How to get all data from nokia to i5s

    how to get all data from nokia E71 to i5s???

    if you can put those data in your computer then add it in iTunes. your iPhone 5s should get it thru syncing.

  • How to get all the values in one column of a JTable

    How to get all the values in one column of a JTable as a Collection of String.
    I don;t want to write a for loop to say getValueAt(row, 1) eg for 2nd column.

    I don;t want to write a for loop to say getValueAt(row, 1) eg for 2nd column. You could always write a custom TableModel that stores the data in the format you want it. It would probably be about 50 lines of code. Or you could write a loop in 3 lines of code. I'll let you decide which approach you want to take.

  • How to get ALL validate-errors while insert xml-file into xml_schema_table

    How to get all validate-errors while using insert into xml_schema when having a xml-instance with more then one error inside ?
    Hi,
    I can validate a xml-file by using isSchemaValid() - function to get the validate-status 0 or 1 .
    To get a error-output about the reason I do validate
    the xml-file against xdb-schema, by insert it into schema_table.
    When more than one validate-errors inside the xml-file,
    the exception shows me the first error only.
    How to get all errors at one time ?
    regards
    Norbert
    ... for example like this matter:
    declare
         xmldoc CLOB;
         vStatus varchar
    begin     
    -- ... create xmldoc by using DBMS_XMLGEN ...
    -- validate by using insert ( I do not need insert ;-) )      
         begin
         -- there is the xml_schema in xdb with defaultTable XML_SCHEMA_DEFAULT_TABLE     
         insert into XML_SCHEMA_DEFAULT_TABLE values (xmltype(xmldoc) ) ;
         vStatus := 'XML-Instance is valid ' ;
         exception
         when others then
         -- it's only the first error while parsing the xml-file :     
              vStatus := 'Instance is NOT valid: '||sqlerrm ;
              dbms_output.put_line( vStatus );      
         end ;
    end ;

    If I am not mistaken, the you probably could google this one while using "Steven Feuerstein Validation" or such. I know I have seen a very decent validation / error handling from Steven about this.

  • How to get all previous versions page contents of a publishing page using SharePoint Client Object Model 2010

    How to get all previous versions page contents and other field values of a publishing page using SharePoint Client Object Model 2010?
    Thanks,
    Osmita

    Hi Osmita,
    Greetings.
    Here are the links that helps you. It has code attached to it.
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/a0d2ab40-99ba-4368-8505-1dc559ef6469/get-content-of-previous-version-of-page-sharepoint-2010?forum=sharepointgeneralprevious
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/faaf419f-997e-4150-9911-48cc375c3b46/how-to-get-previous-published-versions-of-publishing-pages-in-sharepoint-2010?forum=sharepointdevelopmentprevious
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • How to get all the values from a HashMap? thanks

    hi
    can anyone tell me how to get all the keys and their values contained in a HashMap? thanks

    thanks to u all for ur response, i gues if i need to get both keys and values, i need to use keySet() to get a set of keys first and then using each key to get value. is there any other faster way to get both of them (key and value)? thanks again

  • How to get all the values of a variable with F4 with checkboxes to select

    Dear Experts,
    After Executing a query by giving let 3 values(Out of 10 Values) to a variable.
    To give 2 more input values to the same variable(i.e.,total I wanted to give 5 inputs this time ),after refreshing the query,for that variable if I click F4, I am seeing the historical values(i.e.,3) and remaining 7 values also But with out any Check Boxes besides them to select the 2 inputs.
    In the same F4 Screen, If I click all values(an Icon at The bottom),then also Im seeing but no check Box.
    I hve tried by deleting the Delete Personalization also,but no use.
    Please tell me How to get all the values with F4 with check boxes to select ,whatever I want??
    Thanks in advance

    Take a look at the InfoObject and go to the Business Explorer tab. If the 'Query Def. Filter Value Selection' is set to 'Only Values in InfoProvider', you're only going to get the values in F4 that exist in the InfoProvider, not everything in the Master Data. This would need to be changed to the value of 'Values in Master Data Table' if you want it to show everything possible when F4 is chosen.
    Likewise, you're going to need to look at the query and go to the Advanced tab for the InfoObject. Make sure that the radio button for 'Values in Master Data Table' is selected. If not, then you should change that selection.

  • How to get all signature fields in a .pdf from C#

    Does anyone have some sample code that shows how to "iterate" all signatures in a .pdf from C#? Using the SDK and the Javascipt object model I know how to sign a document but I can't figure out how to "get all the signatures". Basically I want to open a .pdf file and then (from C#) find out what persons currently have signed the document. I guess I need to iterate all signature fields and then get the SignatureInfo object, or?
    Anyone?
    Cheers,
    Calle

    I am afraid this don't help me. How do I get the "data" back to C#? Looping all fields in in JavaScript is probably "easy" but I simply can't figure out how to get access to the data from C#. Any one have a suggestion on the best approach?
    Thx,
    CJ

Maybe you are looking for

  • Text variables with multiple lines

    Like in my other question: we typeset a lot of juridical books. We use text variables in the header for showing the current chapter and for example current author of that chapter. So we let the paragraph style of the chapter show in the header. When

  • Zen touch problem

    Hello everyone. I have a 20gig zen touch which was working fine . I have the latest drivers / firmware installed . But when i connect it to the computer windows says found new hardware creative zen , then opens the install new hardware part , even al

  • Camera Raw update has changed things....

    I have Canon 40D and I have the DNG converter 4.2, which is recommended for this camera. I also have the Camera Raw plugin version 3.7, which is recommended for CS2. When I would convert an image from to DNG and open it in CS2 as a Camera Raw image,

  • 23tm Multiple Monitors Touch Capability

    Me Again!! Having asked on this forum, I bought the two 23tm monitors to expand my Acer 571 laptop into a quasi desktop. I am using a Startech USB dock for the extra video ports (USB3SDOCKHD) which gives me a DVI and an HDMI output, thus providing di

  • Link button to local html page using AS3

    I am using AS3 and having trouble linking a button to a local html page