Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Here is a quick reference for how input and output types map from xaction xml files to an Action bean:

xaction (XML)
Action input

Java type

bean method (Java)

<myInput type="string">

java.lang.String

setMyInput(String s) { ...

<myInput type="long">

java.lang.Long

setMyInput(Long n) { ...

<myInputMap type="property-map">

java.util.Map<java.lang.String, java.lang.String>

setMyInputMap(Map<String, String> m) { ...

<myInputListMap type="property-map-list">

java.util.List<java.util.Map<java.lang.String, java.lang.String>>

setMyInputListMap(List<Map<String, String>> lm) { ...

<myInputList type="string-list">

java.util.List<java.lang.String>

setMyInputList(List<String> l) { ...

<myInput>

in this case, the Action framework does not know the type and will try to convert the data to the type specified in your Action's setter method.  If the conversion fails, you will see a warning to this effect.

setMyInput(Object o),
or
 setMyInput(SomeOtherType t) //of course this will only work if the data can be cast to a SomeOtherType type

 

 

 

xaction output

Java type

example (Java)

<myOutput type="content"/>

java.io.OutputStream

setMyOutputStream(OutputStream o) { ...

 

 

 

Resources

Outputs

Action Error Handling

...