- Steps:
- Go to java tab in view object (say: xVO).
- Add the ViewImpl java class
- Define new public method execute the operation you want in the VO (ex: filter data by view criteria).
- Note: you may need this.executeQuery() after you code to update VO data
- Add the method to client interface of this VO
- Add VO to Application Module
- When it runs:
- Page Load:
- Drop the method from 'Data Control' into your bounded task flow as start activity
- Open binding and set the method parameters to other bind variables, literal values, or keep it blank
- Make sure the task flow share AM instance across pages in it
- Make the next page use the same VO instance in Data Control you used to create method binding.
- During Page:
- Using this code sample in bean
public void RefreshAction(ValueChangeEvent valueChangeEvent) {
BindingContainer bc = BindingContext.getCurrent().getCurrentBindingsEntry();
OperationBinding oper = bc.getOperationBinding("Your Operation Binding");
oper.getParamsMap().put(key, value); //if you have parameters and you keep it blank
this.setValueToEL("#{bindings.parameterValue.inputValue}", valueChangeEvent.getNewValue()); //if you set parameter value to another bind variable, you need to refresh it
oper.execute();
}
No comments:
Post a Comment