Hi all,
I have a problem, I do not succeed to visualize the value of amount in my class java. This is mine page-flow: <config xmlns="http://www.orbeon.com/oxf/controller" xmlns:xu="http://www.xmldb.org/xupdate"> <page path-info="/crea-centrale/" view="view-centrale.xhtml"/> <page id="view-account" path-info="/crea-centrale/crea" model="model-centrale.xpl" view="view-account-view.xhtml"/> <epilogue url="oxf:/config/epilogue.xpl"/> </config> This is mine view-centrale.xhtml: <xhtml:html xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:f="http://orbeon.org/oxf/xml/formatting" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xsl:version="2.0"> <xhtml:head> <xhtml:title>Prova inserimento</xhtml:title> <xforms:model> <xforms:instance id="withdraw-instance"> <amount/> </xforms:instance> <xforms:submission id="main-submission" ref="instance('withdraw-instance')" method="post" action="/crea-centrale/crea"/> </xforms:model> </xhtml:head> <xhtml:body> <xforms:group> <xhtml:p> <xforms:group> <xforms:input ref="instance('withdraw-instance')"> <xforms:label>Inserisci valore: </xforms:label> </xforms:input> <xforms:trigger> <xforms:label>Invia</xforms:label> </xforms:trigger> <xforms:send ev:event="DOMActivate" submission="main-submission"/> </xforms:group> </xhtml:p> </xforms:group> </xhtml:body> </xhtml:html> This is mine model-centrale.xpl: <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:oxf="http://www.orbeon.com/oxf/processors"> <p:param name="amount" type="input"/> <p:processor name="oxf:java"> <p:input name="config"> <config sourcepath="." class="Prova"/> </p:input> <p:input name="amount" href="view-centrale.xhtml"/> </p:processor> </p:config> This is mine class java: import org.orbeon.oxf.pipeline.api.PipelineContext; import org.orbeon.oxf.processor.SimpleProcessor; import org.orbeon.oxf.processor.ProcessorInputOutputInfo; import org.dom4j.Document; public class Prova extends SimpleProcessor { public Prova() { System.out.println("CIAO"); addInputInfo(new ProcessorInputOutputInfo("amount")); } public void start(PipelineContext context){ // Get number from input using DOM4J Document numberDocument = readInputAsDOM4J(context, "amount"); String numberString = (String) numberDocument.selectObject("string(/amount)"); System.out.println("il valore e'"+numberString); } } where mistake? -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Hi Simone,
The input of your Java processor is: <p:input name="amount" href="view-centrale.xhtml"/> So the document you get in input will be the XHTML file (view-centrale.xhtml), which is not what you want. Most likely you want to have href="#amount" there. The #amount would be a reference to the "amount" input of the model-centrale.xpl pipeline. However model-centrale.xpl is called as the model for your page, and there is not "amount" input in a model. Where should this amount come from? Alex On 4/19/07, [hidden email] <[hidden email]> wrote: > Hi all, > I have a problem, I do not succeed to visualize the value of amount in my class java. > > This is mine page-flow: > > <config xmlns="http://www.orbeon.com/oxf/controller" > xmlns:xu="http://www.xmldb.org/xupdate"> > > <page path-info="/crea-centrale/" view="view-centrale.xhtml"/> > > <page id="view-account" path-info="/crea-centrale/crea" model="model-centrale.xpl" view="view-account-view.xhtml"/> > > <epilogue url="oxf:/config/epilogue.xpl"/> > > </config> > > This is mine view-centrale.xhtml: > > <xhtml:html xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:xforms="http://www.w3.org/2002/xforms" > xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" > xmlns:f="http://orbeon.org/oxf/xml/formatting" > xmlns:xhtml="http://www.w3.org/1999/xhtml" > xmlns:ev="http://www.w3.org/2001/xml-events" > xsl:version="2.0"> > > <xhtml:head> > <xhtml:title>Prova inserimento</xhtml:title> > <xforms:model> > <xforms:instance id="withdraw-instance"> > <amount/> > </xforms:instance> > <xforms:submission id="main-submission" ref="instance('withdraw-instance')" method="post" > action="/crea-centrale/crea"/> > </xforms:model> > </xhtml:head> > <xhtml:body> > <xforms:group> > <xhtml:p> > <xforms:group> > <xforms:input ref="instance('withdraw-instance')"> > <xforms:label>Inserisci valore: </xforms:label> > </xforms:input> > <xforms:trigger> > <xforms:label>Invia</xforms:label> > </xforms:trigger> > <xforms:send ev:event="DOMActivate" submission="main-submission"/> > </xforms:group> > </xhtml:p> > </xforms:group> > </xhtml:body> > </xhtml:html> > > This is mine model-centrale.xpl: > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > xmlns:oxf="http://www.orbeon.com/oxf/processors"> > > <p:param name="amount" type="input"/> > > <p:processor name="oxf:java"> > <p:input name="config"> > <config sourcepath="." class="Prova"/> > </p:input> > <p:input name="amount" href="view-centrale.xhtml"/> > </p:processor> > </p:config> > > This is mine class java: > > import org.orbeon.oxf.pipeline.api.PipelineContext; > import org.orbeon.oxf.processor.SimpleProcessor; > import org.orbeon.oxf.processor.ProcessorInputOutputInfo; > import org.dom4j.Document; > > public class Prova extends SimpleProcessor { > > public Prova() { > System.out.println("CIAO"); > addInputInfo(new ProcessorInputOutputInfo("amount")); > > } > > public void start(PipelineContext context){ > > // Get number from input using DOM4J > Document numberDocument = readInputAsDOM4J(context, "amount"); > String numberString = (String) > numberDocument.selectObject("string(/amount)"); > System.out.println("il valore e'"+numberString); > > > } > } > > > where mistake? > > > > -- > 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 > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > -- Orbeon Forms - Web 2.0 Forms for the Enterprise http://www.orbeon.com/ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Hi Alessandro,
my problem is that I would want to create a form with a textfield and to the pressure of the push-button the value comes sended to my class java. How I can make? I send to you in attached my example, if you want to see it!!! thanks -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws crea-centrale.zip (6K) Download Attachment |
Administrator
|
Hi Simone,
Is the Java code returning something? If it is, what is it you want to do with that result? Display it on the same page, or maybe go to another page based on that result? Alex On 4/20/07, [hidden email] <[hidden email]> wrote: > Hi Alessandro, > my problem is that I would want to create a form with a > textfield and to the pressure of the push-button the value > comes sended to my class java. How I can make? > I send to you in attached my example, if you want to see > it!!! thanks > > > -- > 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 > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > -- Orbeon Forms - Web 2.0 Forms for the Enterprise http://www.orbeon.com/ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Hi Alex,
is itself like has said, I want that the value contained in the text field comes sended to the class java when I press the push-button and then to print to video the message that returns to me from the class java . But I do not succeed to make this thing, I do not understand where mistake -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Hi Simone,
See the attached archive. I think code will speak better than words :). Alex On 4/21/07, Simone <[hidden email]> wrote: > Hi Alex, > is itself like has said, I want that the value contained in the text field > comes sended to the class java when I press the push-button and then to > print to video the message that returns to me from the class java . > > But I do not succeed to make this thing, I do not understand where mistake > > > > > -- > 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 > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > -- Orbeon Forms - Web 2.0 Forms for the Enterprise http://www.orbeon.com/ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws crea-centrale.zip (5K) Download Attachment |
Hi Alex,
thanks for your help. If you prefer I can speak Italian :-) about your code I would send the java class output to another page, not the same page that send the input.. is it possible?? Thanks Simone Bernardi ----- Original Message ----- From: "Alessandro Vernet" <[hidden email]> To: <[hidden email]> Sent: Monday, April 23, 2007 9:45 AM Subject: Re: [ops-users] Processor java input > Hi Simone, > > See the attached archive. I think code will speak better than words :). > > Alex > > On 4/21/07, Simone <[hidden email]> wrote: >> Hi Alex, >> is itself like has said, I want that the value contained in the text >> field >> comes sended to the class java when I press the push-button and then to >> print to video the message that returns to me from the class java . >> >> But I do not succeed to make this thing, I do not understand where >> mistake >> >> >> >> >> -- >> 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 >> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws >> >> > > > -- > Orbeon Forms - Web 2.0 Forms for the Enterprise > http://www.orbeon.com/ > -------------------------------------------------------------------------------- > > -- > 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 > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > -------------------------------------------------------------------------------- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 269.5.7/771 - Release Date: 21/04/2007 11.56 -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Hi Simone,
> about your code I would send the java class output to another page, not the > same page that send the input.. is it possible?? Then you could from that other page call the "compute" service, service which is implemented with an XPL that calls the Java processor. But I am not sure if this really helps. It looks like you either have an issue which I don't fully understand, or a more fundamental question about the page flow, XForms, and services which is hard to address on the mailing list. Alex -- Orbeon Forms - Web 2.0 Forms for the Enterprise http://www.orbeon.com/ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |