Re: Is Cocoon the right choice?

2006-03-13 Thread Ralph Goers
Sorry, wrong name. It is the XMLFileModule. 
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/components/modules/input/XMLFileModule.html. 
This message provides some insight 
http://www.nabble.com/RE:-XMLFileModule-for-a-dynamic-file.-p355608.html. 
However, before you use this please read 
http://issues.apache.org/jira/browse/COCOON-1574?page=all.


Ralph

Kamal Bhatt wrote:


Ralph Goers wrote:


Reinhard Poetz wrote:



What you're asking for is a long-time no-no of Cocoon which we call 
"dynamic pipelines". Currently there is no pipeline implementation 
that would allow this.  


I hesitate to mention this, but this isn't strictly true.  We are 
currenly using the XMLInputModule to dynamically generate the src url 
for a transformer. This is,


Where can I find more information about this? I cannot seem to find 
any api or documentation on XMLInputModule.


Thanks

in effect, dynamically choosing which pipeline to use.  I hesitate to 
mention this because the XMLInputModule has severe caching problems 
that need to be addressed.


Ralph

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is Cocoon the right choice?

2006-03-13 Thread Kamal Bhatt


Ralph Goers wrote:


Reinhard Poetz wrote:



What you're asking for is a long-time no-no of Cocoon which we call 
"dynamic pipelines". Currently there is no pipeline implementation 
that would allow this.  


I hesitate to mention this, but this isn't strictly true.  We are 
currenly using the XMLInputModule to dynamically generate the src url 
for a transformer. This is,


Where can I find more information about this? I cannot seem to find any 
api or documentation on XMLInputModule.


Thanks

in effect, dynamically choosing which pipeline to use.  I hesitate to 
mention this because the XMLInputModule has severe caching problems 
that need to be addressed.


Ralph

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Kamal Bhatt

Tourism Technology Pty Ltd


T:  +61 (02) 9956 7300
F:  +61 (02) 9956 7411


Level 10, 1 Pacific Highway, North Sydney, NSW 2060


http://www.tt.com.au


--
Disclaimer: This email is confidential and may contain privileged information 
for the sole use of the person or business to which it is addressed. If you are 
not the intended recipient, please notify the sender by return e-mail or phone 
as you must not view, disseminate, distribute or copy this email without our 
consent. We do not accept any liability in connection with any computer virus, 
data corruption, incompleteness, or unauthorised amendment of this email. It is 
the sole responsibility of the receiver to scan for viruses before opening.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is Cocoon the right choice?

2006-03-13 Thread Ralph Goers

Reinhard Poetz wrote:


What you're asking for is a long-time no-no of Cocoon which we call 
"dynamic pipelines". Currently there is no pipeline implementation 
that would allow this.  
I hesitate to mention this, but this isn't strictly true.  We are 
currenly using the XMLInputModule to dynamically generate the src url 
for a transformer. This is, in effect, dynamically choosing which 
pipeline to use.  I hesitate to mention this because the XMLInputModule 
has severe caching problems that need to be addressed.


Ralph

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Calling a business service from a form

2006-03-13 Thread Patrick Refondini

Duncan McLean wrote:

Hi Patrick

Thanks for this...

Not too sure what you mean by uniqueAttributeNameConstraint(event) - can
you explain a bit further please?


Yes, the uniqueAttributeNameConstraint(event) is totally specific to one 
of my use case I simply "cut and pasted", not very generic indeed.


Thus more generically:

fd:on-value-changed let you add event listeners on widgets instances.

You can add Java or / and Javascript event listeners. To learn more 
about it you may have a look to: 
http://cocoon.apache.org/2.1/userdocs/widgetconcepts/eventhandling.html


Now to get you on feet for a quick test if you like you may:

1. Add attach a flowscript file to your sitemap.xmap:

  
  

  

2. Create a basic event listener in my_events_flow.js

/*
* Copyright ...
*/
cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js");

/**
 * A simple test function
 */
function eventPrint(event) {
  print("");  
  print(" eventPrint(event) v1.0 <");
  var sourceWidget = event.source;
  print("sourceWidget = " + sourceWidget);
  print("");
}


3. Make use of the event listener in one of your CFlow model


  
 
   
 eventPrint(event);
   
 



That should be about it.

Now when yourFieldName value changes you should  be able to see some 
 eventPrint(event) v1.0 < output in your logs. print() will log 
on the standard output. In container such as Tomcat it appears in 
logs/catalina.out. Should be on your console if you launch cocoon in the 
command line using jetty.


From there you have all the power of the flow backend. You are able to 
call logic on Java classes, resources, may certainly use pipelineUtil 
You can also update other form fields/widgets values... Especially nice 
while working with AJAX, just my opinion though ;)


You should have access to:

event.oldValue
event.newValue

You may find about other fields/widgets using:

event.source.lookupWidget("../anotherFieldId")

You may also experiment with

event.source.value
event.source.parent

In your field auditing value change is contained in a repeater's row:

var row = event.source.parent;
var repeater = row.parent;
var pos = repeater.indexOf(row);

for (var i = 0; i < repeater.size; i++) {
  var currentRow = repeater.getRow(i);
}

... just a few hints

Patrick



Thanks

Duncan



Hi Duncan,

If onChange can be used instead of onBlur in your senario you might be
able to use something as follow in you CForm model (fd):


  

  
  uniqueAttributeNameConstraint(event);
  



I have used this with Cocoon 2.1.8 with AJAX block enabled, and of
course AJAX enabled in the form template too:




Patrick


Duncan McLean wrote:


Hi

We have a rather complicated scenario where we would like to effectively
call a business service which does some detailed calculations involving
a value from a text field on a form and then updating the same form with
the value.

Effectively, the users would like the service calculation to trigger
after an onBlur event on the affected text field.

We already call a business service in flow (using and XSP page which
composes the required SOAP request). We then call this pipeline within
flow which causes the business service to be called and we can then get
at the returned DOM to extract the values. This can be done up front in
flow which makes this scenario easy, but the onBlur scenario is proving
trickier.

What would be nice would be to (in the fd:javascript block for the text
box) using a similar method to the above - call a pipeline that creates
another XSP page that will create the appropriate SOAP request and call
the business service, interrogate the results and incorporate the
results into the same form! Tricky?

Sorry that this sounds a bit convoluted, but does anyone have a better
suggestion on how to achieve this?

So, in summary - onBlur called against a text field, results in creation
of SOAP request to a business service which does some business logic
calcs, returns some XML which is interrogated for a value and area on
the same form re-populated with result of calculation.

Phew

Thanks in advance

Duncan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



binaries PUT for webDAV [was: webdav block, davmap, binaries PUT, request reader]

2006-03-13 Thread Renaud Richardet

Hello,

I am trying to PUT binary files for the webDAV implementation of Lenya. 
There was already a thread on this [1]. Did someone already wrote a 
component (reader?) for that, or shall I get my hand dirty ;-)
ATM, I don't really see how I could do that, since there is still no 
Request.getInputStream() method [2]. Any hints?


TIA,
Renaud


[1] 
http://mail-archives.apache.org/mod_mbox/cocoon-dev/200410.mbox/[EMAIL PROTECTED]
[2] 
http://mail-archives.apache.org/mod_mbox/cocoon-dev/200410.mbox/[EMAIL PROTECTED]


You probably no longer need to write a Reader for that. Instead you 
should be able to use the ModuleSource. This component exposes input 
module values as Sources. Syntax is like so: 
module:moduleName:moduleAttr . So in the case of davmap, it would 
become:




--
Unico

On 23-okt-04, at 1:57, Frédéric Glorieux wrote:



Hi,

Sorry to disturb you for a so specific question, but I evaluate and 
understood today the block webdav/davmap


really amazing how it's a pretty way to have a quite full 
implementation of webdav, except,


PUT binary files.

Do someone plan to write the reader needed for that ?
Are there some blocking issues ?
I can't stop myself to try tomorrow, but I'm not the best guy to do 
the job.


Help welcome, but thanks anymore for all work already done.

--
Frédéric Glorieux (ingénieur documentaire, AJLSM)





--
Renaud Richardet
COO America
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
office +1 857 776-3195 mobile +1 617 230 9112
renaud.richardet  wyona.com  http://www.wyona.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



R: Is Cocoon the right choice?

2006-03-13 Thread Simone Gianni
Hi Nils,
I don't think it's possible to say if cocoon is the right choice or not, but 
i'll try to give some possible answers to your questions.

- Messaggio originale -
Da: "Nils Kaiser" <[EMAIL PROTECTED]>
A: users@cocoon.apache.org
Inviato: 13/03/06 18.48
Oggetto: Is Cocoon the right choice?


1) Logical decisions in the pipeline depending on pipeline content... 

Unfortunately matchers and selectors are applied before content is actually 
generated. Actions could be an answer but they're not loved in the cocoon 
world. Anyway there is a way of doing it, althought it's not tidy, see next 
answer.

2) As we are working with a lot of information coming from different pages
and 'following' links to get this information, we need a more dynamical
approach to get content. I have
only little knowledge of flow. Is it the answer??

Yes, in flow you can use processPipelineTo which invokes the sitemaps as many 
times you want, dinamycally composing (in flow) both the uri and the bizdata 
you pass to it. The result of the pipeline is written to an output stream and 
could then be sent again as a bizdata to the next sitemap invocation.


I am very open to innovative solutions like having an own pipeline
implementation or a DOM based framework which can adress content based
decisions better.

I am just afraid we might end with a kind of monster doing some ugly things
to force cocoon to do thing it is not supposed to ;)

No, you can solve this (IMMO) driving the sitemap invocations from the flow 
(thus having all the control you need) and implementing some custom components 
(a selector evaluating xpath on an xml bizdata for example) to further tune 
this control.

Hope this is useful,
Simone

-- 
Simone Gianni



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



XML messaging

2006-03-13 Thread Yves Vindevogel

Hi,

I need to develop an XML messaging system.

For the moment, we receive messages by mail.  In the future, this will 
be SOAP, but nobody is ready yet with the implementation, so, during 
test, we send each other mails.


A message is an XML file, on which you have to respond.  Your response 
is basically answering what you received and reporting errors if they occur.


Is there anybody in the community who has worked on this kind of project 
before and who could help me with some basic advice.  I was also 
wondering wether there was an engine that can handle this kind of 
messaging, running on Linux and Windows.


This typically seems the work for Microsoft BizTalk, so I was kind of 
wondering what answers the Linux community / Open Source community has 
on BizTalk.



Regards,
Yves Vindevogel

begin:vcard
fn:Yves Vindevogel
n:Vindevogel;Yves
org:Implements
adr:;;Kempische Steenweg 206;Hasselt;;3500;Belgium
email;internet:[EMAIL PROTECTED]
tel;work:+32 (11) 43 55 76
tel;home:+32 (11) 43 55 76
tel;cell:+32 (478) 80 82 91
x-mozilla-html:TRUE
url:http://www.implements.be
version:2.1
end:vcard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Is Cocoon the right choice?

2006-03-13 Thread Martynas Jusevicius
For me Cocoon also looked like a perfect choice at first, and sitemap
with URL-matching as a perfect idea. But when a simple static sitemap
is becoming dynamic and involves logic or actions, it gets nasty. Some
flow control, a concept which I don't like at all, some JavaScript
gets involved, dummyn aggregations and transform results, dozens of
(never used) modules.You might find yourself trying to work around
sitemap's restrictions while building quite a simple thing and ending
up with strange and unreliable mix of technologies, some of them being
Cocoon-only. At this point, you might think: I would already have done
that with servlets or just PHP.
I would suggest that you check out XQuery. With an extension of
servlet-like functionality it became my favorite tool for web
development. Take a look at XQuery Server Pages or eXist XML DB.

Martynas

On 3/13/06, Nils Kaiser <[EMAIL PROTECTED]> wrote:
> Hello!
>
> Well, I am an happy cocoon user but I am working on a new project and not
> sure if cocoon is the right choice for it. The goal of the thing is to be
> able to extract information from existing web sites and to transform it and
> publish it to different channels. I already have built a project with cocoon
> and from the basic idea it covers pretty much with what coocoon is.
>
> The bad thing is that we have some complex requirements for this project and
> I am not sure how these can be solved using existing cocoon technology. Here
> what we need to be able to do:
>
> 1) Logical decisions in the pipeline depending on pipeline content... Yes I
> know this is not in the idea of the current cocoon pipeline. But seems to be
> pretty important in this project. On a higher view it might be the necessity
> to run transformers only if a certain condition refering to the pipeline
> applies.
>
> 2) As we are working with a lot of information coming from different pages
> and 'following' links to get this information, we need a more dynamical
> approach to get content. Example:
>
> User requests our URL
> - GET content of page 1
> - Page 1 has a link to page 2 (which is not known before)
> - GET content of page 2
> - Transform content of page 1 and page 2
>
> We cant be sure how many links we have to follow and we have to do some
> transformations after the request so this can't be a single component... The
> problem I see is not accessing and transforming the content. It is the fact
> of "restarting" the pipeline dynamically (depending on the content of page
> 1).
>
> I am not sure how this is possible with cocoon, especially because I have
> only little knowledge of flow. Is it the answer??
>
> I also know that it is possible to adress those issues with some tricks: for
> example using a special transformer followed by a CIncludeTransformer to
> call the same pipeline using cocoon:// for implementing pipeline "restart",
> or having a set of DOM transformers which make decisions and write things to
> the session to simulate conditional behavior of the pipeline.
>
> I am very open to innovative solutions like having an own pipeline
> implementation or a DOM based framework which can adress content based
> decisions better.
>
> I am just afraid we might end with a kind of monster doing some ugly things
> to force cocoon to do thing it is not supposed to ;)
>
> Thx for your comments,
>
> Nils
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: File generator and parameters

2006-03-13 Thread Lars Huttar

Jean-Claude Moissinac wrote:

Thank you for your answer.
It could help but...
In my case, I don't know when writing the sitemap, what will be the 
URL parameters used by the client
I need something like 'use-request-parameters' that I use for pushing 
all the prameters to an XSLT transformer

You could use the request (not request parameter) module, e.g.
{request:queryString}

See http://wiki.apache.org/cocoon/InputModules
or http://cocoon.apache.org/2.1/userdocs/concepts/modules-ref.html

Lars




On 3/13/06, *Jasha Joachimsthal* <[EMAIL PROTECTED] 
> wrote:


 


-Original Message-
*From:* [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED]
]*On Behalf Of *Jean-Claude
Moissinac
*Sent:* maandag 13 maart 2006 15:15
*To:* users@cocoon.apache.org 
*Cc:* [EMAIL PROTECTED] 
*Subject:* File generator and parameters

Hello

I'm working on a site which allows to process some external pages

I call something like:
http://mysite/processing/process1/an/external/url

and which is matched by a pipeline like this

http://{1}/{2}"/>




which works fine if the URL has no parameters
but if the called URL has parameters, the generator seems to
ignore it.
If the request is
http://mysite/processing/process1/an/external/url?param=12
I would like that the generator uses
http://an/external/url?param=12
as his src
Is there a solution to do it?

Does this Wiki page help you?
http://wiki.apache.org/cocoon/RequestParameterModule

Maybe you need to combine it with the URLEncodeModule to filter
unwanted characters.

In cocoon.xconf add:



Your map:generate may look like this.

http://{1}/{2}?{url-encode:{request-param:foo}}&{url-encode:{request-param:bar}}/>

 


Jasha Joachimsthal

-

Hippo

Oosteinde 11

1017 WT Amsterdam

The Netherlands

+31 (0)20 5224466

[EMAIL PROTECTED] 

www.hippo.nl 

 





--
--
Jean-Claude Moissinac
Department of Computer Science and Networks
ENST Paris
FRANCE

E-mail: [EMAIL PROTECTED] 
Tel: (+33) 1.45.81.80.88
Fax: (+33) 1.45.81.71.58

http://shadok.enst.fr/jcm 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is Cocoon the right choice?

2006-03-13 Thread Reinhard Poetz

Nils Kaiser wrote:

Hello!

Well, I am an happy cocoon user but I am working on a new project and not
sure if cocoon is the right choice for it. The goal of the thing is to be
able to extract information from existing web sites and to transform it and
publish it to different channels. I already have built a project with cocoon
and from the basic idea it covers pretty much with what coocoon is.

The bad thing is that we have some complex requirements for this project and
I am not sure how these can be solved using existing cocoon technology. Here
what we need to be able to do:

1) Logical decisions in the pipeline depending on pipeline content... Yes I
know this is not in the idea of the current cocoon pipeline. But seems to be
pretty important in this project. On a higher view it might be the necessity
to run transformers only if a certain condition refering to the pipeline
applies.

2) As we are working with a lot of information coming from different pages
and 'following' links to get this information, we need a more dynamical
approach to get content. Example:

User requests our URL
- GET content of page 1
- Page 1 has a link to page 2 (which is not known before)
- GET content of page 2
- Transform content of page 1 and page 2

We cant be sure how many links we have to follow and we have to do some
transformations after the request so this can't be a single component... The
problem I see is not accessing and transforming the content. It is the fact
of "restarting" the pipeline dynamically (depending on the content of page
1).

I am not sure how this is possible with cocoon, especially because I have
only little knowledge of flow. Is it the answer??

I also know that it is possible to adress those issues with some tricks: for
example using a special transformer followed by a CIncludeTransformer to
call the same pipeline using cocoon:// for implementing pipeline "restart",
or having a set of DOM transformers which make decisions and write things to
the session to simulate conditional behavior of the pipeline.

I am very open to innovative solutions like having an own pipeline
implementation or a DOM based framework which can adress content based
decisions better.

I am just afraid we might end with a kind of monster doing some ugly things
to force cocoon to do thing it is not supposed to ;)


What you're asking for is a long-time no-no of Cocoon which we call "dynamic 
pipelines". Currently there is no pipeline implementation that would allow this. 
  That's the bad news. The good news is that the ice is breaking :-) I 
understand that this doesn't help you very much ATM, Cocoon gets massivly 
refactored which will make it much simpler to plugin your own processor 
implementations. I don't know in which timeframes you're thinking, but if you 
can wait some more weeks, you should get some solid ground to start from to 
contribute to a dynamic pipelines implementation (which maybe doesn't need to be 
XML based ...)


Having said this, if you have time and the needs to work on Cocoon itself and 
want to get involved in desicions, it is the *perfekt* point of time now for 
this as nothing is carved in stone :-)


Your second requirement sounds to be easier to be implemented based on the 
current codebase, but I'm not sure if I understand it completly. I assume that 
you were talking about a pipeline like this:



  http://{1}"/>
  
  
  


The filter-all-links.xslt generates cinclude elements, that recursivly call the 
aggregator/** pipeline. You'd also have to implement the decision there if you 
want to follow a link or not. If this involved some complex desicions, you would 
have to implement some custom transformer that can make this decision as 
writting Java is for some usecases easier than writing XSLT - in particular if 
you have to call some kind of business logc. If you have to follow all links (= 
no decision), you will have to make sure that you don't create an infinite loop 
but I guess you have already thought of this ;-)


One final thought: I don't know where all those pages that you want to aggregate 
are located but you could run into some serious performance problems. It would 
be a good idea to think of caching right from the beginning.


--
Reinhard Pötz   Independent Consultant, Trainer & (IT)-Coach 


{Software Engineering, Open Source, Web Applications, Apache Cocoon}

   web(log): http://www.poetz.cc






___ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: XML messaging

2006-03-13 Thread Yves Vindevogel
BTW: I know what jabber is.  Jabber seems like a good way to transport 
the messages.

But I'm more looking for an engine to evaluate the messages.
For instance, I have to look whether certain values are correct in the 
file, 



Yves Vindevogel wrote:


Hi,

I need to develop an XML messaging system.

For the moment, we receive messages by mail.  In the future, this will 
be SOAP, but nobody is ready yet with the implementation, so, during 
test, we send each other mails.


A message is an XML file, on which you have to respond.  Your response 
is basically answering what you received and reporting errors if they 
occur.


Is there anybody in the community who has worked on this kind of 
project before and who could help me with some basic advice.  I was 
also wondering wether there was an engine that can handle this kind of 
messaging, running on Linux and Windows.


This typically seems the work for Microsoft BizTalk, so I was kind of 
wondering what answers the Linux community / Open Source community has 
on BizTalk.



Regards,
Yves Vindevogel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



begin:vcard
fn:Yves Vindevogel
n:Vindevogel;Yves
org:Implements
adr:;;Kempische Steenweg 206;Hasselt;;3500;Belgium
email;internet:[EMAIL PROTECTED]
tel;work:+32 (11) 43 55 76
tel;home:+32 (11) 43 55 76
tel;cell:+32 (478) 80 82 91
x-mozilla-html:TRUE
url:http://www.implements.be
version:2.1
end:vcard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

R: Re: File generator and parameters

2006-03-13 Thread Simone Gianni
Hi Jean-Claude
You can use the request input module to access any request attribute. There is 
an attribute called queryString that contains all the get parameters.

You could try :


Or something similar. Please refer to module reference in cocoon docs and 
oa.c.environment.Request class javadocs for further informations.

Hope this helps,
Simone

- Messaggio originale -
Da: "Jean-Claude Moissinac" <[EMAIL PROTECTED]>
A: users@cocoon.apache.org
Inviato: 13/03/06 18.28
Oggetto: Re: File generator and parameters

Thank you for your answer.
It could help but...
In my case, I don't know when writing the sitemap, what will be the URL
parameters used by the client
I need something like 'use-request-parameters' that I use for pushing all
the prameters to an XSLT transformer



On 3/13/06, Jasha Joachimsthal <[EMAIL PROTECTED]> wrote:
>
>
>
> -Original Message-
> *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
> *Jean-Claude Moissinac
> *Sent:* maandag 13 maart 2006 15:15
> *To:* users@cocoon.apache.org
> *Cc:* [EMAIL PROTECTED]
> *Subject:* File generator and parameters
>
> Hello
>
> I'm working on a site which allows to process some external pages
>
> I call something like:
> http://mysite/processing/process1/an/external/url
> and which is matched by a pipeline like this
> 
> http://{1}/{2}"/>
> 
> 
> 
>
> which works fine if the URL has no parameters
> but if the called URL has parameters, the generator seems to ignore it.
> If the request is
> http://mysite/processing/process1/an/external/url?param=12
> I would like that the generator uses
> http://an/external/url?param=12
> as his src
> Is there a solution to do it?
>
>  Does this Wiki page help you?
> http://wiki.apache.org/cocoon/RequestParameterModule
>
> Maybe you need to combine it with the URLEncodeModule to filter unwanted
> characters.
>
> In cocoon.xconf add:
>
> 
>
> Your map:generate may look like this.
>
>  src=http://{1}/{2}?{url-encode:{request-param:foo}}&{url-encode:{request-param:bar}}/>
>
>
>
> Jasha Joachimsthal
>
> -
>
> Hippo
>
> Oosteinde 11
>
> 1017 WT Amsterdam
>
> The 
-- 
Simone Gianni

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: File generator and parameters

2006-03-13 Thread Jason Johnston

I believe you can use the RequestModule input module to access the current
requests's query string:

http://{1}/{2}?{request:queryString}"/>

--Jason



> Thank you for your answer.
> It could help but...
> In my case, I don't know when writing the sitemap, what will be the URL
> parameters used by the client
> I need something like 'use-request-parameters' that I use for pushing all
> the prameters to an XSLT transformer
>
>
>
> On 3/13/06, Jasha Joachimsthal <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>> -Original Message-
>> *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf
>> Of
>> *Jean-Claude Moissinac
>> *Sent:* maandag 13 maart 2006 15:15
>> *To:* users@cocoon.apache.org
>> *Cc:* [EMAIL PROTECTED]
>> *Subject:* File generator and parameters
>>
>> Hello
>>
>> I'm working on a site which allows to process some external pages
>>
>> I call something like:
>> http://mysite/processing/process1/an/external/url
>> and which is matched by a pipeline like this
>> 
>> http://{1}/{2}"/>
>> 
>> 
>> 
>>
>> which works fine if the URL has no parameters
>> but if the called URL has parameters, the generator seems to ignore it.
>> If the request is
>> http://mysite/processing/process1/an/external/url?param=12
>> I would like that the generator uses
>> http://an/external/url?param=12
>> as his src
>> Is there a solution to do it?
>>
>>  Does this Wiki page help you?
>> http://wiki.apache.org/cocoon/RequestParameterModule
>>
>> Maybe you need to combine it with the URLEncodeModule to filter unwanted
>> characters.
>>
>> In cocoon.xconf add:
>>
>> 
>>
>> Your map:generate may look like this.
>>
>> > src=http://{1}/{2}?{url-encode:{request-param:foo}}&{url-encode:{request-param:bar}}/>
>>
>>
>>
>> Jasha Joachimsthal
>>
>> -
>>
>> Hippo
>>
>> Oosteinde 11
>>
>> 1017 WT Amsterdam
>>
>> The Netherlands
>>
>> +31 (0)20 5224466
>>
>> [EMAIL PROTECTED]
>>
>> www.hippo.nl
>>
>>
>
>
>
> --
> --
> Jean-Claude Moissinac
> Department of Computer Science and Networks
> ENST Paris
> FRANCE
>
> E-mail: [EMAIL PROTECTED]
> Tel: (+33) 1.45.81.80.88
> Fax: (+33) 1.45.81.71.58
>
> http://shadok.enst.fr/jcm
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Is Cocoon the right choice?

2006-03-13 Thread Nils Kaiser
Hello!

Well, I am an happy cocoon user but I am working on a new project and not
sure if cocoon is the right choice for it. The goal of the thing is to be
able to extract information from existing web sites and to transform it and
publish it to different channels. I already have built a project with cocoon
and from the basic idea it covers pretty much with what coocoon is.

The bad thing is that we have some complex requirements for this project and
I am not sure how these can be solved using existing cocoon technology. Here
what we need to be able to do:

1) Logical decisions in the pipeline depending on pipeline content... Yes I
know this is not in the idea of the current cocoon pipeline. But seems to be
pretty important in this project. On a higher view it might be the necessity
to run transformers only if a certain condition refering to the pipeline
applies.

2) As we are working with a lot of information coming from different pages
and 'following' links to get this information, we need a more dynamical
approach to get content. Example:

User requests our URL
- GET content of page 1
- Page 1 has a link to page 2 (which is not known before)
- GET content of page 2
- Transform content of page 1 and page 2

We cant be sure how many links we have to follow and we have to do some
transformations after the request so this can't be a single component... The
problem I see is not accessing and transforming the content. It is the fact
of "restarting" the pipeline dynamically (depending on the content of page
1).

I am not sure how this is possible with cocoon, especially because I have
only little knowledge of flow. Is it the answer??

I also know that it is possible to adress those issues with some tricks: for
example using a special transformer followed by a CIncludeTransformer to
call the same pipeline using cocoon:// for implementing pipeline "restart",
or having a set of DOM transformers which make decisions and write things to
the session to simulate conditional behavior of the pipeline.

I am very open to innovative solutions like having an own pipeline
implementation or a DOM based framework which can adress content based
decisions better.

I am just afraid we might end with a kind of monster doing some ugly things
to force cocoon to do thing it is not supposed to ;)

Thx for your comments,

Nils

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: File generator and parameters

2006-03-13 Thread Bertrand Delacretaz

Le 13 mars 06 à 15:15, Jean-Claude Moissinac a écrit :


...If the request is
http://mysite/processing/process1/an/external/url?param=12
I would like that the generator uses
http://an/external/url?param=12
as his src...


I'm not sure if they do this out of the box, but the proxy generators  
found in the proxy block are fairly close - the  
WebServiceProxyGenerator does copy the request parameters, IIRTCC (If  
I Read The Code Correctly ;-)


Unfortunately their samples are disabled in the current release,  
you'll have to have a look at the source code under src/blocks/proxy  
- but that's not a lot of code. And the samples are still there as  
well, only disabled.


Hope this helps,
-Bertrand



smime.p7s
Description: S/MIME cryptographic signature


Re: File generator and parameters

2006-03-13 Thread Jean-Claude Moissinac
Thank you for your answer.It could help but...In my case, I don't know when writing the sitemap, what will be the URL parameters used by the clientI need something like 'use-request-parameters' that I use for pushing all the prameters to an XSLT transformer
On 3/13/06, Jasha Joachimsthal <[EMAIL PROTECTED]> wrote:







 

  -Original Message-From: [EMAIL PROTECTED]
 
  [mailto:[EMAIL PROTECTED]]On Behalf Of Jean-Claude 
  MoissinacSent: maandag 13 maart 2006 15:15To: 
  users@cocoon.apache.orgCc: 
  [EMAIL PROTECTED]Subject: File generator and 
  parameters
  HelloI'm working on a site which allows to process some external 
  pagesI call something like:http://mysite/processing/process1/an/external/url
 
  and which is matched by a pipeline like this    
              
              
       
          
          
  which works fine if the URL has no parametersbut 
  if the called URL has parameters, the generator seems to ignore it.If the 
  request is http://mysite/processing/process1/an/external/url?param=12
I 
  would like that the generator useshttp://an/external/url?param=12as 
  his srcIs there a solution to do it?

Does this Wiki page help you? 
http://wiki.apache.org/cocoon/RequestParameterModule
Maybe you need to combine it with the URLEncodeModule to filter unwanted 
characters.
In cocoon.xconf add:

Your map:generate may look like this.

 
Jasha Joachimsthal
-
Hippo
Oosteinde 11
1017 WT Amsterdam
The Netherlands
+31 (0)20 5224466 
[EMAIL PROTECTED]
www.hippo.nl 

-- -- Jean-Claude MoissinacDepartment of Computer Science and NetworksENST ParisFRANCEE-mail: [EMAIL PROTECTED]
Tel: (+33) 1.45.81.80.88Fax: (+33) 1.45.81.71.58http://shadok.enst.fr/jcm 


Re: Question about union

2006-03-13 Thread Duncan McLean
Hi Jason

Bingo! The div workaround did the trick in this case.

Cheers

Duncan

> Duncan McLean wrote:
>> Hi Simone
>>
>> Thanks for this...
>>
>> The reason I asked this question is that we were trying this exact
>> approach
>> (though not using a union), but since we are using Ajax, we have been
>> getting an error...
>>
>> This is part of the definition for the form in question
>> It works correctly when we don't use Ajax, however
>> using Ajax we get the javascript alert error message:
>>
>> "No element "life2" defined in document" after the item is selected.
>
> This is due to the fact that (at least in 2.1.8) there is no placeholder
> HTML element generated for ft:group, so when an ajax update occurs it
> doesn't know where in the document to insert the result.  This is just
> one of those widgets that isn't fully supported under ajax mode yet.
>
> I'm trying to remember... I think you can work around this by wrapping
> the contents of your ft:group template with a div or span of the same
> id.  For example:
>
>   
> 
>   
> 
>   
>
> ...though I think this might only work if the life2 group is visible on
> initial load.  Not sure, but worth a try.
>
> --Jason
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



problem with acegi

2006-03-13 Thread Fernando D. Mato Mira

Hello,

 I did an initial setup of acegi for access control of my Cocoon webapp.
The filter entry point specifies a form at /html/login.html
This form is being displayed as in the main sitemap there is an entry:

   
 
   

When I submit the form, I get an error:

org.apache.cocoon.ProcessingException: Unknown resources named 'html' at 



in the sitemap two levels below that is being invoked by the URL I tried 
to access.

That sitemap has a resources element:


   
 
 
 
   
 

Any ideas about what could be causing this? I tried accessing a URL a 
the toplevel and it worked.


If there were any resources for a good acegi+Cocoon setup that would be 
helpful.


Thanks

--
--
Fernando D. Mato Mira [EMAIL PROTECTED]
Thomson Corporation Switzerland AG


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: File generator and parameters

2006-03-13 Thread Jasha Joachimsthal



 

  -Original Message-From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]On Behalf Of Jean-Claude 
  MoissinacSent: maandag 13 maart 2006 15:15To: 
  users@cocoon.apache.orgCc: 
  [EMAIL PROTECTED]Subject: File generator and 
  parameters
  HelloI'm working on a site which allows to process some external 
  pagesI call something like:http://mysite/processing/process1/an/external/url 
  and which is matched by a pipeline like this    
              
              
       
          
          
  which works fine if the URL has no parametersbut 
  if the called URL has parameters, the generator seems to ignore it.If the 
  request is http://mysite/processing/process1/an/external/url?param=12I 
  would like that the generator useshttp://an/external/url?param=12as 
  his srcIs there a solution to do it?

Does this Wiki page help you? 
http://wiki.apache.org/cocoon/RequestParameterModule
Maybe you need to combine it with the URLEncodeModule to filter unwanted 
characters.
In cocoon.xconf add:

Your map:generate may look like this.

 
Jasha Joachimsthal
-
Hippo
Oosteinde 11
1017 WT Amsterdam
The Netherlands
+31 (0)20 5224466 
[EMAIL PROTECTED]
www.hippo.nl 


Re: Question about union

2006-03-13 Thread Jason Johnston
Duncan McLean wrote:
> Hi Simone
> 
> Thanks for this...
> 
> The reason I asked this question is that we were trying this exact approach
> (though not using a union), but since we are using Ajax, we have been
> getting an error...
> 
> This is part of the definition for the form in question
> It works correctly when we don't use Ajax, however
> using Ajax we get the javascript alert error message:
> 
> "No element "life2" defined in document" after the item is selected.

This is due to the fact that (at least in 2.1.8) there is no placeholder
HTML element generated for ft:group, so when an ajax update occurs it
doesn't know where in the document to insert the result.  This is just
one of those widgets that isn't fully supported under ajax mode yet.

I'm trying to remember... I think you can work around this by wrapping
the contents of your ft:group template with a div or span of the same
id.  For example:

  

  

  

...though I think this might only work if the life2 group is visible on
initial load.  Not sure, but worth a try.

--Jason

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JSession and session timout

2006-03-13 Thread Mark Schrijver



hhmmzz.. better mnake that cookies DISABLED
 
No use 
for encodeUrl with cookies enabled...

  -Oorspronkelijk bericht-Van: Mark Schrijver 
  [mailto:[EMAIL PROTECTED]Verzonden: maandag 13 maart 
  2006 15:47Aan: users@cocoon.apache.orgOnderwerp: 
  JSession and session timout
  When 
  I have a session and I have cookies enabled, I need to use the enableUrl 
  transformer to encode the jsessionid into my url. This all works 
  perfectly.
  I 
  have a problem when the session times out hoewever.
  When 
  I have a link on my page, which has the jsession encoded into it, and I wait 
  for the session timeout, something strange happens.
  When 
  I click the link, the following appears in the addressbar:
  http://localhost/mobile/showPost?postId=136&amp;amp;jsessionid=A4DB7C3DA444DDC50D751E2158D7DE86&amp;jsessionid=FF6A9C18EA8AA68A6B4B36E4E91B314E&jsessionid=B9CB0D30704799F7A4326A25BAA791A2&jsessionid=1FBD4859F1EEF875B5EB10410A09D35F
   
  The 
  problem here is that I start each page by calling an action which inserts the 
  sessionId into the database. with this URL however, the sessionId is 
  calculated to: 
  A4DB7C3DA444DDC50D751E2158D7DE86&amp;jsessionid=FF6A9C18EA8AA68A6B4B36E4E91B314E&jsessionid=B9CB0D30704799F7A4326A25BAA791A2&jsessionid=1FBD4859F1EEF875B5EB10410A09D35F
   
  Does anyone have any idea how to solve this 
  problem?
   
  Mark
  
-Oorspronkelijk bericht-Van: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED]Namens Jean-Claude 
MoissinacVerzonden: maandag 13 maart 2006 15:15Aan: 
users@cocoon.apache.orgCC: 
[EMAIL PROTECTED]Onderwerp: File generator and 
parametersHelloI'm working on a site which 
allows to process some external pagesI call something like:http://mysite/processing/process1/an/external/url 
and which is matched by a pipeline like this    
            
            
     
        
        
which works fine if the URL has no 
parametersbut if the called URL has parameters, the generator seems to 
ignore it.If the request is http://mysite/processing/process1/an/external/url?param=12I 
would like that the generator useshttp://an/external/url?param=12as 
his srcIs there a solution to do it?-- -- 
Jean-Claude MoissinacDepartment of Computer Science and 
NetworksENST ParisFRANCEE-mail: [EMAIL PROTECTED]Tel: (+33) 
1.45.81.80.88Fax: (+33) 1.45.81.71.58http://shadok.enst.fr/jcm 



RE: CForms: Redirecting when in AJAX

2006-03-13 Thread Stewart, Gary

> I've been using the CForms AJAX stuff for a short while and 
> I've found it very useful. However I currently run the AJAX 
> forms in an authenticated pipeline. If the session has timed 
> out the pipeline will redirect to the login page. However if 
> a form is open and the session is invalid it will come 
> through as an AJAX request and take the response as an AJAX 
> reply. Is there a way of redirecting rather than showing the 
> debug message?

It was me who posted this in the first place so sorry to pester but does anyone 
know anything about this or suggested documents to look at to see how some of 
the AJAX calls work. 

On a slightly different note but still related to AJAX; can any DOM changes be 
made while an AJAX event is occurring? Basically I'd like something a bit like 
a GoogleMail's "loading" information which is basically some CSS with 
.ajax-start {display: block} and .ajax-finish {display: none} and some 
javascript code to change the class when the AJAX request is happening. 

Thanks,

Gary

*
The information contained in this message may be confidential or 
legally privileged and is intended for the addressee only, If you 
have received this message in error or there are any problems, 
please notify the originator immediately. The unauthorised use, 
disclosure, copying or alteration of this message is 
strictly forbidden.
*


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JSession and session timout

2006-03-13 Thread Mark Schrijver



When I 
have a session and I have cookies enabled, I need to use the enableUrl 
transformer to encode the jsessionid into my url. This all works 
perfectly.
I have 
a problem when the session times out hoewever.
When I 
have a link on my page, which has the jsession encoded into it, and I wait for 
the session timeout, something strange happens.
When I 
click the link, the following appears in the addressbar:
http://localhost/mobile/showPost?postId=136&amp;amp;jsessionid=A4DB7C3DA444DDC50D751E2158D7DE86&amp;jsessionid=FF6A9C18EA8AA68A6B4B36E4E91B314E&jsessionid=B9CB0D30704799F7A4326A25BAA791A2&jsessionid=1FBD4859F1EEF875B5EB10410A09D35F
 
The 
problem here is that I start each page by calling an action which inserts the 
sessionId into the database. with this URL however, the sessionId is calculated 
to: 
A4DB7C3DA444DDC50D751E2158D7DE86&amp;jsessionid=FF6A9C18EA8AA68A6B4B36E4E91B314E&jsessionid=B9CB0D30704799F7A4326A25BAA791A2&jsessionid=1FBD4859F1EEF875B5EB10410A09D35F
 
Does anyone have any idea how to solve this 
problem?
 
Mark

  -Oorspronkelijk bericht-Van: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]Namens Jean-Claude 
  MoissinacVerzonden: maandag 13 maart 2006 15:15Aan: 
  users@cocoon.apache.orgCC: 
  [EMAIL PROTECTED]Onderwerp: File generator and 
  parametersHelloI'm working on a site which allows 
  to process some external pagesI call something like:http://mysite/processing/process1/an/external/url 
  and which is matched by a pipeline like this    
              
              
       
          
          
  which works fine if the URL has no parametersbut 
  if the called URL has parameters, the generator seems to ignore it.If the 
  request is http://mysite/processing/process1/an/external/url?param=12I 
  would like that the generator useshttp://an/external/url?param=12as 
  his srcIs there a solution to do it?-- -- 
  Jean-Claude MoissinacDepartment of Computer Science and 
  NetworksENST ParisFRANCEE-mail: [EMAIL PROTECTED]Tel: (+33) 
  1.45.81.80.88Fax: (+33) 1.45.81.71.58http://shadok.enst.fr/jcm 



Re: i18n transformer doesn't translates attributes

2006-03-13 Thread brosich

Quoting Simone Gianni <[EMAIL PROTECTED]>:


[EMAIL PROTECTED] wrote:


Follow a fragment of xsp code that generate xml:
http://apache.org/xsp";
 xmlns:esql="http://apache.org/cocoon/SQL/v2";
 xmlns:i18n="http://apache.org/cocoon/i18n/2.1";
 space="strip">
...

   
   />
   />
   column="name"/>

   label
...



I think you should try to generate this attribute this way :

http://apache.org/cocoon/i18n/2.1";>label


Yes! It works!

Thank you very much.

Alberto





I'm not an XSP expert, but the
/cocoon-2.1.X/src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl file (that transforms your xsp to a java class) apparently uses this   
parameters

:

name : is the attribute name (which is not i18n:attr, but just attr)
prefix : is the prefix you want to map the namespace of this attribute to.
uri : is the namespace uri

Hope this helps,
ciao,
Simone


--
Simone Gianni

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





This message was sent using IMP, the Internet Messaging Program.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



File generator and parameters

2006-03-13 Thread Jean-Claude Moissinac
HelloI'm working on a site which allows to process some external pagesI call something like:http://mysite/processing/process1/an/external/url
and which is matched by a pipeline like this                                
                which works fine if the URL has no parametersbut if the called URL has parameters, the generator seems to ignore it.
If the request is http://mysite/processing/process1/an/external/url?param=12
I would like that the generator useshttp://an/external/url?param=12as his srcIs there a solution to do it?-- -- Jean-Claude Moissinac
Department of Computer Science and NetworksENST ParisFRANCEE-mail: [EMAIL PROTECTED]Tel: (+33) 1.45.81.80.88Fax: (+33) 1.45.81.71.58
http://shadok.enst.fr/jcm 


Re: i18n transformer doesn't translates attributes

2006-03-13 Thread Simone Gianni

[EMAIL PROTECTED] wrote:


Follow a fragment of xsp code that generate xml:
http://apache.org/xsp";
  xmlns:esql="http://apache.org/cocoon/SQL/v2";
  xmlns:i18n="http://apache.org/cocoon/i18n/2.1";
  space="strip">
...

/>
/>
/>
column="name"/>

label
...



I think you should try to generate this attribute this way :

uri="http://apache.org/cocoon/i18n/2.1";>label


I'm not an XSP expert, but the 
/cocoon-2.1.X/src/blocks/xsp/java/org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl 
file (that transforms your xsp to a java class) apparently uses this 
parameters :


name : is the attribute name (which is not i18n:attr, but just attr)
prefix : is the prefix you want to map the namespace of this attribute to.
uri : is the namespace uri

Hope this helps,
ciao,
Simone


--
Simone Gianni

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Fwd: Re: i18n transformer doesn't translates attributes

2006-03-13 Thread brosich


I reply only to Simone. My mistake.

- Forwarded message from [EMAIL PROTECTED] -
Date: Mon, 13 Mar 2006 14:34:53 +0100
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
 Subject: Re: i18n transformer doesn't translates attributes
  To: Simone Gianni <[EMAIL PROTECTED]>

Quoting Simone Gianni <[EMAIL PROTECTED]>:


Ciao Alberto,
it should work correctly, but before further investigations, are you


i18n cocoon sample works correctly, of course.


sure about the following :
- i18n namespace is correctly declared in a node parent of the  element



http://apache.org/xsp";
xmlns:xspdoc="http://apache.org/cocoon/XSPDoc/v1";
xmlns:esql="http://apache.org/cocoon/SQL/v2";
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"; type="homepage">






whoweare
whoweare

...

I suppose namespace declaration is correct (i18n:text tags work).


- there is a something in your
i18n bundle


The first thing I checked.
There's only one catalogue.


- the  element makes it thru the i18n transformer (no xsl before
the i18n transformer that could alter the area element)

could you post the sitemap fragment and some more xml lines?


...
 
...
   
 
   
 
   
 
...

   
 
   
   
 
 
   
 
 
 
   


The output of "cocoon:/translations/messages(_en).xml" is the following


something
something
...



Follow a fragment of xsp code that generate xml:
http://apache.org/xsp";
   xmlns:esql="http://apache.org/cocoon/SQL/v2";
   xmlns:i18n="http://apache.org/cocoon/i18n/2.1";
   space="strip">
...





label
...


thanks



Simone


[EMAIL PROTECTED] wrote:


I have a strange problem.

Out of a generator i have the following tag

...
 i18n:attr="label">

...

After an i18n transformer, all "" tags are correctly 
translated but the tag above is unchanged and the attribute "label"  
  is untranslated.


Any suggest?

Alberto Brosich

Cocoon 2.1.8
Jetty
Linux Debian 3.1
Kernel 2.6.15


This message was sent using IMP, the Internet Messaging Program.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Simone Gianni

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





This message was sent using IMP, the Internet Messaging Program.



- End forwarded message -



This message was sent using IMP, the Internet Messaging Program.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Question about union

2006-03-13 Thread Duncan McLean
Hi Simone

Thanks for this...

The reason I asked this question is that we were trying this exact approach
(though not using a union), but since we are using Ajax, we have been
getting an error...

This is part of the definition for the form in question
It works correctly when we don't use Ajax, however
using Ajax we get the javascript alert error message:

"No element "life2" defined in document" after the item is selected.

(If kwdJointSingle is set to Single then only Life1 is enabled, otherwise
Life2 is also enabled)

Any ideas?


Is this policy a Single Life or Joint Life 
policy?

Single







  var value = event.source.value;

  var dob1Starwidget = 
event.source.lookupWidget("../life1/dob1Star");
  dob1Starwidget.setValue(" * ");

  var life2widget = 
event.source.lookupWidget("../life2");
  var title2widget = 
event.source.lookupWidget("../life2/title2");
  var firstName2widget = 
event.source.lookupWidget("../life2/firstName2");
  var lastName2widget = 
event.source.lookupWidget("../life2/lastName2");

  var gender2widget = 
event.source.lookupWidget("../life2/gender2");
  var gender2Starwidget =
event.source.lookupWidget("../life2/gender2Star");
  gender2Starwidget.setValue(" * ");

  var dob2widget = 
event.source.lookupWidget("../life2/dob2");
  var dob2Starwidget = 
event.source.lookupWidget("../life2/dob2Star");
  dob2Starwidget.setValue(" * ");


  if (value == "Joint")
  {

life2widget.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE);

gender2Starwidget.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE);

dob2Starwidget.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE);
  }
  else
  {


life2widget.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.DISABLED);
title2widget.setValue(null);
firstName2widget.setValue(null);
lastName2widget.setValue(null);
gender2widget.setValue(null);

gender2Starwidget.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.INVISIBLE);
dob2widget.setValue(null);

dob2Starwidget.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.INVISIBLE);
  }





~
~
~



~
some fields defined
~




~
some other fields defined
~




Thanks again

Duncan

> Hi Duncan,
> you should put an fd:on-value-changed on the dropdown. From inside this
> listener, you can change the status of other widgets to DISABLED and
> have them appear disabled. It should work correctly also setting the
> state of a union.
>
> Simone
>
> Duncan McLean wrote:
>
>>Hi
>>
>>We have a situation where there is a dropdown list that contains one
>>of two options.
>>
>>On one option, we want a group of fields to display and the other set of
>>fields to display, but be in a disabled state.
>>The other option will still show the first set of fields, but the second
>>set of fields will now be enabled as well.
>>
>>Can anyone tell me whether it is possible to achieve this with a union -
>>as all the examples I have seen seem to conditionally show one set of
>>fields or another, not the scenario I have described.
>>
>>Thanks
>>
>>Duncan
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
> --
> Simone Gianni
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>




Re: Question about union

2006-03-13 Thread Simone Gianni

Hi Duncan,
you should put an fd:on-value-changed on the dropdown. From inside this 
listener, you can change the status of other widgets to DISABLED and 
have them appear disabled. It should work correctly also setting the 
state of a union.


Simone

Duncan McLean wrote:


Hi

We have a situation where there is a dropdown list that contains one
of two options.

On one option, we want a group of fields to display and the other set of
fields to display, but be in a disabled state.
The other option will still show the first set of fields, but the second
set of fields will now be enabled as well.

Can anyone tell me whether it is possible to achieve this with a union -
as all the examples I have seen seem to conditionally show one set of
fields or another, not the scenario I have described.

Thanks

Duncan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 


--
Simone Gianni

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: i18n transformer doesn't translates attributes

2006-03-13 Thread Simone Gianni

Ciao Alberto,
it should work correctly, but before further investigations, are you 
sure about the following :
- i18n namespace is correctly declared in a node parent of the  
element
- there is a something in your i18n 
bundle
- the  element makes it thru the i18n transformer (no xsl before 
the i18n transformer that could alter the area element)


could you post the sitemap fragment and some more xml lines?

Simone


[EMAIL PROTECTED] wrote:


I have a strange problem.

Out of a generator i have the following tag

...
i18n:attr="label">

...

After an i18n transformer, all "" tags are correctly  
translated but the tag above is unchanged and the attribute "label" 
is  untranslated.


Any suggest?

Alberto Brosich

Cocoon 2.1.8
Jetty
Linux Debian 3.1
Kernel 2.6.15


This message was sent using IMP, the Internet Messaging Program.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Simone Gianni

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Question about union

2006-03-13 Thread Duncan McLean
Hi

We have a situation where there is a dropdown list that contains one
of two options.

On one option, we want a group of fields to display and the other set of
fields to display, but be in a disabled state.
The other option will still show the first set of fields, but the second
set of fields will now be enabled as well.

Can anyone tell me whether it is possible to achieve this with a union -
as all the examples I have seen seem to conditionally show one set of
fields or another, not the scenario I have described.

Thanks

Duncan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: CForms: HTMLArea Documentation

2006-03-13 Thread Stewart, Gary

> A Switch to Xinha is one of those things that really should happen.
> 
> Best way to "raise" it is to fix Cocoon to use Xinha instead, 
> and submit 
> a patch. That way it is likely to happen. I'm sure at least 
> one of the 
> correspondents on this thread is up to the task.


As it uses all the same (htmlarea.js) references I just gave it a go ripping 
the htmlarea directory out of cocoon-forms-block.jar and sticking the Xinha 
nightly one in. Looks like it is working just fine though I haven't tested the 
multiple language configs or anything. I'm assuming it would work just fine 
from a build as well though I haven't tested that yet.

Gary

*
The information contained in this message may be confidential or 
legally privileged and is intended for the addressee only, If you 
have received this message in error or there are any problems, 
please notify the originator immediately. The unauthorised use, 
disclosure, copying or alteration of this message is 
strictly forbidden.
*


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: i18n transformer doesn't translates attributes

2006-03-13 Thread Jasha Joachimsthal

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: maandag 13 maart 2006 13:01
> To: users@cocoon.apache.org
> Subject: i18n transformer doesn't translates attributes
> 
> 
> I have a strange problem.
> 
> Out of a generator i have the following tag
> 
> ...
>  i18n:attr="label">
> ...
> 
> After an i18n transformer, all "" tags are correctly  
> translated but the tag above is unchanged and the attribute 
> "label" is  
> untranslated.
> 
> Any suggest?

Did you try:

about_area


(assuming it's in xsl)

Jasha Joachimsthal

-

Hippo
Oosteinde 11
1017 WT Amsterdam
The Netherlands
+31 (0)20 5224466 

[EMAIL PROTECTED]
www.hippo.nl

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



i18n transformer doesn't translates attributes

2006-03-13 Thread brosich

I have a strange problem.

Out of a generator i have the following tag

...
i18n:attr="label">

...

After an i18n transformer, all "" tags are correctly  
translated but the tag above is unchanged and the attribute "label" is  
untranslated.


Any suggest?

Alberto Brosich

Cocoon 2.1.8
Jetty
Linux Debian 3.1
Kernel 2.6.15


This message was sent using IMP, the Internet Messaging Program.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Calling a business service from a form

2006-03-13 Thread Duncan McLean
Hi Patrick

Thanks for this...

Not too sure what you mean by uniqueAttributeNameConstraint(event) - can
you explain a bit further please?

Thanks

Duncan

> Hi Duncan,
>
> If onChange can be used instead of onBlur in your senario you might be
> able to use something as follow in you CForm model (fd):
>
> 
>
>  
>
>uniqueAttributeNameConstraint(event);
>
>  
> 
>
> I have used this with Cocoon 2.1.8 with AJAX block enabled, and of
> course AJAX enabled in the form template too:
>
> action="#{$cocoon/continuation/id}.continue"
>method="POST"
>ajax="true">
>
>
> Patrick
>
>
> Duncan McLean wrote:
>> Hi
>>
>> We have a rather complicated scenario where we would like to effectively
>> call a business service which does some detailed calculations involving
>> a value from a text field on a form and then updating the same form with
>> the value.
>>
>> Effectively, the users would like the service calculation to trigger
>> after an onBlur event on the affected text field.
>>
>> We already call a business service in flow (using and XSP page which
>> composes the required SOAP request). We then call this pipeline within
>> flow which causes the business service to be called and we can then get
>> at the returned DOM to extract the values. This can be done up front in
>> flow which makes this scenario easy, but the onBlur scenario is proving
>> trickier.
>>
>> What would be nice would be to (in the fd:javascript block for the text
>> box) using a similar method to the above - call a pipeline that creates
>> another XSP page that will create the appropriate SOAP request and call
>> the business service, interrogate the results and incorporate the
>> results into the same form! Tricky?
>>
>> Sorry that this sounds a bit convoluted, but does anyone have a better
>> suggestion on how to achieve this?
>>
>> So, in summary - onBlur called against a text field, results in creation
>> of SOAP request to a business service which does some business logic
>> calcs, returns some XML which is interrogated for a value and area on
>> the same form re-populated with result of calculation.
>>
>> Phew
>>
>> Thanks in advance
>>
>> Duncan
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Rép. : XSP errors

2006-03-13 Thread Willy Reinhardt
Hi,

To log message you may use function getLogger(); 
For details see 
http://excalibur.apache.org/apidocs/org/apache/avalon/framework/logger/Logger.html
You can throw a ProcessingException and keep the standard exception handling of 
coccon or define you own exception
handling in the sitemap see 
http://cocoon.apache.org/2.1/userdocs/concepts/errorhandling.html

Hope this help

Regards

Willy

 

>>> Kamal Bhatt <[EMAIL PROTECTED]>  >>>

Hi
What is the best practice for handling exceptions in an xsp? Is there a 
way of passing errors to the log?

Thanks.

-- 
Kamal Bhatt

Tourism Technology Pty Ltd


T:  +61 (02) 9956 7300
F:  +61 (02) 9956 7411


Level 10, 1 Pacific Highway, North Sydney, NSW 2060

 
http://www.tt.com.au


--
Disclaimer: This email is confidential and may contain privileged information 
for the sole use of the person or business
to which it is addressed. If you are not the intended recipient, please notify 
the sender by return e-mail or phone as
you must not view, disseminate, distribute or copy this email without our 
consent. We do not accept any liability in
connection with any computer virus, data corruption, incompleteness, or 
unauthorised amendment of this email. It is the
sole responsibility of the receiver to scan for viruses before opening.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]