hi Deepika,
You can do this.
In decorator declaration,
according to your condition you can turn decorator-name.
<decorator-screen name="${decorator-name}" location="">
location empty,if its in the same file.
Thanks
On Wed, Apr 18, 2012 at 5:11 PM, Deepika1 S <[email protected]> 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
>
>
>