cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Custom JavaScript for Wizard

anabors-keating
4-Participant

Custom JavaScript for Wizard

I have one wizard page which i have to block for specific type (EPMDoc-Asm & EPMDoc-Prt).

Action.xml updated with onClick = callJS function:

<objecttype name="pacwizard" class="" resourceBundle="com.pac.agile.ui.resource.NavigationRB">

  <action name="pushBOMWizard">

  <command windowType="popup" class="XXXXX" method="execute" url="netmarkets/jsp/XX/XXPushBOMWizard.jsp" onclick="callJS"/>

  </action>

  <action name="show_mvc_content_bom">

  <component windowType="wizard_step" name="com.pac.agile.bom"/>

  </action>

  <action name="show_jsp_content_bom" preloadWizardPage="false">

  <command windowType="wizard_step" url="netmarkets/jsp/pac/pacShowJspContent.jsp"/>

  </action>

  </objecttype>

Function details

netmarkets\javascript\util\cutom.js

function callJS()

{

//JS Logic to block the above mentioned type

}

Also I want to refresh the Whole wizard Step on clicking an wizard action button:

Wizard Declarations for Custom Button List:

<jca:wizard title="Publish Bill of Material" buttonList="xxxReplacementWizardButtons">

<jca:wizardStep action="show_mvc_content_bom" type="pacwizard" label="Publish BOM"/>

</jca:wizard>

Action-Model for Custom Button :

<model name="xxxReplacementWizardButtons" >

  <action name="validate"    type="bompush"/>

      <action name="publish"  type="bompush"/>

  </model>

Action details for the buttons with JS function for refresh:

<objecttype name="bompush" class="" resourceBundle="XXXXX">

       <action name="validate">

           <command class="com.XXX.agile.action.table.bom.AgileValidateBOMAction" method="execute" beforeJS="refreshBOMWizard()"/>

       </action>

    <action name="publish">

           <command class="com.XXX.agile.action.table.bom.AgilePublishBOMAction" onClick="verifyAgileResponse()"/>

       </action>

    </objecttype>

JS Function Details:

/**

* Refresh Wizard

*/

function refreshBOMWizard()

{

  alert("refreshing table");

  reloadAccessTable("com.XXX.parentDetails");

  reloadAccessTable("com.XXX.changeDetails");

  reloadAccessTable("com.XXX.childDetails");

  reloadAccessTable("com.XXX.msgDetails");

}

Unfortunately, I am not able to invoke the JS function for both scenario. I am getting JS function undefined in Console. Please provide your thought on that.

0 REPLIES 0
Announcements

Top Tags