ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas Malin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-9258) Render form values from pulled data
Date Wed, 15 Mar 2017 09:42:41 GMT

    [ https://issues.apache.org/jira/browse/OFBIZ-9258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15925808#comment-15925808
] 

Nicolas Malin commented on OFBIZ-9258:
--------------------------------------

Hi James, 
I review the patch and you are on the good goal but I think not on the best way.

Call a specific render need to come from the controller and not from the context attribut.

I take an example with a button who return a party data list 
{code}
<grid name="partyDataList">
  <field name="partyId"><display/></field>
  <field name="statusId"><display-entity entity-name="StatusItem"/></field>
</grid>

<screen name="partyDataList">
  <section><actions><entity-condition entity-name="Party"/></actions>
    <widgets><include-grid name="partyDataList" location="..."/></widgets>
  </section>
</screen>
{code}
{code}
<request-map uri="ResolvePartyDataList"><security https="true" auth="true"/><response
name="success" type="view" value="ResolvePartyDataList"/></request-map>

<view-map name="ResolvePartyDataList" type="screenjson" page="component://...#ResolvePartyDataList"/>
{code}
And when you call the uri ResolvePartyDataList from your js framework the controller rendering
the your from as json.

But on the same way you can set
{code}
<request-map uri="ResolvePartyDataListCSV"><security https="true" auth="true"/><response
name="success" type="view" value="ResolvePartyDataListCSV"/></request-map>
<view-map name="ResolvePartyDataListCSV" type="screencsv" page="component://...#ResolvePartyDataList"/>
{code}
and your form will rendering as csv.

I hope this help you to find the good way :)

> Render form values from pulled data
> -----------------------------------
>
>                 Key: OFBIZ-9258
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9258
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: Upcoming Release
>            Reporter: James Yong
>            Assignee: James Yong
>            Priority: Minor
>         Attachments: OFBIZ-9258.patch
>
>
> Currently, form data is being rendered together with the form widgets. To better facilitate
the use of Single Page or Mobile Application in the future, it would be better to let the
form widgets pull data from the server instead.
> An initial discussion was made at http://ofbiz.135035.n4.nabble.com/Render-table-rows-from-pulled-data-td4703142.html



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message