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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

How to get data from ComponentBuilder by Javascript?

VasiliyRepecki
1-Newbie

How to get data from ComponentBuilder by Javascript?

Hi.

How can i get data from wizard component builder to use it in wizard step jsp by javascript?

I construct tree for wizard step and build some log message during it. Next i need to use this log message in afterJS function specified for this wizard step.

Is it possible?

Thanks.

7 REPLIES 7

Should I use afterVK validator for my problem?

KD
4-Participant
4-Participant
(To:VasiliyRepecki)

Hi,

For client side validation use afterJS and for server side you can use afterVK

Regards,

Kaushik

I use server side validation extending DefaultUIComponentValidator.

Is it possible to get NmCommandBean from UIValidationCriteria parameter in validateFormSubmission() method?

This param contains nmCommandBean but i cann't find way to get it.

It depon how you have defined your componentbuilder .

Use may use below JS API to query the HTML DOM structure .

document.getElementById

document.getElementsByTagName

document.getElementsByName

Use can first try debug you JSP(Press F12 in IE or inspect Element option in Chrome)

Try to identify DOM Structure and then query appropiately using JS API

KD
4-Participant
4-Participant
(To:VasiliyRepecki)

HI,

Correct me if I am wrong. In your case,

You are constructing tree using java class right ?

And the log is also generating through that code.

And you want to get those log message in your jsp using javascript

Are you writing the log messages in a file ?? If yes then read that file in your jsp.

Reagards,

Kaushik

It is not right solution to write in a file.

akumar-5
1-Newbie
(To:KD)

No there is no log file reading when I mentioned Debug JSP.

Windchill jsp get rendered as HTML in client browser hence through inspect element option in chrome you will be able to see your component builder id some where in HTML DOM Structure.

Once you find that where and how your component builder is paced in DOM Structure you could easily query it through java script.


Top Tags