I have a clickable image in a multi-tab tabbed table. The onclick event has two action groups (under one parent action group) with conditions. Each action group has one action. The first action group condition is "return false". Its action is a confirm that says "Test 1". The second action group condition is "return true" and its action is a confirm that says "Test 2".
When the above clickable image is anywhere but inside the tabbed table except the default tab, it appears to ignore the condition tests and as a result, both actions are triggered. If the image is inside the default tab, or if it outside of the tabbed table, it works as expected, showing on the second action (Test 2).
Note: If I replace the confirm actions with execute script actions, the conditions work. It appears this is specific to confirm actions.
Here is a sample of the clickable image code.
<xp:image url="/my.gif" id="image1" alt="Click here" style="cursor:hand;height:16.0px;width:17.0px">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete" id="eventHandler1">
<xp:this.action>
<xp:actionGroup>
<xp:actionGroup condition="#{javascript:return false;}">
<xp:confirm message="Test 1"></xp:confirm>
<xp:executeScript>
<xp:this.script><![CDATA[#{javascript:try{
var val = getComponent("cfMessage").getValue();
getComponent("cfMessage").setValue("test 1")}
catch(e){}}]]>
</xp:this.script>
</xp:executeScript>
</xp:actionGroup>
<xp:actionGroup condition="#{javascript:return true;}">
<xp:confirm message="Test 2"></xp:confirm>
<xp:executeScript>
<xp:this.script><![CDATA[#{javascript:try{
var val = getComponent("cfMessage").getValue();
getComponent("cfMessage").setValue(val+", test 2")}
catch(e){}}]]>
</xp:this.script>
</xp:executeScript>
</xp:actionGroup>
</xp:actionGroup>
</xp:this.action>
</xp:eventHandler>
</xp:image>
The tabbed table that contains this code is unexceptional. I drug a new tabbed table control onto the page, created two tabs, and added clickable images to both tab panels.
Thoughts?