icfnext / cq-component-maven-plugin

Other
22 stars 34 forks source link

Ability to store property in Touch UI/Classic UI node #39

Closed prabhahar closed 6 years ago

prabhahar commented 8 years ago

The presence of "validator" property for Classic-UI dialog is causing the following Js error and prevents any validation from occurring:

Uncaught TypeError: j.checkValidity is not a function

So, here is an example of our annotations usage: @DialogField( name = "xyz", additionalProperties = { @Property(name = "validator", value = "function(fieldName){" + " return MtFeedback_checkMultipleEmails(fieldName,'CC');" + "}"), @Property(name = "validation", value = "mt.email.address"), }

And in effect, with the above annotation logic, Touch-UI should have a "validation" property but not "validator". And, conversely Classic-UI should have "validator" but not "validation".

screen shot 2016-04-01 at 11 33 56 am screen shot 2016-04-01 at 11 41 27 am
pmichelotti commented 8 years ago

If I understand the issue correctly it sounds like what is needed here are additional attributes of the @Property annotation to indicate whether a particular property should output in the Touch UI dialog, the Classic UI dialog, or both.

prabhahar commented 8 years ago

Correct.

prabhahar commented 8 years ago

This project was originally developed using AEM 5.6 and we have recently migrated to 6.1 SP1. Is there any other way to resolve this issue other than adding another property in @Property annotation?

prabhahar commented 8 years ago

@pmichelotti, I just tested removing validator property from touch-ui node in CRX and I don't see any javascript error. Looks like that solved the problem. Is there any timeframe we can commit to client?

alexlockhart7 commented 8 years ago

I have been assigned to this issue for the Mettler-Toledo project. Is the additional attribute to the @Property annotation okay to move forward with? If so I can work on this and open a pull request.

pmichelotti commented 8 years ago

Sorry for the delayed response - yes I think this is a reasonable direction to move forward with.