Answering my own question!
I was being a complete wassock and cocking up my code so that the response
was shagged (it would be fruitless to explain fully). The long and the
short of it is that I forgot that there is an equivilent to xsl:attribute in
xsp - xsp:attribute funnily enough!
Using this works properly a la....
...snippity snip...
<p>
User ID: <text>
<xsp:attribute name="name">userid</xsp:attribute>
<xsp:attribute name="size">10</xsp:attribute>
<xsp:attribute name="value"><xsp-request:get-parameter
name="userid" default=""/></xsp:attribute>
</text><br/>
Password: <password>
<xsp:attribute name="name">password</xsp:attribute>
<xsp:attribute name="size">10</xsp:attribute>
<xsp:attribute name="value"><xsp-request:get-parameter
name="password" default=""/></xsp:attribute>
</password><br/>
</p>
...snippity snip...
<text> is wot you'll find in the provided c2 apache stylesheet. I've just
added an extra match in mine called "password" to handle a "password" type
input box.
Apologies once again for the dumb question - I was just too tired to see
beyond my stupidity...
HTH someone else now!
jez
-----Original Message-----
From: Jeremy Aston [mailto:[EMAIL PROTECTED]]
Sent: 08 November 2001 06:51
To: Cocoon-Users
Subject: Getting request values back after a FormValidation
Hi,
I am trying soem things out with actions and form validations. All my
validations work fine however I am struggling to solve one problem.
How can I get form values to put back into a form if the validation fails?
For example:
Login Screen
- User enters user id
- User misses out password
- Submit
- From validation picks up the missing password
- Sitemap now goes back to login page (using generate/transform/serialise -
not a redirect)
- Validation errors picked up a displayed
- Ideally want to seed the userid field with the value that was put in
before so that the user does not have to retype.
But how do I do the last step? The userid is not in the session (cos it
aint got there yet), not in the request object (I assume cos this is a new
serialisation) and not available via any formval actions I can see. Does it
need to go into the sitemap as a paremeter to the transformation? If so how
do I pick the current userid value up for passing in via the sitemap?
All I want to do is to make forms that do not need all the details
reentering if the validation fails.
Sorry if this is answered in the examples - I have been looking but can't
see an example of this particular question. It may just be cos I've been
coding all night cos my little baby is sick and just a *bit* tired now!
Cheers
jez
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>