You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Isidro Vila Verde <jv...@serprest.pt> on 2004/05/12 19:29:47 UTC

Dynamic URI in form-template action

Hello,
 
I have several pages (PageA, PageB, etc) all them with the same forms
fields. 

As I have a lot of them I want to define only one template-transformer and
include the result of same cform pipeline into each Page. But after the user
submit the form I want to go to different pages depended of current context.

PageA:submit -> PageA (with some minor changes)
PageB:submit -> PageB (with some minor changes)
PageC:submit -> PageC (with some minor changes)

So my idea was to put the action attribute with value of some request
parameter, but I don't know how to do it.

As I see in documentation that JXPath has the objects continuation,
requests, session and parameters available I though I can use it, but I
don't know  how. I try a lot of possibilities but it seems only child 'id'
is allowed under that objects.

<ft:form-template action="#{$request/MY_PARAMEYTER_VALUE}" method="post"
xmlns:ft="http://apache.org/cocoon/forms/1.0#template"
xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
xmlns="http://www.w3.org/1999/xhtml">
....
</ft:form>

Can you help me please.

Thanks in advance

Isidro Vila Verde
email:jvv@serprest.pt
web: http://serprest.pt/
tel: 223743701
tel: 969103006 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.672 / Virus Database: 434 - Release Date: 28-04-2004
 


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


Re: Repeter - addRow();

Posted by Joerg Heinicke <jo...@gmx.de>.
On 17.05.2004 13:11, Bartosz Zgodzinski wrote:

> Please tell mi where and how should I call function addRow();. In a form
> definition I've got the definiton of my repeter (id="my_repeter"). Now I
> want to add a row...

It sounds there was a pre-history to this thread I missed. But let me 
ask why you need to call addRow() by hand at all? Does the add-row 
repeater action not work for you?
http://cocoon.apache.org/2.1/userdocs/forms/widget_repeater_action.html

Joerg

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


Re: Repeter - addRow();

Posted by Jakub Kaniewski <jk...@egonet.pl>.
Uz.ytkownik Bartosz Zgodzinski napisa?:

>Please tell mi where and how should I call function addRow();. In a form
>definition I've got the definiton of my repeter (id="my_repeter"). Now I
>want to add a row...
>  
>
I have something like that in my project (embeeded into woody form 
descriptor)

rpt=event.getSourceWidget().getForm() .getWidget("obslugarpt");
rpt.addRow();

If you want to access the repeatear not from event but from flow, it 
would be easier simply you can write
form1.getWidget("obslugarpt").addRow();

J.K.

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


Repeter - addRow();

Posted by Bartosz Zgodzinski <ba...@poczta.onet.pl>.
Please tell mi where and how should I call function addRow();. In a form
definition I've got the definiton of my repeter (id="my_repeter"). Now I
want to add a row...


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


RE: Dynamic URI in form-template action

Posted by Isidro Vila Verde <jv...@serprest.pt>.
-> -----Mensagem original-----
-> De: Joerg Heinicke [mailto:joerg.heinicke@gmx.de] 
-> Enviada: quarta-feira, 12 de Maio de 2004 22:27
-> Para: users@cocoon.apache.org
-> Assunto: Re: Dynamic URI in form-template action
-> 
-> On 12.05.2004 19:29, Isidro Vila Verde wrote:
-> 
-> > Hello,
-> >  
-> > I have several pages (PageA, PageB, etc) all them with the 
-> same forms 
-> > fields.
-> > 
-> > As I have a lot of them I want to define only one 
-> template-transformer 
-> > and include the result of same cform pipeline into each Page. But 
-> > after the user submit the form I want to go to different 
-> pages depended of current context.
-> > 
-> > PageA:submit -> PageA (with some minor changes) 
-> PageB:submit -> PageB 
-> > (with some minor changes) PageC:submit -> PageC (with some minor 
-> > changes)
-> > 
-> > So my idea was to put the action attribute with value of 
-> some request 
-> > parameter, but I don't know how to do it.
-> > 
-> > As I see in documentation that JXPath has the objects 
-> continuation, 
-> > requests, session and parameters available I though I can 
-> use it, but 
-> > I don't know  how. I try a lot of possibilities but it 
-> seems only child 'id'
-> > is allowed under that objects.
-> > 
-> > <ft:form-template action="#{$request/MY_PARAMEYTER_VALUE}" 
-> method="post"
-> 
-> Wrong approach. You try to control the page flow via URLs. 
-> Don't do that. Use the continuation approach and decide the 
-> flow in the flowscript. Much cleaner. And reusable as you 
-> can reuse the template as is.

Thanks Joerg for your advice.

I am not yet very confiant with all these thinks, but I will think a litle
about use your sugestion.
For now I solve the problem with a xsl post-processing (I don't like the
solution but I need to move on)

Isidro


Isidro Vila Verde
email:jvv@serprest.pt
web: http://serprest.pt/
tel: 223743701
tel: 969103006 


-> 
-> Joerg
-> 
-> ---------------------------------------------------------------------
-> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
-> For additional commands, e-mail: users-help@cocoon.apache.org
-> 
-> 
-> ---
-> Incoming mail is certified Virus Free.
-> Checked by AVG anti-virus system (http://www.grisoft.com).
-> Version: 6.0.672 / Virus Database: 434 - Release Date: 28-04-2004
->  
-> 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.672 / Virus Database: 434 - Release Date: 28-04-2004
 


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


Re: Dynamic URI in form-template action

Posted by Joerg Heinicke <jo...@gmx.de>.
On 12.05.2004 19:29, Isidro Vila Verde wrote:

> Hello,
>  
> I have several pages (PageA, PageB, etc) all them with the same forms
> fields. 
> 
> As I have a lot of them I want to define only one template-transformer and
> include the result of same cform pipeline into each Page. But after the user
> submit the form I want to go to different pages depended of current context.
> 
> PageA:submit -> PageA (with some minor changes)
> PageB:submit -> PageB (with some minor changes)
> PageC:submit -> PageC (with some minor changes)
> 
> So my idea was to put the action attribute with value of some request
> parameter, but I don't know how to do it.
> 
> As I see in documentation that JXPath has the objects continuation,
> requests, session and parameters available I though I can use it, but I
> don't know  how. I try a lot of possibilities but it seems only child 'id'
> is allowed under that objects.
> 
> <ft:form-template action="#{$request/MY_PARAMEYTER_VALUE}" method="post"

Wrong approach. You try to control the page flow via URLs. Don't do 
that. Use the continuation approach and decide the flow in the 
flowscript. Much cleaner. And reusable as you can reuse the template as is.

Joerg

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