You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@click.apache.org by om...@polaris.co.in on 2009/05/28 14:35:52 UTC
freeform input from front-end
Hi,
I am wondering if there's a solution to the below problem in click
framework or any other framework. My user will have to populate javabeans
in the front-end and post them to the back-end.
Iam planning to have a form per bean or fieldset per bean. The form fields
will correspond to the javabean properties. The type of the javabean is
however arbitrary and can be any bean.
How will I parse the user request and create the right number of bean
objects in the backend and populate them with the values entered by the
user.
Do I build a string like
numOfBeans=5&slNo=1^beanName=Customer^name=Mike^city=toledo&slNo=2^beanName=Order^orderId=c05^qty=100...
and then parse it in the back-end or is there some other way.
Regards,
V.Omprakash
Chennai One, Extn: 8112
Mobile: 99406 82346
This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.
Visit us at http://www.polaris.co.in
Re: freeform input from front-end
Posted by Bob Schellink <sa...@gmail.com>.
Hi,
omprakash.v@polaris.co.in wrote:
> Thought the same myself. Anyway, front-end is not priority right now.
> Thanks for the help anyway. Apache click's simplicity makes it attractive.
> Ajax support could be better and more simpler though.
Agreed, Click doesn't really provide Ajax support, however
ClickClick[1] does support it via a special Control listener object
which returns a Partial response. I'm also integrating JQuery Taconite
[2] support which allows multiple DOM updates per Ajax request.
Once 2.1.0 is out we'll cut an alpha of ClickClick for anyone interested.
kind regards
bob
[1]: http://code.google.com/p/clickclick/
[2]: http://malsup.com/jquery/taconite/
Re: freeform input from front-end
Posted by om...@polaris.co.in.
Bob,
Thought the same myself. Anyway, front-end is not priority right now.
Thanks for the help anyway. Apache click's simplicity makes it attractive.
Ajax support could be better and more simpler though.
Regards,
V.Omprakash
Mobile: 99406 82346
Bob Schellink
<sabob1@gmail.com
> To
click-user@incubator.apache.org
05/31/2009 05:38 cc
AM
Subject
Re: freeform input from front-end
Please respond to
click-user@incuba
tor.apache.org
omprakash.v@polaris.co.in wrote:
> I am wondering if there's a solution to the below problem in click
> framework or any other framework. My user will have to populate javabeans
> in the front-end and post them to the back-end.
>
> Iam planning to have a form per bean or fieldset per bean. The form
fields
> will correspond to the javabean properties. The type of the javabean is
> however arbitrary and can be any bean.
Actually if you use the "form per bean" strategy you don't have to do
anything special. Form copyTo and copyFrom will work as expected so
this is probably the easiest way to handle this scenario.
bob
This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.
Visit us at http://www.polaris.co.in
Re: freeform input from front-end
Posted by Bob Schellink <sa...@gmail.com>.
omprakash.v@polaris.co.in wrote:
> I am wondering if there's a solution to the below problem in click
> framework or any other framework. My user will have to populate javabeans
> in the front-end and post them to the back-end.
>
> Iam planning to have a form per bean or fieldset per bean. The form fields
> will correspond to the javabean properties. The type of the javabean is
> however arbitrary and can be any bean.
Actually if you use the "form per bean" strategy you don't have to do
anything special. Form copyTo and copyFrom will work as expected so
this is probably the easiest way to handle this scenario.
bob
Re: freeform input from front-end
Posted by Bob Schellink <sa...@gmail.com>.
Hi,
omprakash.v@polaris.co.in wrote:
>
> How will I parse the user request and create the right number of bean
> objects in the backend and populate them with the values entered by the
> user.
>
> Do I build a string like
>
> numOfBeans=5&slNo=1^beanName=Customer^name=Mike^city=toledo&slNo=2^beanName=Order^orderId=c05^qty=100...
>
> and then parse it in the back-end or is there some other way.
Yes that could work although things would be quite complex, especially
if you can have multiple beans of the same type. You will also need a
custom implementation of Form.copyTo and copyFrom to be able to copy
values between Fields and JavaBeans.
kind regards
bob