Announcement Announcement Module
Collapse
No announcement yet.
dataModel conversion to and from Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • dataModel conversion to and from

    When my evaluate returns a generic List<BillItem>:

    Code:
    <evaluate expression="billingService.clearAddItems()" result="flowScope.itemToAddList" result-type="dataModel"/>
    Now suppose I want to pass the wrapped flowScope.itemToAddList as a parameter to another, how do I do it?

    Code:
    <evaluate expression="billingService.deleteItems(flowScope.itemToAddList)" result="flowScope.itemToAddList" result-type="dataModel"/>
    This above code only works if deleteItems accepts a OneSelectionTrackingListDataModel parameter. Who decided that dataModel meant this? Can I unwrap the dataModel before passing the parameter equivalent to below:

    Code:
    <evaluate expression="billingService.deleteItems(flowScope.itemToAddList.data)" result="flowScope.itemToAddList" result-type="dataModel"/>
    PLEASE HELP!!

  • #2
    dataModel is documentation that it returns a DataModel (for use in JSF) instead of a list. There is type conversion going on because you configured it so. If you don't want it to be a DataModel then don't specify it.

    You can try the wrappedData property of DataModel (check the jsf javadocs).

    Comment

    Working...
    X