You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Chris <ru...@ifit.uni-klu.ac.at> on 2002/04/06 16:45:44 UTC

Automatic Webform input mapping to XML or Bean?

Hello everybody,

I am new with Turbine and surfed through the documentation and JavaDoc
but I did not find any hint about this problem:

I would like to know, if it is possible to automatically map a Webform
input to a XML file or to a JavaBean like Stuts can do? I would like to
generate a XML document from the users input to store it into a
XML-Database ...

Thanks in advance
Chris


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Automatic Webform input mapping to XML or Bean?

Posted by Jason van Zyl <jv...@zenplex.com>.
On Sat, 2002-04-06 at 09:45, Chris wrote:
> Hello everybody,
> 
> I am new with Turbine and surfed through the documentation and JavaDoc
> but I did not find any hint about this problem:
> 
> I would like to know, if it is possible to automatically map a Webform
> input to a XML file or to a JavaBean like Stuts can do? I would like to
> generate a XML document from the users input to store it into a
> XML-Database ...


// Map form elements to properties in order to populate
// a bean.
MyBean myBean = new MyBean();
data.getParameters().setProperties(myBean);
 
// Use Betwixt to create an XML file from the bean
BeanWriter beanWriter = new BeanWriter(OutputStream|Writer);
beanWriter.enablePrettyPrint();
beanWriter.write(myBean);

You can find betwixt in the commons-sandbox, it is a very cool package.

> Thanks in advance
> Chris
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://tambora.zenplex.org


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>