Announcement

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

    How to pass a value into DataSource

    Default
    I am using SmartGWT 2.2

    I could like pass a value, say, 10 into a DataSource
    Should I do
    DataSource ds = ${Some datasource}
    ds.setAttribute("targetID", 10, ${allowPostCreate}); (btw, should allowPostCreate here be set to true false?)
    Or
    DSRequest dsr = new DSRequest();
    dsr.setAttribute("targetId", 10);
    ds.setRequestProperties(dsr);

    Both work, but I am not sure which one is the recommended style.

    Thanks in advance
    Sean

    #2
    Edit : You can use the first method and pass true for the allowPostCreate for custom attributes.
    Last edited by sjivan; 28 Nov 2010, 14:08.

    Comment


      #3
      Thanks, in which case should the second way be used?
      Sean

      Comment

      Working...
      X