CAF modal dialog conditional toggle

Hi,

I have the following scenario:

in a CAF Portlet after hitting an async command button executing a service on the IS, the service can respond with a status that it cannot continue.
If this is the case the portlet should show a modal dialog asking the user if he wants override the status and continue the work of the service or he wants to cancel the service.

The implemenation of the flows to be executed on the users decision is clear.

The issue is how to get the modal dialog reacting on the status of the executed service.

As fas as I can tell from my current observations is that the toggle triggers the dialog before the results of the service are available.

Any ideas how to get this solved?

Try this approach

  1. Remove the values under Toggle property in your async command button (say, async1)

  2. Add a Async hidden Command (say, hidden1) button to your form. In the toggle property of this command, add below line

#{TogglerDefaultviewView.serviceName.result.Output== “Continue”}?modalDialog:

3. In the client side events property “Click” of async1, add below line
CAF.model("#{caf:cid(‘defaultForm:hidden1’)}").raise();

HTH
Mervin

Hi Mervin,

for Point 3. I get the following error message:
com.sun.faces.el.impl.ElException: No function is mapped to the name “caf:cid”

Any idea?

that is corrent sysntax, not sure why it is not working
Alternatively, you could use below syntax to achieve the same
[B]CAF.model("#{activePageBean.clientIds[’‘defaultForm:hidden1’’]}").raise();

[/B]make sure hidden1 exists in yout form named “defaultForm”; else use only hidden1

Forgot to mention that I´m using Designer 7.1.2 with CAF 7.1.3. against MWS 7.1.3.

Did you try the with new line of code? That should work in wM 7.x