cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juan Jose Pablos" <j...@bton.ac.uk>
Subject Re: Input/Output. Partly solved.
Date Wed, 12 Apr 2000 22:43:54 GMT
Michael,

I am not sure if this is usefull for you:

<request:get-parameter name="sUserName"/>

<request:get-parameter name="sUserPassword"/>

have you tried this one?

I hope this helps.

Juan

----- Original Message -----
From: "Michael Bierenfeld" <michael.bierenfeld@atmiralis.de>
To: "Cocoon User Mailing List" <cocoon-users@xml.apache.org>
Sent: Wednesday, April 12, 2000 4:44 PM
Subject: Input/Output. Partly solved.


> Hello,
>
> the following xml-file "login.xml" produces a html-form this is
> submitted to itself with a
> submit button.
>
> <form action="/Projekte/Voith/xml/login/login.xml" name="login">
>
> <row>
> <inputfield name="sUserName" datatype="String">
> Username :
> </inputfield>
>
> <inputfield name="sUserPassword" datatype="String">
> Userpassword :
> </inputfield>
> </row>
>
> <row>
> <submitbutton
> image="/Projekte/Voith/html/Pictures/buttons/OK-25x60.gif"
> href="javascript:document.form.submit ()"/>
> </row>
>
> </form>
>
> I have implemented the following xsp :
>
> <xsl:template match="inputfield">
>
>   <xsp:logic>
>
>      InputField <xsl:value-of select="@name"/> = new InputField
>            (<xsl:text>"</xsl:text><xsl:value-of
> select="@name"/><xsl:text>"</xsl:text>,
>             <xsl:text>"</xsl:text><xsl:value-of
> select="@datatype"/><xsl:text>"</xsl:text>,
>             request.getParameter (<xsl:text>"</xsl:text><xsl:value-of
> select="@name"/>
>             <xsl:text>"</xsl:text>));
>
>   </xsp:logic>
>
>   <xsl:apply-templates select ="@*|node()"/>
>
>   <input name="{@name}">
>   </input>
>
> </xsl:template>
>
> So far so Good. This generates my a _login.java File containg the
> follwing.
>
>   InputField sUserName = new InputField ("sUserName", "String",
> request.getParameter ("sUserName");
>    InputField sUserPassword = new InputField ("sUserName", "String",
> request.getParameter ("sUserPassword");
>
> Thats not to bad. If the Form is submitted the request-values are stored
> in the corresponding Java-Classes via
> the constructor. But how to display this content in the mask (which is
> the same!!) afterwards.
>
> INPUTFIELD is translated into INPUT which is translated to HTML in the
> following Stylesheet
>
> <xsl:template match="input">
>
> <xsl:apply-templates/>
> <input name="{@name}" type="text"/>
>
> </xsl:template>
>
> I could think of the following
>
> <input name="{@name}"
> value="<xsp:expr>@{name}.fieldContent</xsp:expr>"/>.
>
> But I guess I am totally on the wrong way here. It would be very
> helpfull if somebody could give me a hint how to solve this trap.
>
> Regards
>
> Michael
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>



Mime
View raw message