cancel
Showing results for 
Search instead for 
Did you mean: 

Can we include Javascripts within XSDs?

nikhil
Champ in-the-making
Champ in-the-making
Hi

Can we include javascripts within XSds?

I desire to have a condition wherein i can automatically populate elements within the form based on some other particular element that the user populates.

for eg:, if a user clicks on a checkbox YES, then a portlet/element appears, or it dissappears or some value gets populated in it (something like a fixed value)

Warm Regards
Nikhil
2 REPLIES 2

kvc
Champ in-the-making
Champ in-the-making
This is currently not supported.  However, we are looking into adding support for dynamic content elements. 

You can track this issue here:

http://issues.alfresco.com/browse/WCM-376

Please feel free to add comments and specify what types of scenarios you would like supported.  We will be evaluating for our next release.

Kevin

nikhil
Champ in-the-making
Champ in-the-making
Hi,

If not javascripts, Can we include any scripting language within XSDs?.

Is there any method by which we can introduce a conditional aspect in the forms?

for eg:

Suppose i have a drop down box containing 5 values (1,2,3,4,5)

Suppose i have a textbox, the value of which depends on what the user clicks in the drop down

Suppose i want to create a condition wherein if i select any enumeration value >3, the text box automatically gets a fixed value (VERY HIGH) and if i select a value ❤️ it automatically gets populated with the value (MODERATE)

Now these two values can be hardcoded in the xsd as fixed values of elements of type xs:normalizedString (ie the text box).

So all we would need is a conditional statement that would read the values selected by the user from the drop down menus

So my question to you is, is there any method by which we can incorporate a conditional statement within the xsd itself ?

Some thing to the tune of

xs:if (value==x) xs:then (consequence)


Please guide me

Warm Regards,
Nikhil Sharma