Results 1 to 2 of 2

Thread: Passing collection result of evaluation as parameter to another evaluation

  1. #1
    Join Date
    May 2007
    Posts
    157

    Default Passing collection result of evaluation as parameter to another evaluation

    In a flow, a view-state's on-entry defines two evaluate expressions each effectively making call to two different action bean methods. First action bean method returns a java.util.List<foo.bar.CustomDomainObject> and with evaluate tag that result is declared to be saved as someVar in viewScope. Second method is declared to accept that same collection with same element type, and second evaluate is declared to pass someVar from viewScope into a call of that second action bean method.

    Problem is that ReflectiveMethodResolver fails to resolve a matching MethodExecutor - TypeDescriptor's isAssignableTo method determines that collections are assignable but argument's element type (Object) descriptor and declared parameter (foo.bar.CustomDomainObject) are not assignable. Result of second evaluate is set to another viewScope variable.

    Although I think this was misuse of viewScope as view model map/object, IMO this should work as well.
    Stevo Slavic

  2. #2
    Join Date
    Nov 2008
    Posts
    742

    Default

    If you post example code and the appropriate excerpt from your flow definitions, we'll be a better position to assist.

Posting Permissions

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