Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • BeN01
    replied
    if anyone can help me to solve my problem it would be nice
    thanks everybody

    Leave a comment:


  • BeN01
    replied
    i try this:

    Code:
    	
    recipientTo = new DataSourceEnumField( "recipientTo", "recipientTo" );
    recipientTo.setValueXPath( "//response/data/records/message/recipientTo" );
    When i call record.getAttribute("recipientTo"), that return to me
    "\n "

    and this :
    Code:
    recipientTo = new DataSourceTextField( "recipientTo", "recipientTo" );
    recipientTo.setValueXPath( "//response/data/records/message/recipientTo/Address" );
    that return me only the first Address:
    glev4retbe12345706@gmail.com

    Any help ?

    Leave a comment:


  • Isomorphic
    replied
    In this case getAttributeAsObject should return you a JavaScriptObject that contains the data in the recipientTo subelement.

    You could instead "flatten" the data model using DataSourceField.valueXPath.

    Leave a comment:


  • BeN01
    started a topic Multiline XML response

    Multiline XML response

    Hi, i have a little problem :
    I have a DataSource Associate to a form that i dont display (i reuse the response ):

    Code:
    Criteria c = new Criteria();
    		c.addCriteria( "uid", record.getAttribute( "uid" ) );
    		c.addCriteria( "folderURL", record.getAttribute( "folderURL" ) );
    		Temp.fetchData( c, new DSCallback()
    		{
    			
    			public void execute( DSResponse response, Object rawData, DSRequest request )
    			{
                              ...................................................................................
                            }

    In the rest side, i return to client the following xml :

    Code:
    <response>
      <status>0</status>
      <startRow>0</startRow>
      <endRow>1</endRow>
      <totalRows>1</totalRows>
      <data>
        <records>
          <message>
            <subject></subject>
            <sentDate>2009-02-27 12:22:08.0 CET</sentDate>
            <size>3662</size>
            <from>fayssal161466979@free.fr</from>
            <recipientTo>
              <Address>glev4retbe12345706@gmail.com</Address>
              <Name>Ben</Name>
             <Address>bob@bob.bob</Address>
              <Name>Bob</Name>
            </recipientTo>
            <uid>474</uid>
            <folderURL>gvfdg</folderURL>
            <summary>dfsg</summary>
            <content>dsfg</content>
            <seen>true</seen>
            <gotAttachment>dfsg</gotAttachment>
          </message>
        </records>
      </data>
    </response>

    On client size i try to get recipientTo,but without any success :
    Code:
    ListGridRecord[] li = response.getData();
    li[0].getAttributeAsObject( "recipientTo" );
    That return me Objet object.

    Any suggestion to get this data?
    Regards Ben
Working...
X