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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

How to refresh wizard step

VasiliyRepecki
1-Newbie

How to refresh wizard step

Hi.

I have a three-step wizard. On first two steps user can select wtparts and wtdocuments. On last third step the tree is created from previously selected objects.

If user returns to first or second step to change selection of documents, how to refresh the third-step tree with new data?

Thanks.

8 REPLIES 8

I tried to use beforeJS="myJsFunction" param in appropriate wizard action but i have an error

TypeError: wizardSteps[stepId].preloadJS is not a function

http://bntd.sniihim.ru/Windchill/netmarkets/javascript/util/windchill-all.js

2788

This error ocurs regradless of myJsFunction code.

I have a little experience in javascript and have no idea what to do.

beforeJS="myJsFunction" works only for first step, and does not work for next steps.

Why?

KD
4-Participant
4-Participant
(To:VasiliyRepecki)

Hi Vasiliy,

For third step make preloadwizardpage false.

<action name="thirdStep" id="thirdStep" preloadWizardPage="false">

<command class="ext.custom.processor" method="" windowType="wizard_step"/>

</action>

Thanks,

Kaushik

Hi, kaushik

My-actions.xml

<action name="actionName" preloadWizardPage="false" required="true" afterJS="validateStep">

<command class="" windowType="wizard_step"/>

</action>

At appropriate actionName.jsp:

<script type="text/javascript">

function validateStep() {

return confirm("validation test");

}

</script>

And the result:

0:"TypeError: wizardSteps[currentStepStrName].afterJS is not a function"

1:"http://hostname/Windchill/netmarkets/javascript/util/windchill-all.js"

2:2774

What's wrong?

KD
4-Participant
4-Participant
(To:VasiliyRepecki)

Hi Vasiliy,

Not sure what's wrong.

Is the error only coming if you are using afterJS ??

Put some alert in your javascript to check whether your javascript has been called or not .

Thanks,

Kaushik

janjobosch
5-Regular Member
(To:KD)

The beforeJS works fine for Windchill 11 but the error is occurring in Windchill 12.

 

@VasiliyRepecki  which system are you using?

janjobosch
5-Regular Member
(To:janjobosch)

Resolved!
Try removing all unused imports/include/taglib from your step jsp if any.

 

That resolved the problem for me.

While working with Windchill 12.1, adding my afterJS function to the JS page where the 'Next' button would be pressed, I also got the error message,  'TypeError: wizardSteps[currentStepStrName].afterJS is not a function' .
To resolve this, I added my function to the JSP page of the previous step, rather than the page where the 'Next' button was. Additionally, I experimented with adding my function to a specific JS file and importing it on the previous step. In both cases, the issue was resolved.

Top Tags