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.

How to Enable a Shortcut in Organization

ptc-4698385
1-Newbie

How to Enable a Shortcut in Organization

Hi ,

I have done the follwing customization:

Added an action as a second-level navigation link in organizations .

On clicking this action a jsp page is opened which has a table view..

On this table I want to add a shortcut of 'New Change Request'. I followed all the steps as mentioned in the customizer's guide.However the icon is invisible.

When I debug , it says : Validator Status : Hidden.

Kindly guide as to how can I make those icons visible.

Attaching a few Screenshots to get the gist of the problem.

6 REPLIES 6
KD
4-Participant
4-Participant
(To:ptc-4698385)

Hello Shweta,

If the action is Hidden by a OOTB validator then you can write your own validator to overwrite that already existing validator and set that actions validator status to ENABLED

ptc-4698385
1-Newbie
(To:KD)

Hi Kaushik,

Thanks for your response.

However, is it possible to write a validator to enable action(here: Create New Change Request) at the Organization Level?Are there any restrictions at the organization level??

If yes, please let me know how can it be done.

Thanks and regards,

Shweta Joshi

KD
4-Participant
4-Participant
(To:ptc-4698385)

java class for validator :-

package study.validator;

import java.util.Locale;

import wt.util.WTException;

import com.ptc.core.ui.validation.DefaultUIComponentValidator;
import com.ptc.core.ui.validation.UIValidationCriteria;
import com.ptc.core.ui.validation.UIValidationKey;
import com.ptc.core.ui.validation.UIValidationResult;
import com.ptc.core.ui.validation.UIValidationResultSet;
import com.ptc.core.ui.validation.UIValidationStatus;

public class SelectorValidator extends DefaultUIComponentValidator
{
@Override
public UIValidationResultSet performFullPreValidation(
UIValidationKey validationkey, UIValidationCriteria validationCriteria, Locale arg2)
throws WTException {

UIValidationResultSet resultSet = UIValidationResultSet.newInstance();

UIValidationStatus status=UIValidationStatus.ENABLED;

UIValidationResult result=UIValidationResult.newInstance(validationkey,status);


resultSet.addResult(result);
return resultSet;

}
}

after this go to site.xconf and register your validator

<Service context="default" name="com.ptc.core.ui.validation.UIComponentValidator"

targetFile="codebase/service.properties">

<Option cardinality="duplicate" order="0" overridable="true" requestor="null"

selector="NAME OF THAT ACTION"

serviceClass="study.validator.SelectorValidator"/>

</Service>

Hope this will help

ptc-4698385
1-Newbie
(To:KD)

Thanks a lot this works

KD
4-Participant
4-Participant
(To:ptc-4698385)

Happy to help

Hi Shweta.

Could you provide us the code you use to do this? I need to hide the Replace Content action for a pre defined Role in Document Actions. And I believe that is the same procedure.

Eg: The guest role doesn't see the Replac Content Action in Document Details page, but all other roles can see it.

Thanks in advance

Top Tags