Hi,
I have a component with design_dialogue. So in component JSP i access the field values of component via "currentStyle." object and it works great.
For example:
currentStyle.heading
currentStyle.imagePath
Now I have a requirement that i need the complete <div> of component exposed as JSON for which I am using <c:import>.
But one thing I noticed that when I access the /etc/design node directly using ".html" at end then all the field values are stored in "properties" implict
<c:import var="compDiv1" url="/etc/designs/global/en_US/jcr:content/mySite1/myComp1.html"/>
<c:import var="compDiv2" url="/etc/designs/global/en_US/jcr:content/mySite1/myComp2.html"/>
<c:import var="compDiv3" url="/etc/designs/global/en_US/jcr:content/mySite1/myComp3.html"/>
So in JSP i might need to write duplicate code of checking if the variable (or field) value is NOT BLANK in "currentStyle" object then take values from "currentStyle" or object otherwise take from "properties" object.
Is there any better way to handle this situation ?
Thanks in advance.