Topic
  • 3 replies
  • Latest Post - ‏2013-02-12T17:47:26Z by mburati
ad9c14
ad9c14
18 Posts

Pinned topic Help need on Client Dojo Mobile Model

‏2013-02-07T20:14:53Z |
I have a simple client application model containing 2 views (inputPage & resultPage). InputPage has data page builder using variable (XML type) and set as "Data Entry". ResultPage also has data page builder using same variable as InputPage and set as "View Only". After data's entered from InputPage and submit button calls an action list and sends it to the result page. However, I'm not seeing input values when the result page is displayed.

Attached the model...

Thanks
Updated on 2013-02-12T17:47:26Z at 2013-02-12T17:47:26Z by mburati
  • jbooth
    jbooth
    78 Posts

    Re: Help need on Client Dojo Mobile Model

    ‏2013-02-11T21:43:27Z  
    For client-side applications, the design target is to use a provider/consumer architecture, most often with Client View & Form or Client Input Form builders. You can use Data Page instead of those higher-level builders, but there are two issues with the Variable in the posted model causing it to fail when used with Data Page: (1) it is created with the regular (server-side) Variable builder instead of with Client Variable; and (2) it needs to be schema typed. By using Variables created by Service Consumer instead of the Variable builder, all the operation inputs and results are automatically converted to Client Variables, and all variables are schema typed. You can use Data Page with those operation input or result variables. Hope that helps.
  • ad9c14
    ad9c14
    18 Posts

    Re: Help need on Client Dojo Mobile Model

    ‏2013-02-12T17:18:03Z  
    • jbooth
    • ‏2013-02-11T21:43:27Z
    For client-side applications, the design target is to use a provider/consumer architecture, most often with Client View & Form or Client Input Form builders. You can use Data Page instead of those higher-level builders, but there are two issues with the Variable in the posted model causing it to fail when used with Data Page: (1) it is created with the regular (server-side) Variable builder instead of with Client Variable; and (2) it needs to be schema typed. By using Variables created by Service Consumer instead of the Variable builder, all the operation inputs and results are automatically converted to Client Variables, and all variables are schema typed. You can use Data Page with those operation input or result variables. Hope that helps.
    Awesome, it worked using variable created by Service Consumer. However, I'm running into issues when a variable contains complex type elements and one of elements within complex type is also complex type. here is the schema generated using simple schema builder in my provider model.

    The element "ViewDate" is also complex type and using variable created by Service Consumer as Input Fields in my data page showes all input fields including ViewDateYyyy, ViewDateMm,and ViewDateDd. But from the result page, input values from these 3 date fields are not being displayed. Looking at the generated codes from source view of result page, I noticed the path of these 3 fields wrong while setting value using client side variable. is this bug ?

    I would think the path needs to be 'pdsConsumerGetPolicyInputs.CLPDSRequest.ViewDate.ViewDateMm' instaed...

    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://wpf.ibm.com/2002/10/generatedschema/clpdsrequest" targetNamespace="http://wpf.ibm.com/2002/10/generatedschema/clpdsrequest">
    <xsd:element name="CLPDSRequest">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="tns:UserID" minOccurs="1" maxOccurs="1" />
    <xsd:element ref="tns:AccountID" minOccurs="1" maxOccurs="1" />
    <xsd:element ref="tns:PolicyNumber" minOccurs="1" maxOccurs="1" />
    <xsd:element ref="tns:ViewDate" minOccurs="1" maxOccurs="1" />
    <xsd:element ref="tns:FetchMinimalData" minOccurs="1" maxOccurs="1" />
    </xsd:sequence>
    <xsd:attribute name="RequestType" type="xsd:string" />
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="UserID" type="xsd:string" />
    <xsd:element name="AccountID" type="xsd:string" />
    <xsd:element name="PolicyNumber" type="xsd:string" />
    <xsd:element name="ViewDate">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="tns:ViewDateYyyy" minOccurs="1" maxOccurs="1" />
    <xsd:element ref="tns:ViewDateMm" minOccurs="1" maxOccurs="1" />
    <xsd:element ref="tns:ViewDateDd" minOccurs="1" maxOccurs="1" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="ViewDateYyyy" type="xsd:string" />
    <xsd:element name="ViewDateMm" type="xsd:string" />
    <xsd:element name="ViewDateDd" type="xsd:string" />
    <xsd:element name="FetchMinimalData" type="xsd:string" />
    </xsd:schema>
  • mburati
    mburati
    2561 Posts

    Re: Help need on Client Dojo Mobile Model

    ‏2013-02-12T17:47:26Z  
    • ad9c14
    • ‏2013-02-12T17:18:03Z
    Awesome, it worked using variable created by Service Consumer. However, I'm running into issues when a variable contains complex type elements and one of elements within complex type is also complex type. here is the schema generated using simple schema builder in my provider model.

    The element "ViewDate" is also complex type and using variable created by Service Consumer as Input Fields in my data page showes all input fields including ViewDateYyyy, ViewDateMm,and ViewDateDd. But from the result page, input values from these 3 date fields are not being displayed. Looking at the generated codes from source view of result page, I noticed the path of these 3 fields wrong while setting value using client side variable. is this bug ?

    I would think the path needs to be 'pdsConsumerGetPolicyInputs.CLPDSRequest.ViewDate.ViewDateMm' instaed...

    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://wpf.ibm.com/2002/10/generatedschema/clpdsrequest" targetNamespace="http://wpf.ibm.com/2002/10/generatedschema/clpdsrequest">
    <xsd:element name="CLPDSRequest">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="tns:UserID" minOccurs="1" maxOccurs="1" />
    <xsd:element ref="tns:AccountID" minOccurs="1" maxOccurs="1" />
    <xsd:element ref="tns:PolicyNumber" minOccurs="1" maxOccurs="1" />
    <xsd:element ref="tns:ViewDate" minOccurs="1" maxOccurs="1" />
    <xsd:element ref="tns:FetchMinimalData" minOccurs="1" maxOccurs="1" />
    </xsd:sequence>
    <xsd:attribute name="RequestType" type="xsd:string" />
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="UserID" type="xsd:string" />
    <xsd:element name="AccountID" type="xsd:string" />
    <xsd:element name="PolicyNumber" type="xsd:string" />
    <xsd:element name="ViewDate">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="tns:ViewDateYyyy" minOccurs="1" maxOccurs="1" />
    <xsd:element ref="tns:ViewDateMm" minOccurs="1" maxOccurs="1" />
    <xsd:element ref="tns:ViewDateDd" minOccurs="1" maxOccurs="1" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="ViewDateYyyy" type="xsd:string" />
    <xsd:element name="ViewDateMm" type="xsd:string" />
    <xsd:element name="ViewDateDd" type="xsd:string" />
    <xsd:element name="FetchMinimalData" type="xsd:string" />
    </xsd:schema>
    With the "Client Dojo Mobile" support being a brand new feature in Web Experience Factory (WEF) v8, there are some limitations in those client apps that you may not have in the server side apps that WEF has been building for many years/releases. I believe one of those limitations is that it primarily supports a single level XML structure for the generated client side UI. There was another thread on this, in this forum, but I can't seem to locate it with the search box above at the moment.

    You may use Transform builders in your Service Provider(s) to transform your XML structures into forms more suitable for UI generation, whether building traditional server side (more JSP focussed) applications or the newer WEF v8 Client Dojo Mobile applications (where the initial pages aer served up once via JSP but then most of the page flow and data integration into pages from there happens in Javascript in the browser).

    I hope that info helps,
    ..Mike Burati
    http://www-10.lotus.com/ldd/pfwiki.nsf/
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.