Skip to main content
14-Alexandrite
November 29, 2016
Question

Invoke javascript function after wizard step is displayed

  • November 29, 2016
  • 2 replies
  • 2047 views

Hi.

I need to invoke javascript funtion after "defineItemAttributesWizStep" is displayed.

The purpose is to set number field "readOnly=true".

How can i do it?

Action attribute "beforeJS" does not help because field is null at that time.

Thanks.

2 replies

20-Turquoise
November 29, 2016

Aleksandr Kosolapov wrote:

Hi.

I need to invoke javascript funtion after "defineItemAttributesWizStep" is displayed.

The purpose is to set number field "readOnly=true".

How can i do it?

Action attribute "beforeJS" does not help because field is null at that time.

Thanks.

I have done something similar for new part creation by adding this to the end of codebase/netmarkets/jsp/part/createPartWizard.jspf:

<script>

//Run functions after the attribute table has been loaded.

PTC.wizard

        .on(

                "afterLoadAttributeTable",

                function() {

                    //alert("Here at afterLoadAttributeTable");

                    //Needs a delay here because the "afterLoadAttribueTable" isn't really

                    //after the table has finished loading in the browser.

                    setTimeout(

                          function()

                          {

                              someJavaScriptFunctionHere();

                          }, 50);

                });

</script>

12-Amethyst
December 6, 2016

Hi,

As per your requirement, if you only want to make number as read only you can achieve the same by changing the constraint in OIR, provided the object is supported to have OIR.

Find below the link for more details regarding OIR

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS172537

another link from Help Center which detailed different constraints and their effect on UI.

http://www.ptc.com/cs/help/windchill_hc/wc110_hc/index.jspx?id=WCCG_UICust_PresentInfoUI_AttributeHandle&action=show

Best Regards,

Kaushik