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

We are happy to announce the new Windchill Customization board! Learn more.

Hide an attribute on layout customization?

abennis
2-Guest

Hide an attribute on layout customization?

Hello everyone,

I have to hide an attribute on a layout when another attribute change the value.

for exemple :

Attribute A : boolean

Attribue B : String

If attribute A is false, Attribute B is hidden on the layout.

Thanks,

A.B

5 REPLIES 5
pwolski
5-Regular Member
(To:abennis)

I think you can't hide attribute, but you can make Attribute 2 not editable thanks Data Utility.

Thanks for you reply

I found out a method preValidateAttribute in DefaultUIComponentValidator, i found no documentation about that. But i will try to use this validator on my attribute.

Hi Anas Bennis‌,

It is ok if we make second attribute non-editable on editable and it depends on first attribute value we select?

For example:

IBA Not Editable.jpg

I remember I had done something like this in recent past. If that is ok for you I can again give it a try and share my findings.

Regards,

Shirish

Hi @ShirishMorkhade,

 

Can you explain me how you did that? 

It'll help me a lot.

 

Thanks

Hi @Mehmet_Ozdemir 

I believe that there are many ways how to do so. 

 

One is to use js scripts to change the attribute input field properties as a hidden, disabled and so on.

 

All you can done in JSP pages of your wizard.

 

example of the checkbox 

it reacts on a mouse click

<wrap:checkBox name="CADDocument" id="CADDocument" label="CAD Document" renderLabel="true"
renderExtra="enabled"
renderLabelOnRight="true" checked="true" onclick="defineCADType('CADDocument')"/>

example of the script

<script type="text/javascript">
    function defineCADType(buttonPushed) {
        var checked =document.getElementById('CADDocument').checked;
    if (checked !== true)
     {
      document.getElementById('prt').hidden = true;
      document.getElementById('asm').hidden = true;
      document.getElementById('drw').hidden = true;
        }else{
          document.getElementById('prt').hidden = false;
          document.getElementById('asm').hidden = false;
          document.getElementById('drw').hidden = false;
        }
    }
</script>

 

in your case you can set onChange event on a textbox

 

PetrH

 

 

Top Tags