You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Dev at weitling <de...@weitling.net> on 2007/02/14 17:12:10 UTC

Question to Variables

Hi, it' time to flood the list with my ignorance again... sorry.

I can't see the wood for the trees regarding variables in Cocoon. There
are variables in sitemaps, flowscript, sessions, continuations, jx...
Could someone provide an overview where (and how) to use which kind of
variables?

At the moment I just want to save a kind of global session variable to
use in cforms, flowscript and sitemap. But it's better to catch on...

Thanks,
Florian

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


set value of a field

Posted by Roel Croonenberghs <Ro...@sofico.be>.
Hello,

I have a form with binding, define and template. I receive my information 
to display via a webservice in xml. I receive a value (5) in an element, 
but when i do the post of my form i want it to send a value of 10. How can 
I do that?

bind;
<bnd:value id="status"               path="data/new_status"/>

define;
<wd:field id="status">
    <wd:label><i18n:text>general.new_status</i18n:text></wd:label>
    <wd:datatype base="string"/> 
  </wd:field>

template;
<tr>
        <td width="80px"><wt:widget-label id="status"/></td>
        <td><wt:widget id="driver"></wt:widget></td>
</tr>


Thank you

Roel Croonenberghs

Re: Question to Variables

Posted by Derek Hohls <DH...@csir.co.za>.
Florian
 
I think the blunt answer is that you are not going to get this;
at least not in the form you seem to want.  Cocoon has an 
on-going history of issues with the docs.  If I had Euro1M to 
invest, it would be in hiring some developers/ experts for a
few months to do a complete and total rewrite of everything.
 
By next Wednesday?  Sorry, but the learning curve on Cocoon
is steeper than that.  And yes, that does hinder its spread.  But
as others have pointed out "its pain now and gain later".  No 
one else can make that choice for you.

The way you need to go is to pick a sample app that is closest
to what you want and start to build it up/out.  Ask specific 
questions, with code if possible, when you get stuck and I
can say from past experience that this community will give
you good support if at all possible.

Good luck with your department! 
 
Derek


>>> Dev at weitling <de...@weitling.net> 2007/02/15 12:49 PM >>>

Hi Warrell,

> At the risk of sounding patronising [..]

No problem, as long as it is helpful and I'm still allowed to do my
own
mistakes ;-)

> [snip] you will
> understand why Cocoon has such a loyal user-base. 

I do understand this loyalty. I realized the power of Cocoon, but I
want
to introduce it in my department to prevent some spaghetti-coded
framework. Deadline is next wednesday.
The docs are scattered, partially duplicate or out-of-date, no real
overview (which variables are provided? how and where can I use them?
how can I introduce my own?) is provided.
This decelerates spreading of Cocoon. And it's hard to convince
colleagues from Cocoons simplicity if simple things don't work (this
will start a new thread).

Still requesting help :-|

Florian



-- 
This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
 
CSIR E-mail Legal Notice
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
 
CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html 
 
For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to
CallCentre@csir.co.za.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.


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


Re: Question to Variables

Posted by Dev at weitling <de...@weitling.net>.
Hi Warrell,

> At the risk of sounding patronising [..]

No problem, as long as it is helpful and I'm still allowed to do my own
mistakes ;-)

> [snip] you will
> understand why Cocoon has such a loyal user-base. 

I do understand this loyalty. I realized the power of Cocoon, but I want
to introduce it in my department to prevent some spaghetti-coded
framework. Deadline is next wednesday.
The docs are scattered, partially duplicate or out-of-date, no real
overview (which variables are provided? how and where can I use them?
how can I introduce my own?) is provided.
This decelerates spreading of Cocoon. And it's hard to convince
colleagues from Cocoons simplicity if simple things don't work (this
will start a new thread).

Still requesting help :-|

Florian



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


RE: Question to Variables

Posted by Warrell <wa...@iquo.co.uk>.
Hi Florian,

At the risk of sounding patronising I have to agree when you say 'you are
missing the Wood for the Trees'. I think you may be coming to the Cocoon
framework with the mindset of simple servlet programming. As you know, in
that environment the session object is often used to maintain all
application state objects. While the advent of JDEE/EJB's attempted to
provide a more scalable architecture for building on the servlet it brought
with it an explosion in complexity and interdependency. Cocoon takes a
different approach in providing 'development compartments' which are
orthogonal or watertight from one another but organised around the notion of
XML pipelines. The various 'variables' could be described as the lines of
communication between these compartments. In the spirit of
'side-effect-free' functional programming these variables (in the main) do
not vary but are used to provide key values between the compartments. The
best way of getting your head around it is to develop a simple application
using jx generators, xsl transformers and the html serializer. Once you have
experienced the simplicity of using XML as your application state model, how
easy it is to incorporate environmental 'variables' into this document and
the power of the transformation pattern for getting things done you will
understand why Cocoon has such a loyal user-base. It does demand something
of a development mind set shift just as XSL development requires those from
an imperative programming background to learn some fundamentals.
Unfortunately too many people don't think it is worth making the effort.
Sadly they will never experience the productivity and maintenance benefits
that taking this approach delivers.

Regards,

Warrell 
-----Original Message-----
From: Dev at weitling [mailto:dev@weitling.net] 
Sent: 14 February 2007 16:12
To: Users at Cocoon
Subject: Question to Variables

Hi, it' time to flood the list with my ignorance again... sorry.

I can't see the wood for the trees regarding variables in Cocoon. There
are variables in sitemaps, flowscript, sessions, continuations, jx...
Could someone provide an overview where (and how) to use which kind of
variables?

At the moment I just want to save a kind of global session variable to
use in cforms, flowscript and sitemap. But it's better to catch on...

Thanks,
Florian

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



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