cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Timberlake <and...@ddd.co.za>
Subject Re: XMLForms XMLFormTransformer
Date Fri, 07 Jun 2002 06:59:07 GMT
Ivelin

Here is the process I'm following:
The XMLForm is first met with a URI containing an id in the querystring.
I use the prepare method of my action to load a OR object reference by
the id which then populates the model so that the form is populated for
editing.
If there is no id on the querystring, The model is not populated and is
ready for add.
The id is then moved into the form if edit so that changes will be
updated instead of added.
The concept is that the adding and editing of records will always use
the same fields and I do not want to create two seperate forms when I
can use one.
I am also using XMLForms at request scope so as to minimise the object
in session memory if not needed.

I could populate the hidden field using the id through a request
parameter but I figured that using the model was consistent with the
rest of the way the form worked.

Andrew

On Fri, 2002-06-07 at 06:12, Ivelin Ivanov wrote:
> Did you look at the latest Feedback Wizard demo for XMLForm.
> 
> A sample use of the hidden tag is:
> 
> <xf:hidden ref="xpath/to/some/element/">
>     <xf:value>567</xf:value>
> </xf:hidden>
> 
> 
> The hidden tag is provided a value in the markup.
> It does not read value from the model for the same reasons that the XForms
> standard does not support hidden.
> If you want to put in a hidden tag something which is part of the model,
> then why do the round trip at all? Just keep the value in the model on the
> server.
> 
> Do you have a good use case which calls for populating hidden from the form
> model instance?
> 
> 
> Ivelin
> 
> 
> 
> 
> 
> 
> 
> ----- Original Message -----
> From: "Andrew Timberlake" <andrew@timberlake.co.za>
> To: <cocoon-dev@xml.apache.org>
> Sent: Thursday, June 06, 2002 8:29 AM
> Subject: XMLForms XMLFormTransformer
> 
> 
> > Is there a reason why hidden fields are not supported in XMLForms.
> > If I set a xf:hidden element it is not populated with a value.
> > I would like to patch the XMLFormTransformer to include hidden field
> > support but want to check if this has be purposefully left out?
> >
> > TIA
> >
> > Andrew
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 
> 
-- 
Andrew Timberlake
Digital Design Development
http://www.ddd.co.za
mailto:andrew@ddd.co.za
011 705 1737
082 415 8283

"If debugging is the process of removing bugs, 
then programming must be the process of putting them in."


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message