You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by cjhorton <ja...@gmail.com> on 2009/01/23 23:44:19 UTC

Getting an .ftl error when updating editting a custom account

Hi Everyone,

I am getting the following error message in the input box of a .ftl:

Expression utswAccountData is undefined on line 40, column 100 in
component://ecommerce/webapp/ecommerce/customer/editutswaccount.ftl. The
problematic instruction: ---------- ==>
${utswAccountData.accountNumber?if_exists} [on line 40, column 98 in
component://ecommerce/webapp/ecommerce/customer/editutswaccount.ftl]
----------  Java backtrace for programmers: ----------
freemarker.core.InvalidReferenceException: Expression utswAccountData is
undefined on line 40, column 100 in
component://ecommerce/webapp/ecommerce/customer/editutswaccount.ftl.

utswAccountData is defined in EditPaymentMethod.groovy here:

utswAccountData = paymentResults.utswAccount;
if (!tryEntity) utswAccountData = parameters;
if (!utswAccountData) utswAccountData = [:];
if (utswAccountData) context.utswAccountData = utswAccountData;


**Please keep reading if you need more information**

I created a new PaymentMethodType(UTSW_ACCOUNT) that is modeled after the
EFT_ACCOUNT.  I created and updated all necessary entities and code from
what I can tell.  When I am on the viewprofile screen and I create a new
instance of my account type(think of create new eft account), it creates
successfully, but instead of the page displaying "Edit Account" and the
input box fields being populated by the corresponding values, the page
displays Add Account and the Account Number box(this is the first field of
two) has the following error message:

Expression utswAccountData is undefined on line 40, column 100 in
component://ecommerce/webapp/ecommerce/customer/editutswaccount.ftl. The
problematic instruction: ---------- ==>
${utswAccountData.accountNumber?if_exists} [on line 40, column 98 in
component://ecommerce/webapp/ecommerce/customer/editutswaccount.ftl]
----------  Java backtrace for programmers: ----------
freemarker.core.InvalidReferenceException: Expression utswAccountData is
undefined on line 40, column 100 in
component://ecommerce/webapp/ecommerce/customer/editutswaccount.ftl.

Just like the editeftaccount, this uses the EditPaymentMethod.groovy which
uses
org.ofbiz.accounting.payment.PaymentWorker.getPaymentMethodAndRelated(). The
.groovy file contains:

utswAccountData = paymentResults.utswAccount;
if (!tryEntity) utswAccountData = parameters;
if (!utswAccountData) utswAccountData = [:];
if (utswAccountData) context.utswAccountData = utswAccountData;

and I mimiced, for the most part, the EFT snippets in the .java file.

Any suggestions?

Thanks in Advance!

-CJ

-- 
View this message in context: http://www.nabble.com/Getting-an-.ftl-error-when-updating-editting-a-custom-account-tp21633864p21633864.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Getting an .ftl error when updating editting a custom account

Posted by CJay Horton <ja...@gmail.com>.
***FIXED***

I had a subtle typo in the getPaymentMethodAndRelated().  Taking breaks are
a good thing.

On Fri, Jan 23, 2009 at 4:44 PM, cjhorton <ja...@gmail.com> wrote:

>
> Hi Everyone,
>
> I am getting the following error message in the input box of a .ftl:
>
> Expression utswAccountData is undefined on line 40, column 100 in
> component://ecommerce/webapp/ecommerce/customer/editutswaccount.ftl. The
> problematic instruction: ---------- ==>
> ${utswAccountData.accountNumber?if_exists} [on line 40, column 98 in
> component://ecommerce/webapp/ecommerce/customer/editutswaccount.ftl]
> ----------  Java backtrace for programmers: ----------
> freemarker.core.InvalidReferenceException: Expression utswAccountData is
> undefined on line 40, column 100 in
> component://ecommerce/webapp/ecommerce/customer/editutswaccount.ftl.
>
> utswAccountData is defined in EditPaymentMethod.groovy here:
>
> utswAccountData = paymentResults.utswAccount;
> if (!tryEntity) utswAccountData = parameters;
> if (!utswAccountData) utswAccountData = [:];
> if (utswAccountData) context.utswAccountData = utswAccountData;
>
>
> **Please keep reading if you need more information**
>
> I created a new PaymentMethodType(UTSW_ACCOUNT) that is modeled after the
> EFT_ACCOUNT.  I created and updated all necessary entities and code from
> what I can tell.  When I am on the viewprofile screen and I create a new
> instance of my account type(think of create new eft account), it creates
> successfully, but instead of the page displaying "Edit Account" and the
> input box fields being populated by the corresponding values, the page
> displays Add Account and the Account Number box(this is the first field of
> two) has the following error message:
>
> Expression utswAccountData is undefined on line 40, column 100 in
> component://ecommerce/webapp/ecommerce/customer/editutswaccount.ftl. The
> problematic instruction: ---------- ==>
> ${utswAccountData.accountNumber?if_exists} [on line 40, column 98 in
> component://ecommerce/webapp/ecommerce/customer/editutswaccount.ftl]
> ----------  Java backtrace for programmers: ----------
> freemarker.core.InvalidReferenceException: Expression utswAccountData is
> undefined on line 40, column 100 in
> component://ecommerce/webapp/ecommerce/customer/editutswaccount.ftl.
>
> Just like the editeftaccount, this uses the EditPaymentMethod.groovy which
> uses
> org.ofbiz.accounting.payment.PaymentWorker.getPaymentMethodAndRelated().
> The
> .groovy file contains:
>
> utswAccountData = paymentResults.utswAccount;
> if (!tryEntity) utswAccountData = parameters;
> if (!utswAccountData) utswAccountData = [:];
> if (utswAccountData) context.utswAccountData = utswAccountData;
>
> and I mimiced, for the most part, the EFT snippets in the .java file.
>
> Any suggestions?
>
> Thanks in Advance!
>
> -CJ
>
> --
> View this message in context:
> http://www.nabble.com/Getting-an-.ftl-error-when-updating-editting-a-custom-account-tp21633864p21633864.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>