That is a bad design pattern. Decorators are meant to contain screen elements that are constant across screens. I recommend using the Content component for what you describe.

-Adrian

On 4/18/2012 12:41 PM, Deepika1 S wrote:
Hi All,


I have the following code in CommonScreens.xml, I  have set a session
attribute in the runtime , suppose " setType" ,it's value being  Blue.

Now what i want is , depending on the value of setType , i want to change
my decorator screen,

If setType="Blue" then, decorator-screen name is main-decorator, else if
setType="Green", i want the decorator-screen name to be main-decorator1

Is it possible ? please let me know.

Can we have an if condition in the code?

<screen name="findAmount">
                 <section>
                         <actions>
                                 <set field="MainColumnStyle" value=
"center" />
                                 <script
                                         location=
"component://ecommerce/webapp/ecommerce/WEB-INF/actions/splash/findAmount.groovy"
/>
                                 <set field="isCatalogLandingPage" value=
"Y" />
                         </actions>
                         <widgets>
                                 <decorator-screen name="main-decorator"
                                         location=
"${parameters.mainDecoratorLocation}">
                                         <decorator-section name="body">
                                                 <platform-specific>
                                                         <html>
                                                                 <
html-template

location=
"component://ecommerce/webapp/ecommerce/ftl/catalog/findAmount.ftl" />
                                                         </html>

                                                 </platform-specific>
                                         </decorator-section>
                                 </decorator-screen>

                         </widgets>
                 </section>
         </screen>



Regards,
Deepika Sahu
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you



Reply via email to