les sessions sous cocoon

2006-05-10 Thread Jacob Bizzoire

Bonjour,
est ce que quelqu'un pourrait bien m'expliquer un peu le principe de 
fonctionnement des sessions sous cocoon? J'ai lu les session contexts du 
site mais j'ai pas bien compris. Merci d'avance.


_
MSN Hotmail : créez votre adresse e-mail gratuite  à vie ! 
http://www.imagine-msn.com/hotmail/default.aspx?locale=fr-fr



-
Liste francophone Apache Cocoon -- http://cocoon.apache.org/fr/
Pour vous desinscrire : mailto:[EMAIL PROTECTED]
Autres commandes : mailto:[EMAIL PROTECTED]



RE: Apologies

2006-05-10 Thread Jasha Joachimsthal
 -Original Message-
 From: Kamal Bhatt [mailto:[EMAIL PROTECTED]
 Sent: woensdag 10 mei 2006 4:19
 To: users@cocoon.apache.org
 Subject: Apologies
 
 
 
  I need to be more careful. Obviously, the above email was 
 not meant for 
 the mailing list. But now my mistake has been made:
 
 I had the following pipeline:
 
 map:match pattern=images/*/**/*
   map:read src=/data/content/tsg/cmsblocks/holidayImg/{2}/{3} 
 mime-type=image/jpeg type=image-op-resize
 map:parameter name=size-width value={1}/
 map:parameter name=size-preserve-ratio value=true/
   /map:read
 /map:match
 
 Now, this does not preserve ratio, but this does:
 
 map:match pattern=images/*/**/*
   map:read src=/data/content/tsg/cmsblocks/holidayImg/{2}/{3} 
 mime-type=image/jpeg type=image-op-resize
 map:parameter name=size-width value={1}/
 map:parameter name=size-height value=1/
 map:parameter name=size-preserve-ratio value=true/
   /map:read
 /map:match
 
 I have had a look for the ResizeOperation, and it looks like 
 it doesn't 
 need a height. Am I missing something?
 

I once used this to resize jpegs (and it worked):

The reader:
map:reader logger=sitemap.reader.ImageReader name=imageresource 
pool-max=32
src=org.apache.cocoon.reading.ImageReader/

The pipeline:
  map:match pattern=/binaries/**.jpg !-- so it won't match .gif or 
.png etc --
map:read type=image 
  mime-type=image/jpg
  src=/my-path-to-binaries/{1}.jpg
  map:parameter name=width value=50%/
/map:read
  /map:match 

You use size-width as parameter, I used width. Maybe that's the difference? Or 
are you using an other reader?


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]



Re: Apologies

2006-05-10 Thread Kamal Bhatt


As of 2.1.9 there is a new reader called imageop. Check out the 
samples for it. I am using that. Imageop is causing me problems. If I 
cannot get it to work, I may try your way.


Cheers.

Kamal.
Jasha Joachimsthal wrote:


-Original Message-
From: Kamal Bhatt [mailto:[EMAIL PROTECTED]
Sent: woensdag 10 mei 2006 4:19
To: users@cocoon.apache.org
Subject: Apologies



I need to be more careful. Obviously, the above email was 
not meant for 
the mailing list. But now my mistake has been made:


I had the following pipeline:

map:match pattern=images/*/**/*
 map:read src=/data/content/tsg/cmsblocks/holidayImg/{2}/{3} 
mime-type=image/jpeg type=image-op-resize

   map:parameter name=size-width value={1}/
   map:parameter name=size-preserve-ratio value=true/
 /map:read
/map:match

Now, this does not preserve ratio, but this does:

map:match pattern=images/*/**/*
 map:read src=/data/content/tsg/cmsblocks/holidayImg/{2}/{3} 
mime-type=image/jpeg type=image-op-resize

   map:parameter name=size-width value={1}/
   map:parameter name=size-height value=1/
   map:parameter name=size-preserve-ratio value=true/
 /map:read
/map:match

I have had a look for the ResizeOperation, and it looks like 
it doesn't 
need a height. Am I missing something?


   



I once used this to resize jpegs (and it worked):

The reader:
map:reader logger=sitemap.reader.ImageReader name=imageresource 
pool-max=32
   src=org.apache.cocoon.reading.ImageReader/

The pipeline:
 map:match pattern=/binaries/**.jpg !-- so it won't match .gif or .png 
etc --
   map:read type=image 
 mime-type=image/jpg

 src=/my-path-to-binaries/{1}.jpg
 map:parameter name=width value=50%/
   /map:read
 /map:match 


You use size-width as parameter, I used width. Maybe that's the difference? Or 
are you using an other reader?


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]


 




--
Kamal Bhatt


--
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: Catching a NullPointerException to display custom error page

2006-05-10 Thread Aron Shamash
Yes Reijn

I am using the ExceptionSelector already for catching page not found
and invalid continuation exceptions :

exception
class=org.apache.cocoon.ResourceNotFoundException name=not-found/
exception
class=org.apache.cocoon.components.flow.InvalidContinuationException
name=invalid-continuation/ 



I noticed further down the errorhandling page you cite, there is mention
of null pointer excpetions :

A NullPointerException occurs, because something went completely wrong
in the application: All handlers are not configured for such an
exception and so the root sitemaps default handler will apply to it
showing a general error page.

Does this mean it is not possible to configure handlers for this type of
exception and therefore not possible display a customer error page?


The Background
---
The reason for this query is that I am passing a query string parameter
to a page which pulls in content from an xml file.

For example www.mydomain.com/popup.html?id=11 : This displays a popup
using content stored in a file called 11.xml. If the following is typed
into the browser : www.mydomain.com/popup.html?id=foo there is no xml
content to display because the is no foo.xml file and thus a
NullPointerException is thrown.  I would like a nice error page to be
display in this instance.



Any ideas gratefully received.

regards

Aron 




-Original Message-
From: Jeroen Reijn [mailto:[EMAIL PROTECTED] 
Sent: 10 May 2006 08:33
To: users@cocoon.apache.org
Subject: Re: Catching a NullPointerException to display custom error
page

Hi Aron,

did you try the read the errorhandling page?
http://cocoon.apache.org/2.1/userdocs/concepts/errorhandling.html

Perhaps you can try the ExceptionSelector.

regards,

Reijn

Aron Shamash wrote:
 Hello
  
 Does anyone know a way to catch NullPointerExceptions which will allow

 the display of a custom error page?
 I would have thought that this could be done in the sitemap but failed

 to find a way.
  
 The application is built using Cocoon 2.1.7
  
  
 
  
 
  
 
  
 
 Aron Shamash
 
 Senior Interface Developer
 
  
 
 Phone 020 7907 4545
 
 *DNA *An Avenue A | Razorfish Company
 
 _www.dna.co.uk_
 
  

--
Met vriendelijke groet,
Kind regards,

Jeroen Reijn

Hippo

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


-
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: Catching a NullPointerException to display custom error page

2006-05-10 Thread Jason Johnston
Aron Shamash wrote:
 Yes Reijn
 
 I am using the ExceptionSelector already for catching page not found
 and invalid continuation exceptions :
 
   exception
 class=org.apache.cocoon.ResourceNotFoundException name=not-found/
   exception
 class=org.apache.cocoon.components.flow.InvalidContinuationException
 name=invalid-continuation/ 
 
 
 
 I noticed further down the errorhandling page you cite, there is mention
 of null pointer excpetions :
 
 A NullPointerException occurs, because something went completely wrong
 in the application: All handlers are not configured for such an
 exception and so the root sitemaps default handler will apply to it
 showing a general error page.
 
 Does this mean it is not possible to configure handlers for this type of
 exception and therefore not possible display a customer error page?
 
 
 The Background
 ---
 The reason for this query is that I am passing a query string parameter
 to a page which pulls in content from an xml file.
 
 For example www.mydomain.com/popup.html?id=11 : This displays a popup
 using content stored in a file called 11.xml. If the following is typed
 into the browser : www.mydomain.com/popup.html?id=foo there is no xml
 content to display because the is no foo.xml file and thus a
 NullPointerException is thrown.  I would like a nice error page to be
 display in this instance.

I would suggest that NullPointerException is not appropriate for this;
ResourceNotFoundException would be much more appropriate.  Why are you
letting an NPE through rather than checking for null and throwing a more
 descriptive exception type?


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



Pointer to good Java Binding Cocoon Forms docs?

2006-05-10 Thread Berin Loritsch




I am at a point where I need good step by step instructions on binding
a CForm to a Java object (in the JavaBean idiom).  I'm talking from the
beginning.  The reference docs on the Cocoon site are "ok" if you have
the environment set up already.  I have done Google searches and tried
following the samples, but I'm still hit and miss here.

I'm staring up the end of a deadline and I only have some frustration
to show for it.  I believe I only need some coaching at this point, but
there isn't anything that really qualifies for "This is where you begin
and how things work together".  I need some kind of pointer, please.  I
know CForms works, because of some of your comments.  I just can't seem
to get it working for me.

-- 

  

  
  

  
 Berin Loritsch
Owner 
 

  

  
  


  
  

  
 Work:
571-215-7708

 Email: [EMAIL PROTECTED]
IM:
[EMAIL PROTECTED] (MSN)
 http://www.linkedin.com/in/bloritsch

 

 D-Haven
20044 Great Falls
Forest Dr.
 Great Falls, VA 22066
USA

  

  
  


  See who we
know in common
  Want a signature like
this?

  






Re: Pointer to good Java Binding Cocoon Forms docs?

2006-05-10 Thread Antonio Gallardo

Hi Berin,

In the sample there is a nice step by step tutorial of how bean 
framework works [1] lookup for Binding samples.


Best Regards,

Antonio Gallardo.

[1] http://cocoon.zones.apache.org/demos/21branch/samples/blocks/forms/

Berin Loritsch escribió:
I am at a point where I need good step by step instructions on binding 
a CForm to a Java object (in the JavaBean idiom).  I'm talking from 
the beginning.  The reference docs on the Cocoon site are ok if you 
have the environment set up already.  I have done Google searches and 
tried following the samples, but I'm still hit and miss here.


I'm staring up the end of a deadline and I only have some frustration 
to show for it.  I believe I only need some coaching at this point, 
but there isn't anything that really qualifies for This is where you 
begin and how things work together.  I need some kind of pointer, 
please.  I know CForms works, because of some of your comments.  I 
just can't seem to get it working for me.



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



Re: Pointer to good Java Binding Cocoon Forms docs?

2006-05-10 Thread Berin Loritsch




Antonio Gallardo wrote:
Hi Berin,
  
  
In the sample there is a nice step by step tutorial of how bean
framework works [1] lookup for "Binding samples".
  
  
Best Regards,
  
  
Antonio Gallardo.
  
  
[1] http://cocoon.zones.apache.org/demos/21branch/samples/blocks/forms/
  


It's not a "how to" which is what I need.  It's a working sample and I
have to figure out by reverse engineering how the thing works.  I need
it, not only for myself but for my colleagues as well.  This is the
text I see:

 Cocoon Forms has a binding framework which
assists in copying Java-bean or XML (DOM) data into a form and back. 
XML
Binding - A form for just editing an XML file.
Simple
XML Binding - A form for just editing XML data. Illustrates the
XMLAdapter.
Bean
Binding - A form for just editing a Java bean
 Step-by-step tutorial into individual binding
features: 
1.
Binding Simple Values - fb:*/@direction and fb:value/*
2.
Lenient Binding - fb:*/@lenient
3.
Aggregate Binding - fb:aggregate
4.
Heavy Form - Form with lots of select boxes - test memory
utilization, performance
5.
Custom Bindings using Java or _javascript_ - fb:_javascript_ and
fb:custom
6.
XML binding using namespaces - Using XML binding with complex
namespaced XML

And on each link is an example of a form.  There's no link to a "how
to" or tutorial there.

-- 

  

  
  

  
 Berin Loritsch
Owner 
 

  

  
  


  
  

  
 Work:
571-215-7708

 Email: [EMAIL PROTECTED]
IM:
[EMAIL PROTECTED] (MSN)
 http://www.linkedin.com/in/bloritsch

 

 D-Haven
20044 Great Falls
Forest Dr.
 Great Falls, VA 22066
USA

  

  
  


  See who we
know in common
  Want a signature like
this?