hi Prasanthi,

the code looks right,

just one thing (i am not sure if it will make any difference or not, never 
tried it your way)
why don't you try using <if-empty ... /> instead of <if-compare ... />

Thanks & Regards
Atul Vani

----- Original Message -----
From: "prasanthi_ofbiz" <[email protected]>
To: [email protected]
Sent: Wednesday, May 12, 2010 8:53:09 PM GMT +05:30 Chennai, Kolkata, Mumbai, 
New Delhi
Subject: Re: conditional form addition in the screen


Hi Atul Vani ,
        Thaks for your reply. I applied same thing but no use... Check the
below code 




<screen name="EditFinAccountTrans">
        <section>
                <condition>                     
                        <if-compare field="finAccountTransId" operator="equals" 
value="
"/>
                </condition>            
            <actions>
                <set field="titleProperty"
value="PageTitleEditFinAccountTrans"/>
                <set field="tabButtonItem" value="EditFinAccountTrans"/>
                <set field="finAccountId"
from-field="parameters.finAccountId"/>
                <set field="firstVisit" value=" "/>
                 <set field="secondVisit" value=" "/>
                <entity-one entity-name="FinAccount"
value-field="finAccount"/>
                <set field="finAccountTransId"
from-field="parameters.finAccountTransId"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonFinAccountDecorator"
location="${parameters.finAccountDecoratorLocation}">
                    <decorator-section name="body">
                        <screenlet id="FinAccountTransPanel"
title="${uiLabelMap.PageTitleEditFinAccountTrans} ${uiLabelMap.CommonFor}
${finAccount.finAccountName} [${finAccountId}]" collapsible="true">
                            <include-form name="AddFinAccountTrans"
location="component://accounting/widget/FinAccountForms.xml"/>
                        </screenlet>
                        <include-form name="ListFinAccountTransactions"
location="component://accounting/widget/FinAccountForms.xml"/>
                    </decorator-section>
                </decorator-screen>
            </widgets>            
            <fail-widgets>
                <decorator-screen name="CommonFinAccountDecorator"
location="${parameters.finAccountDecoratorLocation}">
                    <decorator-section name="body">
                        <screenlet id="FinAccountTransPanel"
title="${uiLabelMap.PageTitleEditFinAccountTrans} ${uiLabelMap.CommonFor}
${finAccount.finAccountName} [${finAccountId}]" collapsible="true">
                            <include-form name="AddFinAccountTrans"
location="component://accounting/widget/FinAccountForms.xml"/>
                        </screenlet>
                        <include-form name="ListFinAccountTransactions"
location="component://accounting/widget/FinAccountForms.xml"/>
                        <include-form name="CreateAcctgTrans1"
location="component://accounting/widget/GlForms.xml"/>
                    </decorator-section>
                </decorator-screen>            
            </fail-widgets>             
        </section>
    </screen>


Code written in bold is the extra code written by me. Before form submission
finAccountTransId  value is null, after submitting form its generating
finAccountTransId value , so before submission CreateAcctgTrans1  form
should not be included . But in both cases the form is not included. Please
help me where i did the mistake.
-- 
View this message in context: 
http://ofbiz.135035.n4.nabble.com/conditional-form-addition-in-the-screen-tp2195999p2196221.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Reply via email to