SAPUI5 XML vs JS example gist

Hello,
I created a gist where you can see a simple app-page example created with JavaScript and at the bottom the corresponding XML if it would be a view (without controller.
Maybe this helps how to understand and "switch" mentally between the JavaScript syntax examples (for example here for a button SAPUI5 SDK - Demo Kit) and the now preferred XML notation of the views (SAPUI5 Explored).
Here is the gist:
https://gist.github.com/denisenepraunig/5a2049f13f8342f5608f
The example on jsbin is here:
JS Bin - Collaborative JavaScript Debugging
How do I get from JavaScript code...
var oSimpleForm = new sap.ui.layout.form.SimpleForm({ ...
to a XML view notation:
<mvc:View xmlns:f="sap.ui.layout.form" ...
<f:SimpleForm ...
or vice versa.
Hope this helps someone, at the beginning it was a mind-challenging exercise to switch between those two notations.
BR, Denise

exactly what I searched for
Working with XML views is simpler when you are not a native javascript developer !
<mvc:View xmlns:f="sap.ui.layout.form"
was my missing link - for defining all f: as linked to library sap.ui.layout.form
Thanks for sharing

Similar Messages

  • Explain about xml schema with example

    Hi,
    Kindly anybody explain about xml schema with example?
    With Regards,
    L.rajesh

    Maybe this is what you are looking for ??? If not give us more info...
    Re: How it work?

  • PLSQL XML parser modified examples

    Attachments: "1|type=application/octet-stream|desc=my personal domsample|file=domsample.sql|";"2|t
    pe=text/xml|desc=garment xml file|file=Garment.xml|";"3|type=text/xml|desc=garment xml file|file=G
    rment.xml|";"4|type=text/xml|desc=an xml file example|22661|file=Garment.xml|"
    PLSQL XML parser modified examples
    Hello Fine Folks at Oracle xml team
    Here i am again from Copenhagen Denmark.
    To day i would like to question/discuss the following things
    ItFs all about the PL/SQL XML parser which i have installed on
    my OracleServer 8i Enterprice
    Question 1
    If i want to modify DOMSAMPLE.sql or write my own program, i now
    have very few choices
    Where to look for intelligent answers to my questions.
    1. My only source here is the package body for XMLPARSER which i
    have installed under
    the user SCOTT/TIGER. I made a dump of all that code to the
    printer
    So thats my xml
    manual together with the domsample.sql
    QUESTION . Where do i find programmers reference etc. etc. etc.
    Question 2
    2. Many of the *.xml examples here on my platform have a design
    where elements have no attributes;
    But still they are "placeholders" for elemt values.
    Here is the DomSample source part iFam referring to
    -- get all elements
    nl := xmlparser.getElementsByTagName(doc, '*');
    len1 := xmlparser.getLength(nl);
    -- loop through elements
    for j in 0..len1-1 loop
    n := xmlparser.item(nl, j);
    e := xmlparser.makeElement(n);
    dbms_output.put_line(xmlparser.getTagName(e)

    Joergen Hoeyer (guest) wrote:
    : PLSQL XML parser modified examples
    : Hello Fine Folks at Oracle xml team
    : Here i am again from Copenhagen Denmark.
    : To day i would like to question/discuss the following things
    : ItFs all about the PL/SQL XML parser which i have installed on
    : my OracleServer 8i Enterprice
    : Question 1
    : If i want to modify DOMSAMPLE.sql or write my own program, i
    now
    : have very few choices
    : Where to look for intelligent answers to my questions.
    : 1. My only source here is the package body for XMLPARSER which
    i
    : have installed under
    : the user SCOTT/TIGER. I made a dump of all that code to the
    : printer
    : So thats my xml
    : manual together with the domsample.sql
    : QUESTION . Where do i find programmers reference etc. etc. etc.
    : Question 2
    : 2. Many of the *.xml examples here on my platform have a
    design
    : where elements have no attributes;
    : But still they are "placeholders" for elemt values.
    : Here is the DomSample source part iFam referring to
    : -- get all elements
    : nl := xmlparser.getElementsByTagName(doc, '*');
    : len1 := xmlparser.getLength(nl);
    : -- loop through elements
    : for j in 0..len1-1 loop
    : n := xmlparser.item(nl, j);
    : e := xmlparser.makeElement(n);
    : dbms_output.put_line(xmlparser.getTagName(e)

  • XML PUBLISHER REPORT EXAMPLEs

    Hi,
    Can any body send me the examples for creating RTF's in Oracle Applications.
    Please send me the details in this form:
    1) Business Requirement
    2) PRESENT RTF: If anything needs to be modified or updated.
    3) If we need to develop a new RTF, please mention how the output will look like along with the validations
    Please send me ASAP.
    Thanks in Advance

    Hi,
    Please refer to:
    Oracle XML Publisher User's Guide
    http://download-uk.oracle.com/docs/cd/B25516_14/current/acrobat/115xdoug.zip
    Oracle XML Publisher Report Designer's Guide
    http://download.oracle.com/docs/cd/B40089_10/current/acrobat/120xdorg.pdf
    Oracle XML Publisher Administration and Developer's Guide
    http://download.oracle.com/docs/cd/B40089_10/current/acrobat/120xdoig.pdf
    XML Tutorial
    http://www.oracle.com/technology/obe/obe_bi/xmlp_ebiz/index.html
    Regards,
    Hussein

  • Root Element Expected - XML-0801 using example w/Oracle 8.1.6

    Using the XSU readme release example #7 (Inserting XML values into all columns JAVA) gave me the same error several other threads had. I wonder if anyone got theirs to work? Using this XML in file C:\insert.xml :
    <?xml version='1.0'?>
    <ROWSET>
              <ROW num="1">
              <EMPNO>7369</EMPNO>
    <ENAME>Smith</ENAME>
    <JOB>CLERK</JOB>
    <MGR>7902</MGR>
    <HIREDATE>12/17/1980 0:0:0</HIREDATE>
    <SAL>800</SAL>
    <DEPTNO>20</DEPTNO>
    </ROW>
    <!-- additional rows ... -->
    </ROWSET>
    and this code snippet:
    Connection conn = getConnection("scott","tiger");
    OracleXMLSave sav = new OracleXMLSave(conn, "scott.emp");
    // Assume that the user passes in this document.
    // Save it in to the table.!
    sav.insertXML("C:\\insert.xml");
    sav.close();
    Any help would be greatly appreciated! Thanks ...

    actually there seems to be some pasting error and the way i have it in BI Publisher is:-
    <xml name="DovicoSK3" expressionPath=".//ROW[TRANS_ID=$TRANS_ID]">
    <url method="GET" realm="" username="" password=""> file:///C:/OracleBI/xmlp/XMLP/DemoFiles/DovicoSK3.xml</url>
    </xml>
    Edited by: user3610205 on Jun 18, 2009 12:26 PM
    (Note:- Some pasting issues
    1.Square brackets are not seen after "ROW" and after"TRANS_ID"
    2. "TRANS_ID" seen in strange way)
    Edited by: user3610205 on Jun 18, 2009 12:28 PM
    Edited by: user3610205 on Jun 18, 2009 12:32 PM

  • Search xml document by example

    Hi.
    I'd like to create a XML documents search engine. So id like to find documents that contain elements and data like in request XML document. F.E.
    there are 3 documents in the database
    #1
    <root>
    <firstname>AAA</firstname>
    <lastname>BBB</lastname>
    <nickname>CCC</nickname>
    </root>
    #2
    <root>
    <firstname>AAA</firstname>
    <lastname>DDD</lastname>
    <nickname>EEE</nickname>
    </root>
    #3
    <root>
    <firstname>FFF</firstname>
    <lastname>BBB</lastname>
    <nickname>GGG</nickname>
    </root>
    and a request xml like
    #1
    <root>
    <firstname>AAA</firstname>
    </root>
    #2
    <root>
    <lastname>BBB</lastname>
    </root>
    So, id like to get #1 and #2 documents after request #1 and #1 and #3 after request #2. If there is no <someelement> in request this mean that it's value may be ANY, and if it's empty - this element in document must be empty too.
    So, the question is:
    Is there any simple query for this or I should generate dynamic XPath query for each request?
    Thanks.

    there are different ways to parse through a xml file. you can use a SAXParser for example.
    http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/parsers/SAXParser.html
    you can find heaps of examples for that...
    http://www.brics.dk/~amoeller/XML/programming/saxexample.html

  • How we will implement SAPUI5 Routing ? Provide Example with DataModel and Screen Shots

    Hi,
          I am working on Routing and have seen one example in Blog : SAPUI5 & Netweaver Gateway CodeJam Antwerp 
    which is good, but there is no clarity on data model and screen shots of the functionality.
    As i am working this Routing on high priority, Can you please provide example with all the details?
    Thanks,
    seshu

    I would say that that SAPUI5 & Netweaver Gateway CodeJam Antwerp is enough to understand how SAPUI5 Routing is working, to see functionality just copy/paste the code to correct place.
    Another option to see SAPUI5 routing functionality is to check SAPUI5 demokit 'sap.m.SplitApp' Demo Application
    when you select item from the menu, you can see that actually url is changed
    https://sapui5.netweaver.ondemand.com/sdk/test-resources/sap/m/demokit/splitapp/index.html#/mail/item1
    Please feel free to check the source of SplitApp.

  • Any good XML over HTTP examples?

    Hi,
    Does anyone know of a good example of using a XML over HTTP web service? Especially one that would be easily graspable by someone who's new to web services (read: me)?
    Is there a way to generate stub classes from a WSDL? I tried to do it in NetBeans but it didn't work, maybe NetBeans expects SOAP web services?
    Thanks

    Hi,
    This use case seems to be best handled using a RESTful Web Service. Check the Restlet project for a supporting framework:
    http://www.restlet.org/documentation/1.0/tutorial
    Best regards,
    Jerome
    http://www.restlet.org

  • XML Purchase Order Example

    Here are the XML files define an instance of a purchase order and the type definition files and ClassDomains required to define the Purchase Order in iFS
    <?xml version="1.0" standalone="yes"?>
    <PurchaseOrder>
    <REFERENCE>AMILLER:20000328-091508137</REFERENCE>
    <REQUESTER>Angela B. Miller</REQUESTER>
    <USERID>amiller</USERID>
    <COSTCENTER>A10</COSTCENTER>
    <PONUMBER/>
    <SHIPPINGINSTRUCTIONS>
    <SHIPTONAME>George King</SHIPTONAME>
    <ADDRESS>500 Oracle Parkway MS 5op-12 Redwood Shores CA 94065</ADDRESS>
    <PHONE>650 506 7000</PHONE>
    </SHIPPINGINSTRUCTIONS>
    <SPECIALINSTRUCTIONS>Please Expidite this order</SPECIALINSTRUCTIONS>
    <REJECTION>
    <REJECTEDBY/>
    <COMMENTS/>
    </REJECTION>
    <ACTIONS>
    <ACTION>
    <ACTIONEDBY>eclark</ACTIONEDBY>
    <DATEACTIONED/>
    </ACTION>
    </ACTIONS>
    <LINEITEMS>
    <LINEITEM>
    <ITEMNUMBER>1</ITEMNUMBER>
    <QUANTITY>1</QUANTITY>
    <UNITPRICE>2999.0</UNITPRICE>
    <ITEMDESCRIPTION>Dell Laptop CPIx</ITEMDESCRIPTION>
    </LINEITEM>
    <LINEITEM>
    <ITEMNUMBER>2</ITEMNUMBER>
    <QUANTITY>2</QUANTITY>
    <UNITPRICE>299.0</UNITPRICE>
    <ITEMDESCRIPTION>Dell Battery</ITEMDESCRIPTION>
    </LINEITEM>
    <LINEITEM>
    <ITEMNUMBER>3</ITEMNUMBER>
    <QUANTITY>2</QUANTITY>
    <UNITPRICE>250.0</UNITPRICE>
    <ITEMDESCRIPTION>Dell Expansion Bay</ITEMDESCRIPTION>
    </LINEITEM>
    </LINEITEMS>
    </PurchaseOrder>
    Purchase Order Type Definition
    <?xml version="1.0" standalone="yes"?>
    <CLASSOBJECT>
    <NAME>PurchaseOrder</NAME>
    <SUPERCLASS REFTYPE="name">Document</SUPERCLASS>
    <DESCRIPTION>Internet Purchase Order</DESCRIPTION>
    <BEANCLASSPATH>ifs.demo.purchaseOrder.type.PurchaseOrder</BEANCLASSPATH>
    <ATTRIBUTES>
    <ATTRIBUTE>
    <NAME>Reference</NAME>
    <DATATYPE>String</DATATYPE>
    <DATALENGTH>64</DATALENGTH>
    </ATTRIBUTE>
    <ATTRIBUTE>
    <NAME>Requester</NAME>
    <DATATYPE>String</DATATYPE>
    <DATALENGTH>48</DATALENGTH>
    </ATTRIBUTE>
    <ATTRIBUTE>
    <NAME>UserID</NAME>
    <DATATYPE>String</DATATYPE>
    <DATALENGTH>32</DATALENGTH>
    </ATTRIBUTE>
    <ATTRIBUTE>
    <NAME>CostCenter</NAME>
    <DATATYPE>String</DATATYPE>
    <DATALENGTH>3</DATALENGTH>
    </ATTRIBUTE>
    <ATTRIBUTE>
    <NAME>Vendor</NAME>
    <DATATYPE>String</DATATYPE>
    <DATALENGTH>32</DATALENGTH>
    </ATTRIBUTE>
    <ATTRIBUTE>
    <NAME>PONumber</NAME>
    <DATATYPE>Integer</DATATYPE>
    </ATTRIBUTE>
    <ATTRIBUTE>
    <NAME>ShippingInstructions</NAME>
    <DATATYPE>PublicObject</DATATYPE>
    <CLASSDOMAIN REFTYPE="name">
    PurchaseOrderShippingInstructionsDomain
    </CLASSDOMAIN>
    </ATTRIBUTE>
    <ATTRIBUTE>
    <NAME>Rejection</NAME>
    <DATATYPE>PublicObject</DATATYPE>
    <CLASSDOMAIN REFTYPE="name">
    PurchaseOrderRejectionDomain
    </CLASSDOMAIN>
    </ATTRIBUTE>
    <ATTRIBUTE>
    <NAME>Actions</NAME>
    <DATATYPE>PublicObject_Array</DATATYPE>
    <CLASSDOMAIN REFTYPE="name">
    PurchaseOrderActionDomain
    </CLASSDOMAIN>
    </ATTRIBUTE>
    <ATTRIBUTE>
    <NAME>SpecialInstructions</NAME>
    <DATATYPE>String</DATATYPE>
    <DATALENGTH>2048</DATALENGTH>
    </ATTRIBUTE>
    <ATTRIBUTE>
    <NAME>LineItems</NAME>
    <DATATYPE>PublicObject_Array</DATATYPE>
    <CLASSDOMAIN REFTYPE="name">
    PurchaseOrderLineItemDomain
    </CLASSDOMAIN>
    </ATTRIBUTE>
    </ATTRIBUTES>
    </CLASSOBJECT>
    Purchase Order Action
    <?xml version="1.0" standalone="yes"?>
    & lt;CLASSOBJECT>
    <NAME>PurchaseOrderAction</NAME>
    <SUPERCLASS REFTYPE="name">ApplicationObject</SUPERCLASS>
    <DESCRIPTION>Internet Purchase Order</DESCRIPTION>
    <BEANCLASSPATH>ifs.demo.purchaseOrder.type.PurchaseOrderAction</BEANCLASSPATH>
    <DATABASEOBJECTNAME>POActionHistory</DATABASEOBJECTNAME>
    <ATTRIBUTES>
    <ATTRIBUTE>
    <NAME>ActionedBy</NAME>
    <DATATYPE>String</DATATYPE>
    <DATALENGTH>32</DATALENGTH>
    </ATTRIBUTE>
    <ATTRIBUTE>
    <NAME>DateActioned</NAME>
    <DATATYPE>date</DATATYPE>
    </ATTRIBUTE>
    </ATTRIBUTES>
    </CLASSOBJECT>
    Purchase Order Action Domain
    <?xml version="1.0" standalone="yes"?>
    <CLASSDOMAIN>
    <NAME>PurchaseOrderActionDomain</NAME>
    <DOMAINTYPE>1</DOMAINTYPE>
    <CLASSES>
    <CLASS REFTYPE="name">PurchaseOrderaction</CLASS>
    </CLASSES>
    </CLASSDOMAIN>
    Purchase Order Rejection
    <?xml version="1.0" standalone="yes"?>
    <CLASSOBJECT>
    <NAME>PurchaseOrderRejection</NAME>
    <SUPERCLASS REFTYPE="name">ApplicationObject</SUPERCLASS>
    <DESCRIPTION>Internet Purchase Order</DESCRIPTION>
    <DATABASEOBJECTNAME>PORejection</DATABASEOBJECTNAME>
    <BEANCLASSPATH>ifs.demo.purchaseOrder.type.PurchaseOrderRejection</BEANCLASSPATH>
    <ATTRIBUTES>
    <ATTRIBUTE>
    <NAME>RejectedBy</NAME>
    <DATATYPE>String</DATATYPE>
    <DATALENGTH>32</DATALENGTH>
    </ATTRIBUTE>
    <ATTRIBUTE>
    <NAME>DateRejected</NAME>
    <DATATYPE>date</DATATYPE>
    </ATTRIBUTE>
    <ATTRIBUTE>
    <NAME>Comments</NAME>
    <DATATYPE>String</DATATYPE>
    <DATALENGTH>2048</DATALENGTH>
    </ATTRIBUTE>
    </ATTRIBUTES>
    </CLASSOBJECT>
    Purchase Order Rejection Domain
    <?xml version="1.0" standalone="yes"?>
    <CLASSDOMAIN>
    <NAME>PurchaseOrderRejectionDomain</NAME>
    <DOMAINTYPE>1</DOMAINTYPE>
    <CLASSES>
    <CLASS REFTYPE="name">PurchaseOrderRejection</CLASS>
    </CLASSES>
    </CLASSDOMAIN>
    Purchase Order Shipping Instruction
    <?xml version="1.0" standalone="yes"?>
    <CLASSOBJECT>
    <NAME>PurchaseOrderShippingInstructions</NAME>
    <SUPERCLASS REFTYPE="name">ApplicationObject</SUPERCLASS>
    <DESCRIPTION>Internet Purchase Order</DESCRIPTION>
    <DATABASEOBJECTNAME>POShipInst</DATABASEOBJECTNAME>
    <BEANCLASSPATH>ifs.demo.purchaseOrder.type.PurchaseOrderShippingInstructions</BEANCLASSPATH>
    <ATTRIBUTES>
    <ATTRIBUTE>
    <NAME>ShipToName</NAME>
    <DATATYPE>String</DATATYPE>
    <DATALENGTH>48</DATALENGTH>
    </ATTRIBUTE>
    <ATTRIBUTE>
    <NAME>Address</NAME>
    <DATATYPE>String</DATATYPE>
    <DATALENGTH>512</DATALENGTH>
    </ATTRIBUTE>
    <ATTRIBUTE>
    <NAME>Phone</NAME>
    <DATATYPE>String</DATATYPE>
    <DATALENGTH>32</DATALENGTH>
    </ATTRIBUTE>
    </ATTRIBUTES>
    </CLASSOBJECT>
    Purchase Order Shipping Instruction Domain
    <?xml version="1.0" standalone="yes"?>
    <CLASSDOMAIN>
    <NAME>PurchaseOrderShippingInstructionsDomain</NAME>
    <DOMAINTYPE>1</DOMAINTYPE>
    <CLASSES>
    <CLASS REFTYPE="name">PurchaseOrderShippingInstructions</CLASS>
    </CLASSES>
    </CLASSDOMAIN>
    Purchase Order Line Item
    <?xml version="1.0" standalone="yes"?>
    <CLASSOBJECT>
    <NAME>PurchaseOrderLineItem</NAME>
    <SUPERCLASS REFTYPE="name">ApplicationObject</SUPERCLASS>
    <DESCRIPTION>Internet Purchase Order</DESCRIPTION>
    <BEANCLASSPATH>ifs.demo.purchaseOrder.type.PurchaseOrderLineItem</BEANCLASSPATH>
    <DATABASEOBJECTNAME>POLineItem</DATABASEOBJECTNAME>
    <ATTRIBUTES>
    <ATT RIBUTE>
    <NAME>ItemNumber</NAME>
    <DATATYPE>integer</DATATYPE>
    </ATTRIBUTE>
    <ATTRIBUTE>
    <NAME>ItemDescription</NAME>
    <DATATYPE>string</DATATYPE>
    <DATALENGTH>128</DATALENGTH>
    </ATTRIBUTE>
    <ATTRIBUTE>
    <NAME>Quantity</NAME>
    <DATATYPE>integer</DATATYPE>
    </ATTRIBUTE>
    <ATTRIBUTE>
    <NAME>UnitPrice</NAME>
    <DATATYPE>double</DATATYPE>
    </ATTRIBUTE>
    </ATTRIBUTES>
    </CLASSOBJECT>
    Purhcase Order Line Item Domain
    <?xml version="1.0" standalone="yes"?>
    <CLASSDOMAIN>
    <NAME>PurchaseOrderLineItemDomain</NAME>
    <DOMAINTYPE>1</DOMAINTYPE>
    <CLASSES>
    <CLASS REFTYPE="name">PurchaseOrderLineItem</CLASS>
    </CLASSES>
    </CLASSDOMAIN>
    null

    Hi,
    i put the example into my ifs - (it works) - but i have 2 questions:
    1.) when i look at the ifs-schema - for example ODBMS-PURCHASEORDER - i found reference-id's to REJECTIONS, SHIPPINGINSTRUNCTIONS.. but for the attributs with the datatype PublicObject_Array i found only the number of items inside. In which way is the relationship handled ??
    2.) where can i found the referenced classes from your example ?
    TIA
    Oliver

  • XML Rule + JS example: group elements under new parents

    Thanks again to everyone here for helping me get started! I'm now making real progress. In token of my appreciation, here's something that hopefully will eventually help others.
    I've worked out how to use the XML Rule facility (together w/ some JS management) to collect groups of XML elements and create new parent elements containing each group.
    The sample code here demonstrates several things in both JavaScript and InDesign Script, including:
    Use of the XML Rules facility to quickly retrieve data from the XML structure
    Use of the following-sibling XPath facility to obtain same-level XML elements
    Creating XML tags, parent elements, and moving elements
    Multi-dimensional JS array for managing XML elements
    By the way, here are a few more things that were not obvious to this noob (I'm sure they are documented; just took time to find them...)
    In the InDesign script editor, you can bring up the Object Model Viewer by pressing F1
    In the object model viewer, you must click below "Browser" and select the InDesign Object Model before doing a search
    At the following link is a list of links to incredibly valuable documents and a huge collection of "Scripting Guide" sample scripts. http://www.adobe.com/products/indesign/indepth.displayTab2.html#Scriptingresources
    Using try { xyzzy; } catch (myErr) { alert(myErr); }  ... is your friend
    Below is a description of what my sample code actually accomplishes. But first, here are some things I learned about the XML Rules facility. Probably obvious to someone who has used this before but hey, I'm new to this:
    You create a set of XML Rules and pass them to the "glue code." Each time the set of rules is run, a single (potentially complex) traversal is made through the XML Structure.
    The implication of #1 is that for any given element in the structure, the first rule that matches the element will process it. Thus, the sequence of rule definitions is always important. This both simplifies and sometimes makes more complex how one designs a set of rules.
    An example in my case:
    I wanted to collect all elements at one level into "groups", with a particular (known) tag as the first element in each group.
    It was pretty clear how to find the known tag; use an XPath like "/devices/name" if the tag is "name" underneath "/devices."
    But how to collect the intervening tags? In normal XPath/XSLT syntax, this is a bit complicated. But in the XML Rule system, it's actually easy...
    Since the first rule will always collect every "name" element, my second rule becomes simply "/devices/name/following-sibling::*" which means "collect all siblings after the 'name' element. Normally, that would include following name elements as well, but it does not do so here since the first rule collects those.
    Don't bother trying to rearrange the XML structure from within XML Rule processing. In certain limited situations it can work... but it is just as easy, and quite reliable, to collect the needed info during XML Rule processing, then make the structure changes as a later step.
    The MakeXMLGroups(myXPath,myParentTag,myHeadTag) function changes:
    Devices
       Name
       Type
       Desc
       Name
       Quantity
       Type
       Desc
       Name
       Desc
    To:
    Devices
      Device
          Name
          Type
          Desc
      Device
          Name
          Quantity
          Type
          Desc
      Device
           Name
          Desc
    In this case, the function call was MakeXMLGroups("/Devices","Device","Name").
    (NOTE: I'm on personal travel this week so may not get back to answer questions until next week...)
    Here are links to the necessary files:
    http://ds.org/files/adobe/MakeXMLGroups.jsx
    http://ds.org/files/adobe/grpXMLRulesExampleSetup.jsx
    http://ds.org/files/adobe/grpXMLRulesExampleData.xml
    Message was edited by: SLTyPete to insert file links

    Hi John,
    1) I like that the new model adds parameterization. It's cleaner than pulling in parameters from pre-set variables. However, the given example didn't actually make much use of it. The only non-constant parameter multiply-used in the example is the "table" variable. Seems like a lot of work for not a lot of gain, at least in this case?
    2) I am cautious that this new template/model condenses the paradigm sooo much, that it is no longer clear where XPath is involved vs straight constant tag names. Yes, Adobe's example is overly-expanded but that's common in code meant to be a demonstration.
    3) I also am cautious that the example intermingles direct node creation into the XPath search/processing chain. I've learned to be VERY careful with this. It only can work when the changes made do not interfere with the rule processing. In my model, I simply avoid it completely (by not making node-position or node-add/remove/move changes until after tree parsing is complete.) This will always be a safe model.
    Bottom line: while I very much appreciate the parameterization and lintability (is that a word? Sure makes sense to me )... I think I would still define each rule separately rather than bring them all together as an inline array in the rule processing call. To me it seems sooo condensed that the XPath meaning can become lost. (Would someone recognize that //para/section-head is actually an XPath statement that could (in another situation) be //para/* or //para/following-siblings::* ... while some of the other strings are exact-match tag names?)
    I realize this is all a matter of style... my preference: clarity for the future reader, particularly when the future reader is me a year later who forgot what all those parameters and embedded methods were all about ...
    Blessings,
    Pete

  • SAPUI5 XML views

    Hi Experts,
    In SAPUI5 SDK demo kit, the same codes are in XML view. I tried to search the API or library for XML view i could not find. The data binding in XML views are not clear.
    e.g. Table.view.xml
    <mvc:View
      controllerName="sap.m.sample.Table.Table"
      xmlns:l="sap.ui.layout"
      xmlns:mvc="sap.ui.core.mvc"
      xmlns="sap.m">
      <Table id="idProductsTable"
      inset="false"
      items="{
      path: '/ProductCollection',
      sorter: {
      path: 'Name'
      }">
      <headerToolbar>
      <Toolbar>
      <Label text="Products"></Label>
      </Toolbar>
      </headerToolbar>
      <columns>
      <Column
      width="12em">
      <Text text="Product" />
      </Column>
      <Column
      minScreenWidth="Tablet"
      demandPopin="true">
      <Text text="Supplier" />
      </Column>
      <Column
      minScreenWidth="Tablet"
      demandPopin="true"
      hAlign="Right">
      <Text text="Dimensions" />
      </Column>
      <Column
      minScreenWidth="Tablet"
      demandPopin="true"
      hAlign="Center">
      <Text text="Weight" />
      </Column>
      <Column
      hAlign="Right">
      <Text text="Price" />
      </Column>
      </columns>
      <items>
      <ColumnListItem>
      <cells>
      <ObjectIdentifier
      title="{Name}"
      text="{ProductId}"
      class="sapMTableContentMargin" />
      <Text
      text="{SupplierName}" />
      <Text
      text="{Width} x {Depth} x {Height} {DimUnit}" />
      <ObjectNumber
      number="{WeightMeasure}"
      unit="{WeightUnit}"
      state="{
      path: 'WeightMeasure',
      formatter: 'sap.m.sample.Table.Formatter.weightState'
      }" />
      <ObjectNumber
      number="{Price}"
      unit="{CurrencyCode}" />
      </cells>
      </ColumnListItem>
      </items>
      </Table>
    </mvc:View>
    jQuery.sap.require("sap.m.sample.Table.Formatter");
    sap.ui.controller("sap.m.sample.Table.Table", {
      onInit: function () {
      // set explored app's demo model on this sample
      var oModel = new sap.ui.model.json.JSONModel("test-resources/sap/ui/demokit/explored/products.json");
      this.getView().setModel(oModel);
    How can we bind multiple data sources in xml
    SAPUI5 Explored
    Thank You
    Regards
    Senthil Bala

    Hi Sethil,
    Have you tried loading a second model (datasource) and set to the view. Something like this:
    var oModel = new sap.ui.model.json.JSONModel("test-resources/sap/ui/demokit/explored/products.json");
    this.getView().setModel(oModel,"firstmodel");
    var oModel2 = new sap.ui.model.json.JSONModel("whatever url to your second data");
    this.getView().setModel(oModel2,"secondmodel");
    And then have your controls binding to the source of your choice like this:
    text="{firstmodel>/ProductId}"
    regards
    Sven

  • Portalapp.xml for Button Example

    HI,
    How to write Portalapp.xml file for Button Example?
    Project Name: Button
    src.core - > bean -> ButtonBean, ButtonExample.
    ButtonExample extends PageProcessorComponent.
    Button.jsp is jsp file.
    I wrote Portalapp.xml file like this:
    <?xml version="1.0" encoding="utf-8"?>
    <application>
        <application-config>
            <property name="SharingReference" value="com.sap.portal.htmlb"/>
      </application-config>
    <components>
      <component name="Button">
          <component-config>
               <property name="ClassName" value="Button.Button"/>
               <property name="SecurityZone" value="com.sap.portal.pdk/low_safety"/>
             </component-config>
          <component-profile>
               <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-profile>
        </component>
    </components>
    </application>
    The output throws some exception.
    How to modify the above code? Also where can I see the log file?
    Please guide me
    Regards,
    Ravi.

    Hi Ravi,
    You can change the code under dist/portalapps.xml, In the Outline View select the components you need to change by Right selecting it. Do changes according to your requirements.
    Award Points
    Cheers
    Venkat

  • MX 6 - prob generating xml for gallery example

    See
    http://coolabah.com/spry/demos/gallery/xml.cfm
    I have MX 6 and think this is a problem.
    I can generate what looks like xml in the browser, but when I
    try to save it to a file I get this sort of output for the above,
    <style>
    table.cfdump_wddx,
    table.cfdump_xml,
    table.cfdump_struct,
    table.cfdump_array,
    table.cfdump_query,
    table.cfdump_cfc,
    table.cfdump_object,
    table.cfdump_binary,
    table.cfdump_udf,
    table.cfdump_udfbody,
    table.cfdump_udfarguments {
    font-size: xx-small;
    font-family: verdana, arial, helvetica, sans-serif;
    cell-spacing: 2;
    etc.
    Can anyone help?
    Thanks,
    Kate

    You shouldn't search for line 145 into the CFM file but into
    the answer that is sent to the browser. The resulting XML sent by
    the CFM is invalid so you have to identify first the line 145 into
    the response and than to look where the line is generated.
    As Don did I opened the URL into Firefox and when the XML
    error displayed I look into the source (View Source). The server
    instead of serving a valid XML answer a HTML content which is not
    correct. (Maybe a CF server error ?!)
    Cristian

  • Alert is not working for mutiple times for list "select" function in sapui5 XML view

    Hello All,
    I am trying to open an alert for multiple times for list "select" function. But it's opening for only one time .
    Please find code below.
    View Part
    <List id="contactedit" select="somefunction">
        <CustomListItem id="custom1" type="Inactive" >
    <content>
    <Label text="this is label" />
    </content>
    </CustomListItem>
    </List>
    Controller Part
    somefunction: function(oEvent){
    alert("this is an alert");
    Thanks in Advance
    D.Mohanbabu

    I think I saw this question in stack overflow. And I answered it :-)
    I believe that it is because you can only one item in the list and once the item is selected, re-selecting it will not fire the event.
    Try adding more items to the list and select different items.
    Thanks
    -D

  • File adapter XML example

    Hi,
    can anyone supply me with an xml and xsd example that works?
    thanks
    amit

    hi amite,
    i've e-mailed you an example. In the example i used a bpws:getVariableData to obtain the message type, but a straight assignment would also work so long as you get the message type and not its child, see Re: xpath expression is empty for input XML file - Help!!!

Maybe you are looking for