Login  Register

Re: Users - Newbie q. on FTL

Posted by Jinsong-2 on Dec 10, 2005; 9:47am
URL: http://ofbiz.116.s1.nabble.com/Users-Newbie-q-on-FTL-tp136694p136695.html

Hi, Charles
   Hope those steps will help you understand where the 'paymentSettings' is coming from.

   First, open StoreScreens.xml in /application/product/widget directory.

 <screen name="EditProductStorePaySetup">
       <section>
            <actions>
                <set field="titleProperty" value="PageTitleEditProductStorePaySetup"/>
                <set field="headerItem" value="store"/>
                <set field="tabButtonItem" value="EditProductStorePaySetup"/>
                <set field="labelTitleProperty" value="ProductProductStorePaymentSettings"/>

                <set field="productStoreId" from-field="parameters.productStoreId"/>
                <entity-one entity-name="ProductStore" value-name="productStore" auto-field-map="true"/>

                <script location="<a href="component://product/webapp/catalog/WEB-INF/actions/store/EditProductStorePaySetup.bsh">component://product/webapp/catalog/WEB-INF/actions/store/EditProductStorePaySetup.bsh "/>
            </actions>
            <widgets>
                <decorator-screen name="CommonProductStoreDecorator" location="${parameters.mainDecoratorLocation }">
                    <decorator-section name="body">
                        <platform-specific>
                            <html><html-template location=" <a href="component://product/webapp/catalog/store/EditProductStorePaySetup.ftl">component://product/webapp/catalog/store/EditProductStorePaySetup.ftl"/></html>
                        </platform-specific>
                    </decorator-section>
                </decorator-screen>
            </widgets>
       </section>
    </screen>

the paymentSettings is coming from  EditProductStorePaySetup.bsh,

  Next step, open EditProductStorePaySetup.bsh.
at line 32, you will see where the 'paymentSettings' come from
context.put("paymentSettings", paymentSettings);

Regards

Jinsong


On 12/10/05, Charles Johnson <[hidden email]> wrote:
At the beginning of
\ofbiz\applications\product\webapp\catalog\store\EditProductStorePaySetup.ftl,
there is the following code.
I'm wondering where 'paymentSettings' is coming from? I assume something
like from the context, having been put there. But how and where?

    <#list paymentSettings as setting>
      <#assign payMeth = setting.getRelatedOne("PaymentMethodType")>
      <#assign enum = setting.getRelatedOne("Enumeration")>
      <tr>
        <td><div
class="tabletext">${payMeth.get("description",locale)}</div></td>
        <td><div
class="tabletext">${enum.get ("description",locale)}</div></td>

CJ


_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users


 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users