Java Bean + Castor in XForms/Orbeon

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Java Bean + Castor in XForms/Orbeon

Miguel Angel Tinte Garcia
Hi all,

I have been a long time seeking for an example wich integrates Castor
and Orbeon technologies in order to mapping a Java Bean into a jsp given
(or another file wich allows xml tags). I didn't find it yet so the
question is... ¿have you any example so I could have it as a reference
for my implementation?

Thanks in advance  

--
Miguel Ángel Tinte García        
Libre Software Engineering Lab (GSyC)  | Universidad Rey Juan Carlos
[hidden email]        
http://libresoft.urjc.es/   



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Java Bean + Castor in XForms/Orbeon

Alessandro Vernet
Administrator
Miguel,

On Apr 6, 2009, at 2:32 AM, Miguel Angel Tinte Garcia wrote:

> I have been a long time seeking for an example wich integrates Castor
> and Orbeon technologies in order to mapping a Java Bean into a jsp  
> given
> (or another file wich allows xml tags). I didn't find it yet so the
> question is... ¿have you any example so I could have it as a reference
> for my implementation?

Could you give us some more details on how Castor, the JSP, JavaBeans,  
and Orbeon Forms work together in the architecture you have in mind?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Java Bean + Castor in XForms/Orbeon

Miguel Angel Tinte Garcia
Hi Alex,

I am trying to use these technologies together in this way:

- First, the java bean is stored in the session from the java model:

session = request.getSession(true);
session.setAttribute("loginuser", user);


- Then, the bean is managed by the pipeline processor:

<!-- generate xml from the Results java object -->
<p:processor name="oxf:scope-generator">
   <p:input name="config">            
    <config>
               <key>loginuser</key>
               <scope>session</scope>
        </config>
   </p:input>
   <p:input name="mapping">      
           <mapping>mapping.xml</mapping>
   </p:input>
   <p:output name="loginuser" id="loginuser"/>    
</p:processor>


- And finally, I create a xforms model and instance in the jsp expecting
to receive the data like this:

<xforms:model id="login">
         <xforms:instance>
              <loginuser xmlns="">
                        <name/>
                        <password/>
                </loginuser>
        </xforms:instance>
</xforms:model>

<xsi:include href="input:loginuser"/>


- And eventually, using it:  

<xhtml:h1>Welcome:
        <xforms:output ref="/loginuser/name" model="login">
        </xforms:output>
</xhtml:h1>
 

This is not working right now but I don't know exactly what is wrong

Thanks in advance



El mar, 07-04-2009 a las 18:04 -0700, Alessandro Vernet escribió:

> Miguel,
>
> On Apr 6, 2009, at 2:32 AM, Miguel Angel Tinte Garcia wrote:
>
> > I have been a long time seeking for an example wich integrates Castor
> > and Orbeon technologies in order to mapping a Java Bean into a jsp  
> > given
> > (or another file wich allows xml tags). I didn't find it yet so the
> > question is... ¿have you any example so I could have it as a reference
> > for my implementation?
>
> Could you give us some more details on how Castor, the JSP, JavaBeans,  
> and Orbeon Forms work together in the architecture you have in mind?
>
> Alex
> --
> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
> Orbeon's Blog: http://www.orbeon.com/blog/
> Personal Blog: http://avernet.blogspot.com/
> Twitter - http://twitter.com/avernet
>
> documento de texto sencillo adjunto (message-footer.txt)
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
--
Miguel Ángel Tinte García        
Libre Software Engineering Lab (GSyC)  | Universidad Rey Juan Carlos
[hidden email]        
http://libresoft.urjc.es/   



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws