Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
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.
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?
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?
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
The beforeJS works fine for Windchill 11 but the error is occurring in Windchill 12.
@VasiliyRepecki which system are you using?
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.