This conversation has been locked due to inactivity. Please create a new post.
This conversation has been locked due to inactivity. Please create a new post.
Good afternoon,
Setup is: LiveCycle ES2, Flex3 form application.
The use-case boils down to having more than one action/route available at any given moment, i.e. visible and enabled. Given that there is more than a single action possible at any given time, when running the callback to FORM_SUBMIT_DATA_REQUEST occurs the first "task" is to find out which button was clicked on.
The stub code for the above use-case is illustrated below:
private function form_onSubmitDataListener( event: Event ) : void
{
var route : String = ???
if ( form_isValid( route ) == false )
return;
var data : XML = form_dataEmit( route );
lcConnector.setSubmitData( data );
}
Unfortunately, this functionality seems to be glaringly missing given that:
Even the documentation on this matter is conflicting: with regards to the callback in question, the document"Creating Flex Applications Enabled for
LiveCycle Workspace ES2" isn't clear:
So how exactly are we supposed to implement *workflow* processes if the end users are restricted, at any given moment, to clicking on a single button?
I must be very clear that the form *must* have more than a single action available: relying on hacks such as hiding and/or disabling buttons according to the current form state is exactly that: a hack. As an example, consider that the form only displays data (ie, the user is not allowed to change any of it) and just requests the users decision: Approve, Reject.
Additionally, adding a ComboBox/RadioButtonGroup to the flex form to contain that decision and having a single "Complete" button is ludicrous: it renders the out-of-the-box audit trail useless, it builds the decisions into the form and not to the process where they should belong. So this too is a hack!
Or am I missing some fineprint altogether?
Best regards,
Solved! Go to Solution.
I've never tried it but let's try something.
Use the following method's signature: private function form_onSubmitDataListener (event:SwfDataEvent):void
Then you should be able to use event.task.selectedRoute
Jasmin
I've never tried it but let's try something.
Use the following method's signature: private function form_onSubmitDataListener (event:SwfDataEvent):void
Then you should be able to use event.task.selectedRoute
Jasmin
Hey there,
Coercing the event to SwfDataEvent is pointless since the event that we receive from the UITask application is just a plain Event. Having said that, your post was extremely useful in pointing out that the Task class has a selectedRoute property. Since the UITask application binds to the Task class then if we keep a reference to the Task object we can access it once its value is modified!
I confirmed that the following solution does indeed work:
private function form_onSetWorkspaceData( event: SwfDataEvent ) : void
{
lcConnector.task = event.task;
}
private function form_onSubmitDataListener( event: Event ) : void
{
var route : String = lcConnector.task.selectedRoute;
if ( form_isValid( route ) == false )
return;
var data : XML = form_dataEmit( route );
lcConnector.setSubmitData( data );
}
Thanks!
Best regards,
Message was edited by: Filipe Toscano | Setting question as answered.
Can you help me? I am working in workbench and i want to get route button which is in workbench clicked. The application as Flash are imported in workbench. If you clicked button in workbench you will get route button which is clicked.
Thanks!
Views
Replies
Total Likes
Views
Likes
Replies