Re-Populate form fields after failed validation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Re-Populate form fields after failed validation

bsanders1979
Hello,

I am searching the docs for the answer, but have not found it yet. I am
calling a service which needs to perform some validation. If the
validation fails, certain text boxes lose their values when I am
returned to the form. How could I go about re-populating the fields?
Also, would anyone recommend against validating client-side using
Ajax/SOAP? Basically, I need to check the actual weights of packages
against their estimated weight on the Pack-Out screen. Thanks.

 

Brian Sanders

 

Reply | Threaded
Open this post in threaded view
|

ofbiz release 4.0 to linux

Jacek Wagner
Hello,

Working off windows I deployed ofbiz (ant run-install) a number of times
with no problems.
When I tried to deploy on linux most of the seed data did not make to db.
The schema looked OK, some tables, but not all were properly populated.
As a result ecommerce does not show any content.
Is there any "magic" switch to deploy ofbiz properly on the linux box?

Jacek
Reply | Threaded
Open this post in threaded view
|

Re: Re-Populate form fields after failed validation

BJ Freeman
In reply to this post by bsanders1979
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

if the service does not remove any data from the maps, it should return.
for scales try using the applications\product\src\ShipmentScaleApplet.java
it is remarked out in the build.

Sanders, Brian sent the following on 2/18/2009 10:27 AM:

> Hello,
>
> I am searching the docs for the answer, but have not found it yet. I am
> calling a service which needs to perform some validation. If the
> validation fails, certain text boxes lose their values when I am
> returned to the form. How could I go about re-populating the fields?
> Also, would anyone recommend against validating client-side using
> Ajax/SOAP? Basically, I need to check the actual weights of packages
> against their estimated weight on the Pack-Out screen. Thanks.
>
>  
>
> Brian Sanders
>
>  
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJnHc2rP3NbaWWqE4RArCyAJ4ql2Njmzy4th92lQqDpezjmr5oZwCcDdeV
rPrXxSU3w9LCKvEXhFerV18=
=F0f3
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

Re: ofbiz release 4.0 to linux

BJ Freeman
In reply to this post by Jacek Wagner
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

no
I compile on windows and ftp to server.
make sure you have all the data files uploaded and your server configured.
remember linux has permissions.

Jacek Wagner sent the following on 2/18/2009 12:47 PM:

> Hello,
>
> Working off windows I deployed ofbiz (ant run-install) a number of times
> with no problems.
> When I tried to deploy on linux most of the seed data did not make to db.
> The schema looked OK, some tables, but not all were properly populated.
> As a result ecommerce does not show any content.
> Is there any "magic" switch to deploy ofbiz properly on the linux box?
>
> Jacek
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJnHf6rP3NbaWWqE4RAvXYAKCiYpgFilBPMueumCkS/iuhvs+OPACfU/wr
UEcWKTh98coDLspF7iELDyY=
=roL1
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

RE: Re-Populate form fields after failed validation

bsanders1979
In reply to this post by BJ Freeman
Actually, I just figured it out a little while ago. The "completePack"
service is getting called when the form is submitted. In that same class
(PackingServices), there is a function named "setSessionPackageWeights".
If I call that before returning an error, then the text fields retain
their values.

Brian Sanders


-----Original Message-----
From: BJ Freeman [mailto:[hidden email]]
Sent: Wednesday, February 18, 2009 4:02 PM
To: [hidden email]
Subject: Re: Re-Populate form fields after failed validation

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

if the service does not remove any data from the maps, it should return.
for scales try using the
applications\product\src\ShipmentScaleApplet.java
it is remarked out in the build.

Sanders, Brian sent the following on 2/18/2009 10:27 AM:
> Hello,
>
> I am searching the docs for the answer, but have not found it yet. I
am

> calling a service which needs to perform some validation. If the
> validation fails, certain text boxes lose their values when I am
> returned to the form. How could I go about re-populating the fields?
> Also, would anyone recommend against validating client-side using
> Ajax/SOAP? Basically, I need to check the actual weights of packages
> against their estimated weight on the Pack-Out screen. Thanks.
>
>  
>
> Brian Sanders
>
>  
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJnHc2rP3NbaWWqE4RArCyAJ4ql2Njmzy4th92lQqDpezjmr5oZwCcDdeV
rPrXxSU3w9LCKvEXhFerV18=
=F0f3
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

Re: ofbiz release 4.0 to linux

Tim Ruppert
In reply to this post by Jacek Wagner
Can't speak to the branch specifically, but we deploy to linux all the time with absolutely no issues.

Cheers,
Tim
--
Tim Ruppert
HotWax Media
http://www.hotwaxmedia.com

o:801.649.6594
f:801.649.6595

----- "Jacek Wagner" <[hidden email]> wrote:

> Hello,
>
> Working off windows I deployed ofbiz (ant run-install) a number of
> times
> with no problems.
> When I tried to deploy on linux most of the seed data did not make to
> db.
> The schema looked OK, some tables, but not all were properly
> populated.
> As a result ecommerce does not show any content.
> Is there any "magic" switch to deploy ofbiz properly on the linux
> box?
>
> Jacek
Reply | Threaded
Open this post in threaded view
|

Re: ofbiz release 4.0 to linux

Jacques Le Roux
Administrator
I deploy R4 on Ubuntu here with absolutely no problems (using Apache HTTPD in front and mod_proxy_ajp)
http://docs.ofbiz.org/display/OFBIZ/Alternative+Demo+Servers#AlternativeDemoServers-Release4.0

Jacques

From: "Tim Ruppert" <[hidden email]>

> Can't speak to the branch specifically, but we deploy to linux all the time with absolutely no issues.
>
> Cheers,
> Tim
> --
> Tim Ruppert
> HotWax Media
> http://www.hotwaxmedia.com
>
> o:801.649.6594
> f:801.649.6595
>
> ----- "Jacek Wagner" <[hidden email]> wrote:
>
>> Hello,
>>
>> Working off windows I deployed ofbiz (ant run-install) a number of
>> times
>> with no problems.
>> When I tried to deploy on linux most of the seed data did not make to
>> db.
>> The schema looked OK, some tables, but not all were properly
>> populated.
>> As a result ecommerce does not show any content.
>> Is there any "magic" switch to deploy ofbiz properly on the linux
>> box?
>>
>> Jacek
>

Reply | Threaded
Open this post in threaded view
|

Re: ofbiz release 4.0 to linux

Jacek Wagner
Jacques Le Roux wrote:

> I deploy R4 on Ubuntu here with absolutely no problems (using Apache
> HTTPD in front and mod_proxy_ajp)
> http://docs.ofbiz.org/display/OFBIZ/Alternative+Demo+Servers#AlternativeDemoServers-Release4.0 
>
>
> Jacques
>
> From: "Tim Ruppert" <[hidden email]>
>> Can't speak to the branch specifically, but we deploy to linux all
>> the time with absolutely no issues.
>>
>> Cheers,
>> Tim
>> --
>> Tim Ruppert
>> HotWax Media
>> http://www.hotwaxmedia.com
>>
>> o:801.649.6594
>> f:801.649.6595
>>
>> ----- "Jacek Wagner" <[hidden email]> wrote:
>>
>>> Hello,
>>>
>>> Working off windows I deployed ofbiz (ant run-install) a number of
>>> times with no problems.
>>> When I tried to deploy on linux most of the seed data did not make to
>>> db.
>>> The schema looked OK, some tables, but not all were properly
>>> populated. As a result ecommerce does not show any content.
>>> Is there any "magic" switch to deploy ofbiz properly on the linux
>>> box?
>>>
>>> Jacek
>>
>
Thank to all who responded. -- Jacek
Reply | Threaded
Open this post in threaded view
|

Screen-Widget enforce non-empty fields

Jacek Wagner
In reply to this post by Jacques Le Roux
All,

Is there an easy way to enforce a non-empty fields in the screen-widget
form without using a complex service like createCustomer

When it comes to drop-down you can allow-empty to false or true. What
about other fields?

Jacek
Reply | Threaded
Open this post in threaded view
|

expending OrderLookupServices

Jacek Wagner
All,

I am expending findOrders (OrderLookupServices)  by adding  
OrderAttribute and Payment as searchable entities.

The OrderAttribute works as expected
        // search by child name
        if (UtilValidate.isNotEmpty(childName)) {
            dve.addMemberEntity("OA", "OrderAttribute");
            dve.addAlias("OA", "attrValue");
            dve.addViewLink("OH", "OA", Boolean.FALSE,
UtilMisc.toList(new ModelKeyMap("orderId", "orderId")));
            paramList.add("attrValue=" + childName);
            conditions.add(makeExpr("attrValue", childName));
        }

but

        // search by payment ref number
        if (UtilValidate.isNotEmpty(paymentRefNum)) {
            dve.addMemberEntity("PT", "Payment");
            dve.addAlias("PT", "paymentRefNum");
            dve.addViewLink("OP", "PT", Boolean.FALSE,
UtilMisc.toList(new ModelKeyMap("orderPaymentPreferenceId",
"paymentPreferenceId")));
            paramList.add("paymentRefNum=" + paymentRefNum);
            conditions.add(makeExpr("paymentRefNum", paymentRefNum));
        }
 returns message ..orderPaymentPreferenceId does not exist on the
Payment entity.

Note: this is the case  where  matching fields have  different  names.

I did not find any example in ofbiz that can help me to resolve this issue.

Jacek