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.

GUI validation on an IBA attribute value.

EldoKuriakose
1-Newbie

GUI validation on an IBA attribute value.

  1. I have defined an IBA attribute of type string.
  2. Added this to a "package" object in PDMLink/ProjectLInk 9.1
  3. When i create a package , i can see this attribute in GUI and can enter a string value.
  4. My requirement is to validate the string value entered using some validation logic through some java code and if the validation is passed then only submit the package for creation otherwise return back saying the error message.

Any idea how can i do this validation on an IBA attribute.

-EK

11 REPLIES 11

there is one mothod that you can add a listener when the package object is created, so then you validate it

Also you can write you own validator and insert them to wizard config, or you can use AJAX and add custom code into wizard jsp page. I think listener is bad way because you must show reason of problem in wizard dialog.

Thanks Ivan, any pointers(documents) regarding wizard config. In the eventlistner option, if there is an error from event listener, the error is popped up in the wizard widow and further processing is restricted. But if i can pass a proper message from the listner, insted of the error message to the popup, that will solve the issue.

Thanks stefanie, infact i did follow the listener path...but the issue is how to restrict the wizard with an appropriate massage to the user from the listener.

-Eldo

Infact I have not done windchill customization yet, so I just can't tell you that, In windchill8.0 there is a technology that called template , Maybe that can help you,

or you can search in the customization guide for some information.

Hello,

I have a similar requirement to validate IBA attribute on edit page. Did you have any resolution? If so please guide me with some sample codes.

Thanks in advance.

Tem

Want to insure you are aware their are specific type of constraints you can setup for an IBA and these constraints are automatically checked on input of the IBA. These IBA constraints are managed from within Type Manager. I've used these type of constraints to perform data validation for IBA data creation. But these type of constaints are limited.

I think you have a couple of options here.

a) If your wizard has a form processor, you can validate your IBA there. If the validation fails, return a feedback message to your wizard, otherwise simply invoke doOperation API of the parent form processor class.

b) You can write a validator and configure it in the action definition as shown below. The value of "afterVK" attribute is a validator. I hope this validator gets invoked when user navigates to next step and also when the wizard is submitted.

<action name="userInputStep" id="userInputStep" preloadWizardPage="false" hidden="true" afterVK="targetsAndAttributesValidation">

<description>User input step for Send to Distribution Target Wizard</description>

<command windowType="wizard_step" />

</action>

This is how the validator is configured in the one of the xconf files:

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

<Option requestor="null" serviceClass="com.ptc.windchill.esi.validators.TargetsAndAttributesValidator" selector="targetsAndAttributesValidation"/>

</Service>

This is how the validator class looks

public class TargetsAndAttributesValidator extends DefaultUIComponentValidator {

public UIValidationResult validateFormSubmission(

UIValidationKey paramUIValidationKey,

UIValidationCriteria paramUIValidationCriteria, Locale paramLocale)

throws WTException {

Hope this helps!

-Ismail

Ismail,

I thank you very much for your response. I’ll explore this scenario and let you know the progress.

Thanks

Tem

LoriSood
22-Sapphire II
(To:tanose)

Tem,

Did you have any luck with Ismail's suggestion?

Hi Lori,

I am prety new to windchill and my company get windchill almost 7months ago. I am at the middle of learning customization based on the customization documenation provided by PTC. I didn't implement the above at this time hence not clear with my experiance on customization. If you have any additional idea ( sample code's) that will help me out, please post on this.... That would be appriciated.

Thanks

Tem

Top Tags