Setting attributes of declarative components in an application

As far as I understand, the attributes of declarative component (DC) can be set in such way:
UIXDeclarativeComponent  component = ... /* obtain component instance, no matter how */
component.getAttributes().put("<attribute name>", <attribute value>);Am I right? If so, then why the following does not work (assuming my DC has 7 af:inputTexts whose values are set to the corresponding attribute):
In a DC
<af:componentDef var="attrs" componentVar="component">
<af:inputText value="#{attrs.surnameValue}"
                    label="#{resource['Payer.Surname']}" id="p_surname"
                    autoSubmit="true" binding="#{CSJPayerSupport.surname}"/>
...and so on 7 timesIn my View Controller code (parent is UIXDeclarativeComponent)
System.out.println("dump parent attrs");
for (String s:parent.getAttributes().keySet()) {
    if (parent.getAttributes().get(s) != null)
        System.out.println("S="+s+" value ="+parent.getAttributes().get(s).toString());
    else
        System.out.println("S="+s+" value is not set");
System.out.println("===============");
parent.getAttributes().put("surnameValue", bprow.getFllastname());
parent.getAttributes().put("nameValue", bprow.getFlname());
parent.getAttributes().put("middlenameValue", bprow.getFlpatronymicname());           
parent.getAttributes().put("addressValue", bprow.getAddress());
parent.getAttributes().put("birthdayValue", bprow.getBirthday());
parent.getAttributes().put("passportnoValue", bprow.getFlpassportno());
parent.getAttributes().put("passportdateValue", bprow.getFlpassportissuedate());           
parent.getAttributes().put("passportplaceValue", bprow.getFlpassportissueplace());           
for (String s:parent.getAttributes().keySet()) {
    if (parent.getAttributes().get(s) != null)
        System.out.println("S="+s+" value ="+parent.getAttributes().get(s).toString());
    else
        System.out.println("S="+s+" value is not set");
}I see in the output, that attributes are truly set, but those values do not appear in corresponding af:inputTexts! What am I doing wrong?
Edited by: Brenagwynn on 5/2/2010 17:58

Hi,
are the values provided when the declarative component loads ? If not, try and partially refresh the declarative component so when the data is set, the UI is repainted.
Frank

Similar Messages

  • How to set the disable,visible property in declarative components.

    We have used one declarative component. It consists of 5 buttons (add,delete,save,delete,print). In all of our pages, this declarative component is used. We could bind methods and was able to use each pages seperately (by linking the methods in the backing bean)
    But for implementing the DISABLE,VISIBLE properties, we have added the attributes for this and refered this to the corresponding disable and visible property of the button. In the page all these properties where reflected. But at the runtime these buttons are not coming.
    Can anyone advise how can we set the disable,visible property in declarative components.

    Hi vikram ,
    i hvnt initialized the properties ,
    in my declarative component i have one button say Save button and i want to config 2 properties Disable and Visible
    i added two attributes ( java.lang.Boolean ) say disablr_btn ,*visible_btn* and mapped wth the Save button Properties Disabled and Visible using expressions
    Now the button is invisible while running the page.
    if i remove the mapping from properties Disable and visible , the button is visible
    should i init the properties in faces config , i dnt knw hw to init the properties
    pls advice

  • Lightweight alternative to Declarative Components?

    Hi,
    Is there a simpler, lighter way to extract part of an ADF page into a re-usable tag that can be used instead of the Declarative Components feature?
    In my application, I have a table which displays some data from a VO. Some columns are links, and there are also various buttons in and around the table that allow the user to perform a set of common actions on the table contents. I don't want to have to replicate this into all my various pages, I want to extract this into a reusable 'tag'.
    This is not a component that will be useful throughout the organisation, it's just a simple component that will be used a few times in this one application. My first idea was to use the ADF declarative component feature, but this requires deployment of a seperate JAR. I've followed various tutorials now on creating a jar then including it into my project, but I haven't succeeded so far (for some reason the jar I create doesn't seem to contain the Declarative Components I have defined). Can I not simply define some components in my own application and use them within that application without the JAR deployment step?
    I've also tried going the JSP tag route, but I need to pass objects such as the backing bean and the view object iterator to the tag and when I try and add a tag attribute with deferredValue="true", I get an error from the app server like:
    /WEB-INF/tags/attachments.tagx: Line # 9, <jsp:directive.attribute name="backingBean" required="true" deferredValue="true" type="java.lang.Object" xmlns:jsp="http://java.sun.com/JSP/Page"/>
    Error: Invalid attribute "deferredValue", for the  attribute directive with name " backingBean " when the tld version is not 2.1
         at oracle.jsp.parse.JspRTTag.<init>(JspRTTag.java:247)
         at oracle.jsp.parse.JspRTTag.<init>(JspRTTag.java:237)
         at oracle.jsp.parse.JspParseState.createTagParser(JspParseState.java:943)
         at oracle.jsp.parse.JspParseTag.genXMLSrcTag(JspParseTag.java:919)Even though my implicit.tld does have version="2.1".
    My third and final idea was to create a jsff and include it in the page via f:subview and jsp:include, however I can then only pass string type parameters (jsp:param) to the fragment. This isn't adequate, since I need to pass backing bean, view object iterator, etc.
    Surely I'm missing an easy way to do this. Any ideas?

    I've now succeeded in creating a Declarative Components library and importing those components into my project. It's a rather long winded process but if it works I guess it'll do.
    I've created a component called 'attachments', but I'm now getting the following exception when attempting to use the components in my page:
    java.io.FileNotFoundException: MDS-00013: no metadata found for metadata object "/components/attachments.jspx"
         at oracle.mds.jsp.MDSJSPProviderHelper.fromStream(MDSJSPProviderHelper.java:120)
         at oracle.adf.library.webapp.ADFJspResourceProvider.fromStream(ADFJspResourceProvider.java:333)
         at oracle.jsp.parse.XMLUtil.getFromStream(XMLUtil.java:280)
         at oracle.jsp.runtimev2.JspPageCompiler.compileBothModes(JspPageCompiler.java:477)
         at oracle.jsp.runtimev2.JspPageCompiler.parseAndGetTreeNode(JspPageCompiler.java:454)
         at oracle.jsp.runtimev2.JspPageInfo.compileAndLoad(JspPageInfo.java:653)
         at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:643)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:722)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:646)
         ...Another post on the forum says the solution is to create a pageDef file for the jspx, however I can't create a pageDef for a component as far as I can tell.
    Is there a solution here? Can MDS and Declarative Components be used together?

  • How to access/identify components in JSF Declarative Components?

    Hi,
    I am beginner on ADF. Trying to build first Declarative Components.
    Use Case is as follows -
    I have put 2 InputTexts in Declarative Component.
    Want to set some value in second InputText (txtAddressLine2) in Validator/ValueChangeListner method of first InputText(txtAddressLine2).
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <af:componentDef var="attrs" componentVar="component">
    <af:xmlContent>
    <component xmlns="http://xmlns.oracle.com/adf/faces/rich/component">
    <display-name>Test</display-name>
    <attribute>
    <attribute-name>
    AddressLine2
    </attribute-name>
    <attribute-class>
    java.lang.String
    </attribute-class>
    </attribute>
    <component-extension>
    <component-tag-namespace>Address3</component-tag-namespace>
    <component-taglib-uri>/Address3</component-taglib-uri>
    </component-extension>
    </component>
    </af:xmlContent>
    <af:inputText label="Address Line 1"
    binding="#{backing_Address3.txtAddressLine1}"
    id="txtAddressLine1"
    validator="#{backing_Address3.txtAddressLine1_validator}"
    autoSubmit="true" immediate="true" rendered="true"
    valueChangeListener="#{backing_Address3.txtAddressLine1_valueChangeListener}"/>
    <af:inputText label="Address Line 2" binding="#{backing_Address3.txtAddressLine2}"
    id="txtAddressLine2"
    validator="#{backing_Address3.txtAddressLine2_validator}"
    autoSubmit="true" immediate="true"/>
    </af:componentDef>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_Address3-->
    </jsp:root>
    This is sample I am working on.
    I am trying following approaches in bean of Component itself.
    Approach I: This does not give any error, value is not set in txtAddressLine2
    this.getTxtAddressLine2().setValue("Some Value");
    Approach II: Not able to access txtAddressLine2 using findComponent() method
    UIViewRoot uiViewRoot = facesContext.getViewRoot();
    RichInputText inputText;
    inputText = null;
    if (uiViewRoot.findComponent("txtAddressLine2") != null) {
    System.out.println("Found ");
    inputText = (RichInputText)uiViewRoot.findComponent("txtAddressLine2");
    inputText.setValue("my value");
    } else {
    System.out.println("Not Found "); //Always not found
    Can anybody tell me correct way to access components and set their values inside Declarative Components itself?

    Thanks buddies....its resolved!
    This is how I have done it -
    Components have these 2 Input Texts :
    <af:inputText label="Label 1" id="txt1" autoSubmit="true" immediate="true"
    binding="#{DC2.txt1}" validator="#{DC2.txt1_validator}"/>
    <af:inputText label="Label 2" binding="#{DC2.txt2}" id="txt2"
    immediate="true" autoSubmit="true" partialTriggers="txt1"/>
    Code in Component Bean setting value is as follows:
    RichInputText txt22;
    txt22 = getTxt2();
    txt22.setSubmittedValue("Some Value");

  • About passing the values attributes of UI components

    Hi,
    I have a question related to passing the values attributes of UI components from JSF to a baking bean.
    Assume I have inputText and I need to pass its value to the data model via an application module. So, this will be done as follows:
    <h:inputText value= "#{bindings.MyValue.inputValue}";
    I need also to pass this value to a managed bean. Therefore I used EL class prepared by Steve Muench available at:
    http://radio.weblogs.com/0118231/stories/2006/12/18/sourceForMyFavoriteElHelperClass.html
    So, in the JSF page will be as follows:
    <h:inputText value="#{myBean.myValue}";
    In managed bean:
    String myValue;
    public String get MyValue () {
    return EL.getAsString("#{bindings.MyValue.inputValue }");
    public void set MyValue t(String value) {
    EL.set("#{bindings.MyValue.inputValue }",value);
    Then when I want to use myVlaue in the managed bean just I use this line:
    myVlaue = get MyValue ();
    I tried to use the same steps to pass the value of selectOneMenu but I always get errors such as cannot be cast to java.lang.String.
    But I achived this by binding the value of selectOneMenu to a HtmlSelectOneMenu attribute in the managed bean as follows:
    In JSF page:
    <h:selectOneMenu value="#{bindings.TaskView1TaskName.inputValue}"
    binding= "#{projectBean.selectOneChoice1}">
    In managed bean:
    private HtmlSelectOneMenu selectOneChoice1;
    public void setSelectOneChoice1(HtmlSelectOneMenu selectOneChoice1) {
    this.selectOneChoice1 = selectOneChoice1;
    public HtmlSelectOneMenu getSelectOneChoice1() {
    return selectOneChoice1;
    Then I can used the selectOneChoice1 value as follows :
    somenu= getSelectOneChoice1();
    somenuValue = (Integer)somenu.getValue();
    task= taskName(somenuValue);
    this works with me. Now what is the different between this way and using EL class
    And how can I use EL class to pass the value of selectOneMenu to the managed bean
    Thank you
    Waheed

    they are look like:
    <list id="TaskView1TaskName" IterBinding="TaskView1Iterator"
    ListOperMode="0" StaticList="true">
    <AttrNames>
    <Item Value="TaskName"/>
    </AttrNames>
    <ValueList>
    <Item Value="value1"/>
    <Item Value="value2"/>
    <Item Value="value3"/>
    </ValueList>
    </list>
    and TaskName is String

  • JDeveloper 11.1.2.3, ADF Faces: aberrant behavior declarative components

    Strange things have been happening with my research into declarative components.
    1. declarative component cannot be used the within the same project it is defined. only in a separate project which consumes it as an adflib
    2. periodically, in the componentdef property inspector for my declarative component would miss displaying all values I defined for "Facet Definitions, Method Signature, Methods". Closer inspection of the code reveals that somehow, the afc tags disappeared! so the code for something like a method attribute would look like:
    <method-attribute>
      <attribute-name>
       commit
      </attribute-name>
    <method-signature>
      void method(javax.faces.event.ActionEvent)
    </method-signature>
    </method-attribute>
    ...instead of:
    <afc:method-attribute>
    <afc:attribute-name>
      commit
    </afc:attribute-name>
    <afc:method-signature>
      void method(javax.faces.event.ActionEvent)
    </afc:method-signature>
    </afc:method-attribute>
    ...3. during design time, the ActionListener attribute of a button (in the declarative component definition) shows up under "warning node" and states "Reference comp.nameofactionlistener" not found.
    Code will run but there are many warnings similar to this.
    anyone else on 11.1.2.3 have similar issues working with declarative components? i'm trying to find steps to reproduce but havent stumbled upon it yet.

    Wes,
    1) is documented at http://docs.oracle.com/cd/E35521_01/web.111230/e16181/af_reuse.htm#autoId21
    2) and 3) I personally have not stumbled upon, but if you have a reproducible test case you should open an SR or make an entry in the ADFEMF issue tracker (http://java.net/jira/browse/ADFEMG side is currently down :()
    Timo

  • Reusable toolbar with Oracle ADF declarative components(ADf code corner)

    Hi All,
    Using Jdeveloper 11.1.1.2.0.
    Following the how to achieve "reusable toolbar with Oracle ADF declarative components" published here
    [http://www.oracle.com/technology/products/jdev/tips/fnimphius/GenericMenuBar/genericMenuBar.html]
    But I am not getting any method parameters under JSP Objects -> Components when binding the buttons toolbar menu buttons.Following is the code I have in my GeneralToolbarComponent.jspx
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <af:componentDef var="attrs" componentVar="component">
    <af:toolbar id="dc_t1">
    <af:commandToolbarButton text="commandToolbarButton 1" id="dc_ctb1"/>
    <af:commandToolbarButton text="commandToolbarButton 2" id="dc_ctb2"/>
    <af:commandToolbarButton text="commandToolbarButton 3" id="dc_ctb3"/>
    <af:commandToolbarButton text="commandToolbarButton 4" id="dc_ctb4"/>
    </af:toolbar>
    <af:xmlContent>
    <component xmlns="http://xmlns.oracle.com/adf/faces/rich/component">
    <display-name>GeneralToolbarComponent</display-name>
    <attribute>
    <attribute-name>DataSet</attribute-name>
    <attribute-class>java.lang.String</attribute-class>
    </attribute>
    <component-extension>
    <component-tag-namespace>component</component-tag-namespace>
    <component-taglib-uri>/VikramLib1</component-taglib-uri>
    <method-attribute>
    <attribute-name>handleFirstMethod</attribute-name>
    <method-signature>void
    handleFirstMethod(javax.faces.event.ActionEvent)</method-signature>
    </method-attribute>
    <method-attribute>
    <attribute-name>handleLastMethod</attribute-name>
    <method-signature>void
    handleLastMethod(javax.faces.event.ActionEvent)</method-signature>
    </method-attribute>
    <method-attribute>
    <attribute-name>handleNextMethod</attribute-name>
    <method-signature>void
    handleNextMethod(javax.faces.event.ActionEvent)</method-signature>
    </method-attribute>
    <method-attribute>
    <attribute-name>handlePreviousMethod</attribute-name>
    <method-signature>void
    handlePreviousMethod(javax.faces.event.ActionEvent)</method-signature>
    </method-attribute>
    </component-extension>
    </component>
    </af:xmlContent>
    </af:componentDef>
    </jsp:root>
    Thanks
    Vikram

    Thanks for the link. We are trying to write a template as described on this link - Help on JSF Page Template
    However we are running in to issues after defining the attribute.
    Can anyone help?
    Thanks
    Ajay

  • Declarative Components field binding

    Can we bind a View Object to declarative component? I want to have a declarative component and whenever that declarative component would be used, it would be used with the same view object so i feel it extra work to bind all the attributes to view object's attributes whenever declarative component has to use. I want t create the component (declarative) and get bind it with a view object somehow and use it without every time going through to bind to view object or bind individual fields to view object's attributes. Any suggestions??
    Edited by: Mamoona on Jun 24, 2011 4:56 PM

    Hi,
    this is not what declarative components are for. Think of declarative components as standard JSF components, which you would not build tied to a specific model. If you need to wire a declarative component to a View Object then you expose an attribute on the declarative component that the consumer of the component the uses EL on to bind it e.g. to the ADF binding layer
    Frank

  • Set global font size for the whole application.

    Is there a way of setting a font globally
    What I mean I want to set a font size for the whole application.
    Is this posable ??
    Thanks Craig

    After posting over 300 questions I would think you would be passed the "New to Java TechnologY" stage.
    The answer for Swing applications is yes this can be done.
    I don't know how to do it for AWT components.
    Since you posted the question in this forum (as oppose to the Swing forum for Swing related problems), I'm assuming this is an AWT related question and therefore I can't help you.

  • ID attribute in JSF components

    Hello,
    I have a question about the id attribute on JSF 2 components.
    The document says, that it should be a String. Does that mean
    String constant or could it also be a el-expression resulting to a String.
    Actually I can use el-expression for id, but am not sure because of the documentation.
    Any infos about that would be great!

    Well, I stick with documentation. This is a specification. That means other iplementations like Apache myFaces
    will also stick to the documentation not for current mojorra implementation or others.
    That means, an implementation must not evaluate an el-expression. We ar here talking about evaluationg an
    el-expression and the documentation says, that id must not evaluate el-expressions. At least thats what i understand.
    So when i use mojorra and use el-expressions fpr id and change to apache implementation of jsf, i might be
    not working.
    Also i would get same result, if mojorra implementation someday does not evaluate el-expressions.
    So it is very important for me and i guess for JSF to clear this point cause it is important for development.
    One of the posters above mentioned it, is it possible to set dynamic ids for components or not.
    I always read that it is not wanted. Ids will be generated. But you can give a component an constant id.
    Like you can easy read in the documentation.
    You are interpreting the documentation. But JSF is a specification and should not let room for interpretations.
    If el-expressions are allowed it should be it should be documented.
    By the way, I think in apache implementation of JSF, el-expressions for id is not allowed.
    See here:
    http://www.mail-archive.com/[email protected]/msg20800.html
    So this implementation does exactly what documentation is saying so for me, mojorra implementation has here a bug!
    Edited by: 859302 on 18.05.2011 05:23

  • ADF 11g Declarative Components

    Declarative components rock! now is there a way to use them with a managed bean, for example click a button to load a table of data. After you wire this up with the managed bean, partial rendering and deploy as library it will work in a new project as a new component. However the partial submit and trigger doesn't seem to stick. It does a full page submit. Is there a solution for this???
    thanks.

    Hi,
    I have a DC, which contains a panelCollection with a toolbar and buttons in it. The panelCollection's child is a facetRef. On a consuming page I insert into the facet a table.
    How can I get the toolbar's buttons get updated, once the table's contents have changed?
    Particularly, disabled properties of the buttons are exposed as attributes of the DC. On the consuming page the attributes are bound to enabled properties of a commit and a rollback binding actions. Initially the buttons are disabled. When I change a cell's value it would be nice, if the buttons would be enabled in response without refreshing the page or invoking an execute on an undelying VO/iterator.
    Regards,
    Y.

  • ADF Mobile: Templates, Reusable regions, Declarative components

    Hi,
    Unfortunately the developer guide has no mention about how to create page templates, re-usable regions, and declarative components. Does ADF Mobile currently support them? Please shed some light.
    Thanks
    Srini

    Not right now.
    But you can use the deploy as feature to develop reusable features that can be shared among applications.
    http://docs.oracle.com/cd/E35521_01/doc.111230/e24475/deploying.htm#CHDCGBIE

  • FRM-41014: Cannot set attribute of null canvas item PO_REQ_HDR.ATTRIBUTE8

    I am Doing Form Personalization on Dff in Requisition Headers form. My Requirement is
    requirement is like this
    Segment1 : Requsition Type
    Segment2: Project ID
    Segment3: CAF ID
    ATTRIBUTE7 will have two values
    1. Capex
    2. Opex
    if user selects Capex.. then ATTRIBUTE8 and ATTRIBUTE9 are manadatory
    otherwise optional
    i did personalization
    In Condition Tab:-
    I took Trigger Event as When-Validate-Record
    Trigger Object as PO_REQ_HDR
    Condition :PO_REQ_HDR.ATTRIBUTE7='Capex'
    When i validate it gives The Condition evaluates to false
    In Action Tab:-
    Type Property
    Language All
    Object Type Item
    Target Object Po_REQ_HDR.Attribute8
    Property Name :Required
    Value:True
    then i Pressed Apply Now then It fires Error:: FRM-41014: Cannot set attribute of null canvas item PO_REQ_HDR.ATTRIBUTE8
    Can Any one please sujjest what is the Cause of this Error.
    I am Using 12.0.4 application version.

    Please see these threads.
    Re: Personalization Problem
    How can I make a DFF segment diappear?
    Thanks,
    Hussein

  • 11.1.1.6 - NPE :: Failed to apply row key set attribute change in logs

    Hi All ,
    Using  POJO Data controls and ADF Faces - Jdev 11.1.1.6.
    Setup - Tab -> taskflow ->jsff -> table
    Issue happens once I reload the taskflow . I get the below error's in the logs (only if data is populated in the table in jsff via search).
    There is no pointer to my code , this happens immediately after the iterator is refreshed in the page definition.
    Please let me know if you need any other information.
    There are various unresolved threads on this like - https://forums.oracle.com/message/10747913#10747913
    <RowKeySetAttributeChange$GetOldValueAndUpdate> <_updateKeySet> Failed to apply row key set attribute change. Reason : {1}
    java.lang.NullPointerException
      at oracle.jbo.uicli.binding.JUCtrlHierNodeBinding.<init>(JUCtrlHierNodeBinding.java:210)
      at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierNodeBinding.<init>(FacesCtrlHierNodeBinding.java:66)
      at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding.createNodeBinding(FacesCtrlHierBinding.java:94)
      at oracle.jbo.uicli.binding.JUCtrlHierBinding.createRootBinding(JUCtrlHierBinding.java:409)
      at oracle.jbo.uicli.binding.JUCtrlHierBinding.getRootNodeBinding(JUCtrlHierBinding.java:105)
      at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$HierCurrencyRowKeySet.getRowIterator(FacesCtrlHierBinding.java:1178)
      at oracle.adfinternal.view.faces.model.binding.CurrencyRowKeySet._computeCurrentRowKey(CurrencyRowKeySet.java:125)
      at oracle.adfinternal.view.faces.model.binding.CurrencyRowKeySet.iterator(CurrencyRowKeySet.java:41)
      at java.util.AbstractCollection.addAll(AbstractCollection.java:303)
      at org.apache.myfaces.trinidad.change.RowKeySetAttributeChange$GetOldValueAndUpdate._updateKeySet(RowKeySetAttributeChange.java:136)
      at org.apache.myfaces.trinidad.change.RowKeySetAttributeChange$GetOldValueAndUpdate.invokeContextCallback(RowKeySetAttributeChange.java:117)
      at org.apache.myfaces.trinidad.component.UIXCollection.invokeOnComponent(UIXCollection.java:1063)
    Message was edited by: SudiptoDesmukh

    Figured out that the issue is due to selectedRowKeys property and happens whenever the taskflow is refreshed and the iterator binding is executed. Again happens only when prior to region refresh few rows have been selected (other than first selected by default).
    Issue is I cannot remove selectedRowKeys as I need to show the first row of the table as selected.
    Will probably need to log an SR as this is happening throughout the application and looks to be a fwk issue.

  • Set Attribute using xmldom

    I have read in an xml document and provided the user with an interface to update information. I need to use this updated information to set attributes in an DOM Tree using the xmldom pl/sql package. How do I do this

    DBMS_XMLDOM.setAttribute does escape actually :
    SQL> declare
      2   doc dbms_xmldom.DOMDocument;
      3   e   dbms_xmldom.DOMElement;
      4   buf varchar2(4000);
      5  begin
      6   doc := dbms_xmldom.newDOMDocument('<dummy id1="" id2=""/>');
      7   e := dbms_xmldom.getDocumentElement(doc);
      8   dbms_xmldom.setAttribute(e, 'id1', 'R&D');
      9   dbms_xmldom.setAttribute(e, 'id2', 'X''Y');
    10   dbms_xmldom.writeToBuffer(doc, buf);
    11   dbms_xmldom.freeElement(e);
    12   dbms_xmldom.freeDocument(doc);
    13 
    14   dbms_output.put_line(buf);
    15  end;
    16  /
    <dummy id1="R&amp;D" id2="X&apos;Y"/>
    PL/SQL procedure successfully completed
    (tested on 11.2.0.2)
    What issue are you exactly having?
    Post something that we can reproduce on our end.

Maybe you are looking for