May be I am answering too late , but the question is still relevant.
Hope this may help somebody at somepoint.
So, here what I did to map the input Data from the DateRange input control to the two String fields
- DateFrom
- DateTo
Go to the bindings view , portlet bean and create a new property(say dateRangeInput) , select the data type as
“com.webMethods.caf.faces.data.object.DateRange dateRangeInput”
Bind the value from the DateRangeInput control to the variable created.
Created a action say Search and added the below code to the search action :-
public String search()
{
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
DateFormat formatter1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String D1 = formatter.format(this.getDateRangeInput().calculateStart());
String D2 = formatter.format(this.getDateRangeInput().calculateEnd());
if(D1.equals("292269055-12-02"))
this.getxxxxxx().getParameters().getxxxxxxx().getxxxxxxx().setDateFrom(null);
else
this.getxxxxxx().getParameters().getxxxxxxx().getxxxxxxx().setDateFrom(formatter1.format(this.getDateRangeInput().calculateStart()));
if(D2.equals("292278994-08-17"))
this.getxxxxxx().getParameters().getxxxxxxx().getxxxxxxx().setDateTo(null);
else
this.getxxxxxx().getParameters().getxxxxxxx().getxxxxxxx().setDateTo(formatter1.format(this.getDateRangeInput().calculateEnd()));
this.webServicexxxx().refresh();
return OUTCOME_OK;
}
And now you can the search action whereever you were calling the webservice refresh() action.
#webMethods-BPMS#webMethods#MWS-CAF-Task-Engine