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

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

Question about how to hide/show a wizard step based on type selected

CraigFinney
6-Contributor

Question about how to hide/show a wizard step based on type selected

@ShirishMorkhade Based on your reply on this topic
Three questions,

1) Why checking two types to allowed?  Specifically, why the Parent and then subtype?  Would not the parent override the subtype?  Or do you need to check parent then child?

 

2) In your example above, does "com.ptc.ptcnet.SubTypeTest1", in this example, "* Instantiable"?  Does the parent?

 

3) you mention in comments, wizardStep has to be in type.action, so for security labels on documents, would it be

            var wizardStep = "securityLabels..securityLabelStep";

 

I pulled info from the jsp/documents/create.jspf.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Thank you PetrH,

 

Some useful info in actionModels.xml to look into.

 

I was able to resolve what I need by looking at the top level parent which is a subdocument of wt.doc.WTDocument.  Ie..

DocLevel2 (not instantiable) has DocLevel3 and SecondDocLevel3 sub documents, and there is a SecondDocLevel4 (subtype of level3).

I wanted everything below DocLevel2... so I used .. really depends on how you wish to restrict the wizardStep.

if (type_beingCreated.indexOf("DocLevel2") > -1)  {....

to get all the subtype rather than check individually "wt.doc.WTDocument|DocLevel2|DocLevel3" and "wt.doc.WTDocument|DocLevel2|SecondDocLevel3|SecodDoclevel4'" etc.

 

View solution in original post

2 REPLIES 2

Hi @CraigFinney 

1. Parent is different type in the code then the subtype so you have to test both if you want to show the option on both types.

2. It does not make difference in the code. Does not matter if it is Instantiable or not. . It is important just from user perspective. If it is not Instantiable, then user can not create the part by wizard.

3. It depends how the actionModels.xml is defined. type + name of action

psb.MyStep 

HelesicPetr_0-1719302642047.png

 

PetrH

Thank you PetrH,

 

Some useful info in actionModels.xml to look into.

 

I was able to resolve what I need by looking at the top level parent which is a subdocument of wt.doc.WTDocument.  Ie..

DocLevel2 (not instantiable) has DocLevel3 and SecondDocLevel3 sub documents, and there is a SecondDocLevel4 (subtype of level3).

I wanted everything below DocLevel2... so I used .. really depends on how you wish to restrict the wizardStep.

if (type_beingCreated.indexOf("DocLevel2") > -1)  {....

to get all the subtype rather than check individually "wt.doc.WTDocument|DocLevel2|DocLevel3" and "wt.doc.WTDocument|DocLevel2|SecondDocLevel3|SecodDoclevel4'" etc.

 

Top Tags