Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Version: Windchill 12.1
Use Case: Real time updation of wizard steps.
Description:
Hi, I have a custom promotion request wizard in which on the 1st step i am collecting some attribute values and then using them on the 4th step to propagate the step, but if i go back to step 1 and update some attributes, the values are not reflected on the 4th step immediately. Is there a way just to reload that specific 4th wizard step.
Solved! Go to Solution.
Hi @SJ_11714880
You can use a js script to refresh the speficic wizard step.
There are some needs to setup correctly.
First I use an afterJS configuration in the actionModel.xml
<action name="ConfigEditorWizard_step1" ajax="component" afterJS="refreshInputFileName">
the afterJS is used for run a js script used in the jsp page. You can use own button if you want.
it is name of java script in the jsp file
then the refreshing wizard step has to have an ID definition in the actionModel.xml so you need to set the ID - this ID is used in js script
<action name="ConfigEditorWizard_step2" ajax="component" id="ConfigEditorWizard_step2">
Finally JS script that refresh your wizard step
function refreshInputFileName()
{
refreshStep("ConfigEditorWizard_step2");//in the customActions.xml has to be ID action definition(id=ConfigEditorWizard_step2)
return true;
}
Hope this can help you.
PetrH
Did this article not help? Not sure if you tried it:
https://www.ptc.com/en/support/article/CS253380?source=search
Its an example so you might have to tailor to your example but you are basically having it call a javascript function defined in beforeJS that does the reload. If you need specific help, would you mind sharing your setup and screen shots of wizard? Redact anything you need to.
Hi,
I have tried this solution, but on my 4th wizard its not only a table or tree builder but html tags also that needs to be re-calculated. So, this doesn't really helps me to reload the whole step.
I like learning from examples. One that might be a good source is document creation where it asks for a soft-type to be select on one screen and then presents a UI to match on the second. If you go back and change the first screen, the second must be reloaded I would assume. I would go hunting for existing examples and how they did it.
Hi @SJ_11714880
You can try to use a prereaload attribute on the wizard step.
If it is set to false, then the step is loaded after you step in.
Try it
<action name="createLiteratureStep3" preloadWizardPage="false">
also you can try opposite value 😄
PetrH
Hi @SJ_11714880
You can use a js script to refresh the speficic wizard step.
There are some needs to setup correctly.
First I use an afterJS configuration in the actionModel.xml
<action name="ConfigEditorWizard_step1" ajax="component" afterJS="refreshInputFileName">
the afterJS is used for run a js script used in the jsp page. You can use own button if you want.
it is name of java script in the jsp file
then the refreshing wizard step has to have an ID definition in the actionModel.xml so you need to set the ID - this ID is used in js script
<action name="ConfigEditorWizard_step2" ajax="component" id="ConfigEditorWizard_step2">
Finally JS script that refresh your wizard step
function refreshInputFileName()
{
refreshStep("ConfigEditorWizard_step2");//in the customActions.xml has to be ID action definition(id=ConfigEditorWizard_step2)
return true;
}
Hope this can help you.
PetrH
Hi @HelesicPetr
This is what I had found and it is working as intended.
Thank you.