Re: Check on party fields from ftl files

2010-10-27 Thread BJ Freeman

take a look at
applications\party\webapp\partymgr\WEB-INF\actions\party

=
BJ Freeman
Strategic Power Office with Supplier Automation  

Specialtymarket.com  
Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man


Shereen sent the following on 10/27/2010 7:51 AM:


I'm thankful for your reply

I'd be grateful for anyone who can help with groovy script just getting the
customer and check for a certain field in party entity
nothing more

Thanks in advance




Re: Check on party fields from ftl files

2010-10-27 Thread BJ Freeman

Sorry I use the flow I talked to you about.
so all that is done in the Groovy.
maybe someone else will give you an answer.

=
BJ Freeman
Strategic Power Office with Supplier Automation  

Specialtymarket.com  
Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man


Shereen sent the following on 10/27/2010 7:09 AM:


It wil be the first time ever I use the groovy.
But I'll follow your advice and try this but meanwhile I'll try also to do
it using the ftl

That's what I've done till now:
<#assign orh =
Static["org.ofbiz.order.order.OrderReadHelper"].getHelper(orderHeader)>
 <#assign billToParty = orh.getBillToParty()?if_exists>
 <#assign billToPartyNameResult =
dispatcher.runSync("getPartyNameForDate",
Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId", billToParty.partyId,
"compareDate", orderHeader.orderDate, "userLogin", userLogin))/>

I think that way I'm getting the customer now I want to check on certain
field that's how I tried to check it and it gave me exception:

 <#assign reqPrepayment = billToParty.requirePrepayment/>
  the exception is
Error on line 33, column 13 in
component://order/webapp/ordermgr/order/orderinfo.ftl
billToParty.requirePrepayment is undefined. It cannot be assigned to
reqPrepayment at freemarker.core.Assignment.accept(Assignment.java:111)

where else should that field be declared and I'm really so thankful for your
help




Re: Check on party fields from ftl files

2010-10-27 Thread Shereen

It wil be the first time ever I use the groovy.
But I'll follow your advice and try this but meanwhile I'll try also to do
it using the ftl

That's what I've done till now:
<#assign orh =
Static["org.ofbiz.order.order.OrderReadHelper"].getHelper(orderHeader)>
<#assign billToParty = orh.getBillToParty()?if_exists>
<#assign billToPartyNameResult =
dispatcher.runSync("getPartyNameForDate",
Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId", billToParty.partyId,
"compareDate", orderHeader.orderDate, "userLogin", userLogin))/>

I think that way I'm getting the customer now I want to check on certain
field that's how I tried to check it and it gave me exception:

<#assign reqPrepayment = billToParty.requirePrepayment/>
 the exception is
Error on line 33, column 13 in
component://order/webapp/ordermgr/order/orderinfo.ftl
billToParty.requirePrepayment is undefined. It cannot be assigned to
reqPrepayment at freemarker.core.Assignment.accept(Assignment.java:111) 

where else should that field be declared and I'm really so thankful for your
help
-- 
View this message in context: 
http://ofbiz.135035.n4.nabble.com/Check-on-party-fields-from-ftl-files-tp3015477p3015542.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Check on party fields from ftl files

2010-10-27 Thread BJ Freeman
when you do a view, a groovy file marshals data and passed to ftl and/or 
widgets, as defined in the view.
if the screen is a widget the Groovy many be declared in the Actions 
section.
if just ftl, as defined in the view, then the groovy file with the same 
name is usually in /WEB-INF/actions


=
BJ Freeman
Strategic Power Office with Supplier Automation  

Specialtymarket.com  
Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man


Shereen sent the following on 10/27/2010 6:40 AM:


Hi all

I'm new to freemarker and I want to do some checking in the orderinfo.ftl
I want to get the customer for the order then check on certain field in the
that customer
In more detailes I've added a field to the party called requirePrepayment
now I want in the orderinfo.ftl to know the customer (the bill to party and
check on that field.

I think I'll need the orderhelper right?

would anyone suggest some code?

Thanks in advance