Unable to call method multiple times in tapestry/html

50 views Asked by At

I am trying to call a task(method in java) based on a condition in tapestry.

I get the below error:

[6/17/23 2:50:17:541 UTC] 0000001d TaskEngine    E au.com.aiaa.navigation.task.TaskEngine activateExceptionPage Exception. Logged in user: Unknown, exception page activated from page: au.com.aiaa.claims.web.viewclaim.ViewClaimPage$Enhance_32@6ff66ff6[ViewClaimPage]
                                 org.apache.tapestry.ApplicationRuntimeException: Template for component ViewRequirementRetailDetailsPage contains multiple references to embedded component startCancelRequirementTask.
        at org.apache.tapestry.BaseComponentTemplateLoader.process(BaseComponentTemplateLoader.java:243)

This task should not be applicable in all scenarios. I added the below condition

<if jwcid = "isFSCIPOnly">
      <td><submit id="startCancelRequirementTask" jwcid="startCancelRequirementTask"/></td>
    </if>

The complete code is as follows:

   <if jwcid ="isFSC">
        <td></td>
        <td></td>
    <if jwcid = "isFSCIPOnly">
      <td><submit id="startCancelRequirementTask" jwcid="startCancelRequirementTask"/></td>
    </if>                
    </if>
    <td></td>
    <td></td>
    <td><submit id="startCancelRequirementTask" jwcid="startCancelRequirementTask"/></td>

How can I refer to this task multiple times?.

Regards R

0

There are 0 answers