Results 1 to 2 of 2

Thread: dataModel conversion to and from

  1. #1

    Unhappy 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. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,695

    Default

    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).
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •