Re: ProblemspassingparameterstoXSP

2004-04-21 Thread Jan Hoskens
When calling another pipeline, you can't pass parameters (As far as I know).
I had the same problem a while ago. I then just passed the parameters as
request parameters by calling
src=cocoon:/Pipeline/mypage.jsp?firstparam={1}. Another option is to set
your parameters in a session by invoking an action before generating
anything.

Kind Regards,
Jan

- Original Message - 
From: Carlos Dias [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 20, 2004 6:57 PM
Subject: Re: Problems passing parameters to XSP


 I already try it without the cocoon:/ protocol and works OK.
 The problem is that my generic pipeline for xsp doesn't support the
passing
 of parameters.
 In a previews email (with the same subject) I post my generic pipeline
 if you could give a look at that I will appreciate!

 CDias

 - Original Message -
 From: Hubert Trzewik [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, April 20, 2004 6:06 PM
 Subject: Re: Problems passing parameters to XSP


  I just copied your code into my XSP page for testing, and it works..
  You sure, you have all the xsp:page things correct?
 
  ?xml version=1.0 encoding=UTF-16?
 
  xsp:page
language=java
xmlns:xsp=http://apache.org/xsp;
xmlns:util=http://apache.org/xsp/util/2.0;
  
 
  CustomContent
xsp:logic
  String app_id = util:get-sitemap-parameter name=app_id/;
  String user_id = util:get-sitemap-parameter name=user_id/;
  val1xsp:exprapp_id/xsp:expr/val1
 val2xsp:expruser_id/xsp:expr/val2
/xsp:logic
  /CustomContent
 
  /xsp:page
 
  --
  Are you sure, you have default generator type set to serverpages,
  because in your example attribute type is missing..
 
  Maybe you will try without cocoon:/ as a source of XSP at first..
 
  My sitemap fragment:
 
  map:match pattern=internal/test/*-*
map:generate type=serverpages src=serverpages/test.xsp
  map:parameter name=user_id value={1}/
  map:parameter name=app_id value={2}/
/map:generate
map:serialize type=xml/
  /map:match
 
 
   Hubert,
   Sorry, but that's wrong... you can call xsp:expr inside of a
 xsp:logic
   block.
   You can see this kind of things in all cocoon documentation
  You were right.. it works with xsp:expr inside xsp:logic block..
 
  
   CDias
   - Original Message -
   From: Hubert Trzewik [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Tuesday, April 20, 2004 4:53 PM
   Subject: Re: Problems passing parameters to XSP
  
  
   Hi,
  
   XSP:EXPR should be outside of XSP:LOGIC block..
  
   try:
  
   select
 xsp:logic
  String app_id = util:get-sitemap-parameter name=app_id/;
  String user_id = util:get-sitemap-parameter name=user_id/;
 /xsp:logic
   END OF XSP:LOGIC BLOCK MOVED HERE
  
  val1xsp:exprapp_id/xsp:expr/val1
  val2xsp:expruser_id/xsp:expr/val2
   /select
  
Hi,
I know that this is a very well documented subject, but I try it,
and
doesn't work.
   
My pipeline is:
   map:match pattern=test-*-*
map:generate src=cocoon:/select_bookmark_list.xsp
strip-root=false
 map:parameter name=user_id value={1}/
 map:parameter name=app_id value={2}/
/map:generate
map:serialize type=xml/
   /map:match
   
My xsp file is:
 select
  xsp:logic
   String app_id = util:get-sitemap-parameter name=app_id/;
   String user_id = util:get-sitemap-parameter name=user_id/;
   val1xsp:exprapp_id/xsp:expr/val1
   val2xsp:expruser_id/xsp:expr/val2
  /xsp:logic
 /select
   
The xsp can't pull the parameters. The result is an empty string. I
already try to use the parameters.getParameter(paramname)
but the problem is the same. Can anybody tell me what's wrong
here?!
   
Thanks,
Carlos Dias
   
  
  
   -
   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]



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



Re: sitemap problem

2004-04-21 Thread Jan Hoskens
I'm using flow and I have the same configuration except for your
map:flow-interpreters tag. Try omitting that tag, maybe that helps.

Kind Regards,
Jan

- Original Message - 
From: Vlad Ali [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 20, 2004 9:07 PM
Subject: sitemap problem


 hi

 i have error from cocoon:
 org.apache.avalon.framework.configuration.ConfigurationException: No
languages defined!

 in my sitemap i write :

 map:flow-interpreters default=javascript/

 map:flow language=javascript
   map:script src=flow/form_test.js/
 /map:flow

 and in cocoon.xconf i have

 component-instance

class=org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterp
reter
 name=javascript
   load-on-

startupresource://org/apache/cocoon/components/flow/javascript/fom/fom_syst
em.js/load-
 on-startup
   reload-scriptstrue/reload-scripts
   check-time4000/check-time
   !--  debuggerenabled/debugger --  !-- JavaScript Debugger
support --
 /component-instance


 why i getting error?


 -
 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: Flowscript to Uploadfile

2004-04-21 Thread olivier demah
Jeroen Reijn a écrit :

maybe i'm thinking in the wrong direction, but the error messege says that it's getting a String.
Is your form type correct(multipart) ? 
 

That was this i forgot to add to my form ...

Thanks for the 2 cents :)



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


Re: redirect problem with flowscript : No pipeline matched request: safe_user_area

2004-04-21 Thread Jan Hoskens



As found on http://cocoon.apache.org/2.1/userdocs/flow/api.html

To send: 
cocoon.sendPage("mypipeline", {} );

I think the function expects a biz data (bean) 
to be delivered (thus two parameters, not one), so just give 
{}.

To redirect: 
cocoon.redirectTo("mypipeline");

Kind Regards,
Jan

  - Original Message - 
  From: 
  beyaNet 
  Consultancy 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, April 21, 2004 2:31 
  AM
  Subject: redirect problem with flowscript 
  : No pipeline matched request: safe_user_area
  Hi,i have a flowscript funtion which does the 
  following:var user = null;importClass(Packages.test.User);var 
  newUser = new User();var msg = "";function 
  login() {while (user == null) {cocoon.sendPageAndWait("login.jx", 
  {"msg":msg});try 
  {user = 
  newUser.getUser(cocoon.request.get("username"), 
  cocoon.request.get("password") );break;}catch(e){msg 
  = "The username password combination you 
  entered does not exist. Please 
  retry.";}}cocoon.sendPage("safe_user_area");}So, 
  when a user has been accepted at login redirect them to safe_user_area. I have 
  tried cocoon.redirect(uri) but keep getting an error which says that the 
  redirect function does not exist, when it does! When am I being told that a 
  map pattern which exists, doesn'tmap:match 
  pattern="safe_user_area"map:aggregate 
  element="home"map:part 
  src=""/map:part 
  src=""/map:part 
  src=""/map:part 
  src=""//map:aggregatemap:transform 
  type="xslt" src=""/map:call 
  resource="serialize"/Peter


Re: cocoon under eclipse

2004-04-21 Thread Jean-Christophe Kermagoret
Hi Flavio,

A few months ago, I had this error because the component wasn't 
declared. To do this, I add the following file. I think you can declare 
these components directly in cocoon.xconf, but it works this way for me.

roles.xconf
--
role-list
 role name=org.apache.cocoon.webapps.session.ContextManager
   shorthand=session-context-manager
   
default-class=org.apache.cocoon.webapps.session.components.DefaultContextManager/

 role name=org.apache.cocoon.webapps.session.FormManager
   shorthand=session-form-manager
   
default-class=org.apache.cocoon.webapps.session.components.DefaultFormManager/

 role name=org.apache.cocoon.webapps.session.MediaManager
   shorthand=session-media-manager
   
default-class=org.apache.cocoon.webapps.session.components.DefaultMediaManager/

 role name=org.apache.cocoon.webapps.session.SessionManager
   shorthand=session-manager
   
default-class=org.apache.cocoon.webapps.session.components.DefaultSessionManager/

 role name=org.apache.cocoon.webapps.session.TransactionManager
   shorthand=session-transaction-manager
   
default-class=org.apache.cocoon.webapps.session.components.DefaultTransactionManager/

 role 
name=org.apache.cocoon.webapps.session.context.SessionContextProviderSelector
   shorthand=session-context-providers
   
default-class=org.apache.avalon.excalibur.component.ExcaliburComponentSelector
 /role
role-list
--

and I reference this file in cocoon.xconf in the cocoon element like a 
'user-roles' attribute :
?xml version=1.0 encoding=UTF-8?
cocoon version=2.1 user-roles=/WEB-INF/roles.xconf
...

HTH,

Jean-Christophe

Flavio Palumbo wrote:

Hi all,

I tried to put cocoon under eclipse, building a new project in eclipse,
addressing the directory of a working built of cocoon 2.1.3.
The goal was to try to easily debug cocoon to better understand it.

But now when I try to run it with jetty, in the normal way with cocoon servlet,
i got the following exception :
I run with Win2000, cocoon 2.1.3, jdk 1.4.2_01, jetty.

Any hint ?

Thanks a lot

Flavio Palumbo

Initialization Problem
Message: Could not set up component
Description: org.apache.avalon.framework.configuration.ConfigurationException:
Could not set up component
Sender: org.apache.cocoon.servlet.CocoonServlet

Source: Cocoon Servlet

cause

org.apache.avalon.framework.component.ComponentException: Could not find
component (key [org.apache.cocoon.webapps.session.ContextManager])
request-uri

/

full exception chain stacktrace

Original Exception: org.apache.avalon.framework.component.ComponentException:
Could not set up Component for hint [ session-context] (key [session-context])
at 
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.addComponent(ExcaliburComponentSelector.java:754)
at 
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.configure(ExcaliburComponentSelector.java:414)
at 
org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.java:239)
at 
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:302)
at 
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:143)
at 
org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:556)
at 
org.apache.cocoon.components.CocoonComponentManager.initialize(CocoonComponentManager.java:547)
at 
org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:282)
at org.apache.cocoon.Cocoon.initialize(Cocoon.java:340)
at 
org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:282)
at 
org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:1369)
at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:515)
at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:219)
at 
org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.java:436)
at 
org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplicationHandler.java:150)
at 
org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext.java:442)
at org.mortbay.http.HttpServer.start(HttpServer.java:647)
at org.mortbay.jetty.Server.main(Server.java:429)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at Loader.invokeMain(Unknown Source)
at Loader.run(Unknown Source)
at Loader.main(Unknown Source)
Caused by: org.apache.avalon.framework.service.ServiceException: Could not
find component (key 

Re: Coplets, cl:link - problems with sending and receivingparameters

2004-04-21 Thread Jean-Christophe Kermagoret
Hi,

You can just use the 
{coplet:attributes/name_of_attribute_defined_for_your_coplet} in a 
parameter in your sitemap like usual :
   map:parameter name=category value={coplet:attributes/category}/
This way, you can get it in your stylesheet or xsp (I think because I 
don't use xsp)

Jean-Christophe

Philippe Guillard wrote:

Mario,

Really? I don't think this is with my advice :-) Can you tell me how you
did this? Specially the sitemap of the 2 coplets. Did you use util in
the XSP ? I'm still blocked.
Regards,

Phil

On Mon, 2004-04-19 at 16:58, Mariusz Wjcik wrote:
 

Thanks it works :



- Original Message - 
From: Philippe Guillard [EMAIL PROTECTED]
To: users cocoon [EMAIL PROTECTED]
Sent: Monday, April 19, 2004 6:00 AM
Subject: Re: Coplets, cl:link - problems with sending and
receivingparameters

   

Hi Mario,

I'm on the same thing without success, looking for a solution two...

I think you need more configuration to pass the data from cl:link to the
other coplet, suggest to have a look here :
http://www.mail-archive.com/[EMAIL PROTECTED]/msg08500.html
To get the request param in your XSP page i suggest declare
xmlns:util=http://apache.org/xsp/util/2.0 namespace then use a
util:get-sitemap-parameter name=MyParameter/
Hope it helps !

Phil

On Mon, 2004-04-19 at 04:31, Mariusz Wojcik wrote:
 

Hi I'm using new Cocoon Portal Engine (C. 2.1.4), and I have to send
parameters between coplets (their context is generated by xsp pages).
I have set coplet attribute in my copletdata portal.xml file:

(coplet data) portal.xml

coplet-data id=Pracownicy name=standard
.
attribute
nameid/name!-- My attribute name--
value xsi:type=java:java.lang.String
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;Hello/value
!-- My attribute default value--
/attribute
/coplet-data


In the first xsp file I'm using cl:links commands to reload content,
and setting id attribute value:

first xsp file

.
cl:links
cl:link coplet=Pracownicy-1 path=copletData/attributes/id
value=New_Value/ !-- setting up id value--
p
 cl:link coplet=Pracownicy-1
path=copletData/attributes/uri
value=cocoon:/coplets/xsp/the_other_file.xsp/ !-- content
reloading--
 cl:contentMy Link Content/cl:content
   /p
/cl:links


What I should write in the  the_other_file.xsp file to get the id
parameter value?

The other xsp file


???

Thanks for help
Mario
   

-
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]
 



--

Jean-Christophe Kermagoret
[EMAIL PROTECTED]


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


Re: Calendar Generator

2004-04-21 Thread Ugo Cei
Sorry to drop into this discussion this late, but I completely failed to 
notice it and started to implement a CalendarGenerator by myself. You 
can find it in CVS head [1].

I took the opposite road form the one advocated by Geoff. My 
CalendarGenerator is designed to output a blank calendar for any 
month, that is without any event attached to dates.

It allows for extensibility through subclassing. Just override the:

	void addContent(Calendar date, Locale locale)

method in your subclass. It will be called once for every calendar day 
in the month.

If you want to attach events to dates, my suggestion is that you parse 
your events source (say, an iCal file) in the setup method and store 
events in a suitable data structure, indexed by date. Then, in the 
overridden addContent method, find the events for the date arguments 
and output the desidered XML elements.

Comments?

	Ugo

[1]: 
http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/java/org/apache/cocoon/generation/CalendarGenerator.java

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


Re: Hibernate vs. reload-scripts

2004-04-21 Thread Reinhard Poetz
Christopher Oliver wrote:

What error do you get? AFAIK it should work. Why exactly does 
hibernate need to see all your persistent classes in the classpath?


I guess that Hibernate comes with its own classloader. Maybe it is 
possible to set the compiling classloader dynamically.


Mark Lundquist wrote:

I used to enjoy the automatic recompilation of my Java classes with 
cocoon/flow-interpreters/component-instance/reload-scripts...

...until I started using Hibernate w/ Cocoon.  Hibernate needs to see 
all your persistent classes in the classpath, so now my WEB-INF/lib/ 
has links to my class files, and I guess that is why automatic 
recompilation doesn't work anymore.

Am I right?

Can anything be done to have my cake and eat it too?

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


Portal in cocoon 2.1.5

2004-04-21 Thread zze-MORON François FTRD/DMI/REN
Title: Portal in cocoon 2.1.5






Is portal sample still included in Cocoon 2.1.5 (I built a CVS version this morning and had an unknown ressource error

Trying to reach url http://localhost:8080/samples/portal) ?


François





Re: Portal in cocoon 2.1.5

2004-04-21 Thread Reinhard Poetz
zze-MORON François FTRD/DMI/REN wrote:

Is portal sample still included in Cocoon 2.1.5 (I built a CVS version 
this morning and had an unknown ressource error
Trying to reach url  _http://loca__lhost:8080/samples/portal_ 
http://localhost:8080/samples/portal) ?

François

Yesterday it worked for me.
Try http://[yourserver:yourport]/samples/portal/ (don't forget the slash 
at the end)

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


Re: Flowscript and XSLT

2004-04-21 Thread Reinhard Poetz
beyaNet Consultancy wrote:

Hi,

1. is it possible to apply a stylesheet to a *.jx file like you can to 
xsp?

map:match pattern=*.jx
map:generate type=jx src=jx/{1}.jx/
map:transform type=xslt src=style/main.xsl/
map:serialize type=xhtml/
/map:match
If not, why? Surely not being able to apply a stylesheet to any 
document runs away from the xml/xslt ethos of cocoon!

2. can you aggregate *.jx files

map:match pattern=registerd
map:aggregate element=main
map:part src=context://beyarecords/jx/login.jx/
map:part src=cocoon:/support/contract-summary/
map:part src=context://beyarecords/content/adv-xyz-01.xml/
map:part src=cocoon:/support/banner/
/map:aggregate
map:transform type=xslt src=style/home-page.xsl/
map:call resource=serialize/
/map:match
In the above example, the login.jx file is not rendered to the screen, 
why?


If you use context:/ the physical available file is read and *not* the 
content of an URI provided by Cocoon.

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


Re: Best Practices for Debugging XML?

2004-04-21 Thread laurent_rorive

Hi,

Just use cocoon-view !

Define a view like this.

ex: 

map:view
from-label=aftergenerator
name=aftergenerator
   map:serialize
type=xml
/
  /map:view
  map:view
from-label=afterwoody
name=afterwoody
   map:serialize
type=xml
/
  /map:view
  map:view
from-label=aftertemplate
name=aftertemplate
   map:serialize
/
  /map:view
  map:view
from-label=afterstyle
name=afterstyle
   map:serialize
type=text
/
  /map:view
  map:view
from-label=afteri18n
name=afteri18n
   map:serialize
type=xml
/
  /map:view


And in your pipeline in the different
elements call them 


map:generate
 src="">context://woody/subscription/forms/entry_template.xml
label=aftergenerator /
   map:transform
type=woody
label=afterwoody
/
   !--
REALLY
IMPORTANT
:
You
have
to
translate
the
woody
field,
validation
HERE
else
this
is
lost
--
   map:transform
type=translator
label=afteri18n
, search, print 

map:parameter
name=locale
value={locale}
/
/map:transform
   map:transform
src="">context://stylesheets/woody-main-styling.xsl
/
   
map:serialize
/

Hope it can help

Laurent






David Swearingen [EMAIL PROTECTED]
21/04/2004 04:20
Please respond to users

To:
   [EMAIL PROTECTED]
cc:
   
Subject:
   Best Practices for Debugging XML?


Newbie question: what's the best way to view raw xml when
debugging pipelines for web development? I think my question comes
down to these two points:

1) Should serializers be switched to type=xml
so that I can see raw xml results in a browser?

2) If so, or, in general, are there some good techniques
to allow me to debug without having to change some portion of the sitemap
each time, i.e., a way to configure the sitemap so that when I request
foo.xml instead of foo.html, I see the raw xml instead? 

David


AW: Best Practices for Debugging XML?

2004-04-21 Thread Majcen, Kurt
Title: Nachricht



Hi,

which 
version of cocoon? - for 2.0.3 you could try http://outerthought.net/captor.htmlwhich 
proves rather practical if you have a couple of subsequential transformations 
and you want to view the intermediate results.

Regards
Kurt

  
  -Ursprüngliche Nachricht-Von: David Swearingen 
  [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 21. April 
  2004 04:21An: [EMAIL PROTECTED]Betreff: Best 
  Practices for Debugging XML?
  Newbie question: what's the best way to view raw xml when debugging 
  pipelines for web development? I think my question comes down to these 
  two points:
  
  1) Should serializers be switched to type="xml" so that I can see raw xml 
  results in a browser?
  
  2) If so, or, in general, are there some good techniques to allow me to 
  debug without having to change some portion of the sitemap each time, i.e., a 
  way to configure the sitemap so that when I request foo.xml instead of 
  foo.html, I see the raw xml instead? 
  
  David


Re: Portal in cocoon 2.1.5

2004-04-21 Thread Reinhard Poetz
Reinhard Poetz wrote:

zze-MORON François FTRD/DMI/REN wrote:

Is portal sample still included in Cocoon 2.1.5 (I built a CVS 
version this morning and had an unknown ressource error
Trying to reach url  _http://loca__lhost:8080/samples/portal_ 
http://localhost:8080/samples/portal) ?

François

Yesterday it worked for me.
Try http://[yourserver:yourport]/samples/portal/ (don't forget the 
slash at the end)

Uuups, after rearranging the samples the URLs have changed:
try http://localhost:/samples/blocks/portal/portal
--
Reinhard
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Portal in cocoon 2.1.5

2004-04-21 Thread Carsten Ziegeler
The samples have been refactored. Go th
http://localhost:/ (or whatever port you use)
and then find your way to the samples - block samples -
unstable blocks/portal.

Carsten 

 -Original Message-
 From: Reinhard Poetz [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, April 21, 2004 12:08 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Portal in cocoon 2.1.5
 
 zze-MORON François FTRD/DMI/REN wrote:
 
  Is portal sample still included in Cocoon 2.1.5 (I built a 
 CVS version 
  this morning and had an unknown ressource error Trying to 
 reach url  
  _http://loca__lhost:8080/samples/portal_
  http://localhost:8080/samples/portal) ?
 
  François
 
 Yesterday it worked for me.
 Try http://[yourserver:yourport]/samples/portal/ (don't 
 forget the slash at the end)
 
 --
 Reinhard
 
 
 -
 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: Coplets, cl:link - problems with sending and receivingparameters

2004-04-21 Thread Philippe Guillard
Thanks Jean-Christophe,

Actually my problem was resolved using URI coplets instead of CachingURI
coplets. Don't know why, except that CachingURI uses
portal-html-eventlink transformer.

Regards,

Phil

On Wed, 2004-04-21 at 17:06, Jean-Christophe Kermagoret wrote:
 Hi,
 
 You can just use the 
 {coplet:attributes/name_of_attribute_defined_for_your_coplet} in a 
 parameter in your sitemap like usual :
 map:parameter name=category value={coplet:attributes/category}/
 This way, you can get it in your stylesheet or xsp (I think because I 
 don't use xsp)
 
 Jean-Christophe
 
 Philippe Guillard wrote:
 
 Mario,
 
 Really? I don't think this is with my advice :-) Can you tell me how you
 did this? Specially the sitemap of the 2 coplets. Did you use util in
 the XSP ? I'm still blocked.
 
 Regards,
 
 Phil
 
 
 On Mon, 2004-04-19 at 16:58, Mariusz Wjcik wrote:
   
 
 Thanks it works :
 
 
 
 
 - Original Message - 
 From: Philippe Guillard [EMAIL PROTECTED]
 To: users cocoon [EMAIL PROTECTED]
 Sent: Monday, April 19, 2004 6:00 AM
 Subject: Re: Coplets, cl:link - problems with sending and
 receivingparameters
 
 
 
 
 Hi Mario,
 
 I'm on the same thing without success, looking for a solution two...
 
 I think you need more configuration to pass the data from cl:link to the
 other coplet, suggest to have a look here :
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg08500.html
 
 To get the request param in your XSP page i suggest declare
 xmlns:util=http://apache.org/xsp/util/2.0 namespace then use a
 util:get-sitemap-parameter name=MyParameter/
 
 Hope it helps !
 
 Phil
 
 
 On Mon, 2004-04-19 at 04:31, Mariusz Wojcik wrote:
   
 
 Hi I'm using new Cocoon Portal Engine (C. 2.1.4), and I have to send
 parameters between coplets (their context is generated by xsp pages).
 
 I have set coplet attribute in my copletdata portal.xml file:
 
 (coplet data) portal.xml
 
 coplet-data id=Pracownicy name=standard
 .
 attribute
 nameid/name!-- My attribute name--
 value xsi:type=java:java.lang.String
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;Hello/value
 !-- My attribute default value--
 /attribute
 /coplet-data
 
 
 
 In the first xsp file I'm using cl:links commands to reload content,
 and setting id attribute value:
 
 first xsp file
 
 .
 cl:links
  cl:link coplet=Pracownicy-1 path=copletData/attributes/id
 value=New_Value/ !-- setting up id value--
  p
   cl:link coplet=Pracownicy-1
  path=copletData/attributes/uri
 value=cocoon:/coplets/xsp/the_other_file.xsp/ !-- content
 reloading--
   cl:contentMy Link Content/cl:content
 /p
 /cl:links
 
 
 
 What I should write in the  the_other_file.xsp file to get the id
 parameter value?
 
 
 The other xsp file
 
 
 ???
 
 
 Thanks for help
 Mario
 
 
 
 
 -
 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]



Sendmail question

2004-04-21 Thread Philippe Guillard
Hi all,

Question1:
I'm using Sendmail logicsheet, works good exept serverpage generator
takes 5/10 seconds for it. I don't have hosting and mail is sent from
[EMAIL PROTECTED] like the samples from my Linux. I'd like to
hear from people who have this in real environment with configured mail
server.

Question2:
I plan to send sometimes hundreds of mail in a XSP Action launched by
scheduler, i wonder how i should proceed to pool them.

Best Regards,

Phil 



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



Re: Flowscript and XSLT

2004-04-21 Thread beyaNet Consultancy
Hi,
in the following sitemap snippet:

map:match pattern=registerd_user_area>
!--map:act type=auth-protect>
map:parameter name=handler value=beyarecords/>-->
map:aggregate element=home>
map:part src=cocoon:/support/menu/>
map:part src=cocoon:/support/contract-summary/>
map:part src=context://beyarecords/content/adv-xyz-01.xml/>
map:part src=cocoon:/support/banner/>
/map:aggregate>


map:transform type=xslt src=style/home-page.xsl/>
map:call resource=serialize/>
!--/map:act>-->
/map:match>

the map:part section which make reference to src=cocoon:/ all make process xsp server pages, for example:

map:match pattern=support/menu>
map:generate type=serverpages src=xsp/menu.xsp/>
map:call resource=serialize/>
/map:match>

The problem that I am experiencing is that when this pattern, registerd_user_area,  is called from a flowscript:

function login() {

while (user == null) {


cocoon.sendPageAndWait(login.jx, {msg:msg});
try {
user = newUser.getUser(cocoon.request.get(username), cocoon.request.get(password) );
break;
}catch(e){
msg = The username password combination you entered does not exist. Please retry.;
}
}


cocoon.redirectTo(registerd_user_area); - HERE THE CALL IS MADE
}

the parts of the aggregation which process serverpages are not rendered to the screen, i.e. they appear blank. Why?

Peter
On 21 Apr 2004, at 11:10, Reinhard Poetz wrote:

beyaNet Consultancy wrote:

Hi,

1. is it possible to apply a stylesheet to a *.jx file like you can to xsp?

map:match pattern=*.jx>
map:generate type=jx src=jx/{1}.jx/>
map:transform type=xslt src=style/main.xsl/>
map:serialize type=xhtml/>
/map:match>

If not, why? Surely not being able to apply a stylesheet to any document runs away from the xml/xslt ethos of cocoon!

2. can you aggregate *.jx files

map:match pattern=registerd>
map:aggregate element=main>
map:part src=context://beyarecords/jx/login.jx/>
map:part src=cocoon:/support/contract-summary/>
map:part src=context://beyarecords/content/adv-xyz-01.xml/>
map:part src=cocoon:/support/banner/>
/map:aggregate>


map:transform type=xslt src=style/home-page.xsl/>
map:call resource=serialize/>
/map:match>

In the above example, the login.jx file is not rendered to the screen, why?


If you use context:/ the physical available file is read and *not* the content of an URI provided by Cocoon.

-- 
Reinhard


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



Re: Sendmail question

2004-04-21 Thread Jan Hoskens
Maybe you should consider another way (non XSP). I have some long-duration
tasks which include email a result to different addresses. I do this by
calling flowscript, setting everything up (configs/parameters) and then
launching a thread. At the end of this thread, I use java mail to send
emails. This way, the browser gets an immediate response (something like:
you're request is being processed), the thread launches and carries out
everything including sending mails. The result is afterwards still available
on a page which shows a directory where the result ends up.

Kind Regards,
Jan

- Original Message - 
From: Philippe Guillard [EMAIL PROTECTED]
To: users cocoon [EMAIL PROTECTED]
Sent: Wednesday, April 21, 2004 1:50 PM
Subject: Sendmail question


 Hi all,

 Question1:
 I'm using Sendmail logicsheet, works good exept serverpage generator
 takes 5/10 seconds for it. I don't have hosting and mail is sent from
 [EMAIL PROTECTED] like the samples from my Linux. I'd like to
 hear from people who have this in real environment with configured mail
 server.

 Question2:
 I plan to send sometimes hundreds of mail in a XSP Action launched by
 scheduler, i wonder how i should proceed to pool them.

 Best Regards,

 Phil



 -
 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]



XSP and sitemap parameters

2004-04-21 Thread Carmona Perez, David



Hi,

Does anybody know how to
pass sitemap parameters to an XSP page?
Can I
do?

 map:generate type='xsp'

map:parameter name='my-param'
value='something'/
 /map:generate

How do I retrieve this
parameter from the XSP code?

Thanks for any
answer.

*
Este correo ha sido procesado por el antivirus del Grupo FCC.
*


Confused: 2.1.3 - pseudoprotocols, sources and factories - what API?

2004-04-21 Thread Sandor Spruit
Folks,

I'm a bit confused about pseudoprotocols, sources and factories. I'm 
trying to figure out how this works in Cocoon 2.1.3 and beyond. I'll 
need this in the near future for some work on a custom source.

(I know Cocoon 2.1.4 is out but I'm still setting up my system to cope 
with upgrades to newer versions and development stuff)

The confusion starts with some stuff labelled deprecated in 2.1.3. The 
stuff in cocoon.xconf between source-handler tags. The newer stuff is 
between source-factories tags in cocoon.xconf. Fair enough.

The big question is, what API do I have to implement to fit into the new 
 SourceFactory scheme?? I think:

org.apache.excalibur.source.Source
org.apache.excalibur.source.SourceFactory
(just like, for example, XMLDBSource and XMLDBSourceFactory)

Is this the same stuff as found here, or is the webpage outdated?
http://avalon.apache.org/excalibur/api/
Any hints on this much appreciated,
Sandor
---
NEW! international master programme 'Content and Knowledge Engineering'
see: http://www.informationscience.nl/
My personal coordinates: http://www.cs.uu.nl/people/sandor/
Our minds are harnessed by knowledge, by the hill and the will
to succeed. From: Fish, Vigil in a wilderness of mirrors
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: XSP and sitemap parameters

2004-04-21 Thread Carmona Perez, David



Thanks.

I think there
is other way

xsp:exprparameters.getParameter("my-param")/xsp:expr

  -Mensaje original-De: beyaNet Consultancy
  [mailto:[EMAIL PROTECTED]Enviado el: miércoles, 21 de abril de
  2004 15:30Para: [EMAIL PROTECTED]Asunto: Re: XSP
  and sitemap parameters
  try, 
  1. xsp: 
  xsp:page language="java" 
   xmlns:xsp="http://apache.org/xsp" 
   xmlns:util="http://apache.org/xsp/util/2.0" 
   
  
  page 
   xsp:logic 
  
   int newUser = (int)util:get-sitemap-parameter
  name="newUser"/.length(); 
   /xsp:logic 
  /page 
  /xsp:page 
  2. Sitemap: 
  map:generate type="serverpages"
  src="" 
   map:parameter name="newUser" value="1"/ 
  /map:generate 
  Hi, 
   
  Does anybody know how to pass sitemap parameters to an XSP
  page? 
  Can I do? 
   
   map:generate type='xsp'
  
   map:parameter name='my-param' value='something'/

   /map:generate 
   
  How do I retrieve this parameter from the XSP code?
  
   
  Thanks for any answer. 
  * 
  Este correo ha sido procesado por el antivirus del Grupo FCC. 
  * 
  

*
Este correo ha sido procesado por el Antivirus del Grupo FCC.
*


Re: XSP and sitemap parameters

2004-04-21 Thread olivier demah
Carmona Perez, David a écrit :

Thanks.
 
I think there is other way
 
xsp:exprparameters.getParameter(my-param)/xsp:expr
parameters requiers 2 parms if i'm not wrong :
parameters.getParameter(your-parm,defaultvalue);
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Sendmail question

2004-04-21 Thread Joose Vettenranta
Hi,

I have created sendmail transformer (although, not yet released) to 
send emails. Transformer is still little buggy and requires little bit 
rewriting. We are releasing it as GPL when it's ready.

Maybe doing something like this helps?

- Joose

21.4.2004 kello 14:50, Philippe Guillard kirjoitti:

 Hi all,
Question1:
I'm using Sendmail logicsheet, works good exept serverpage generator
takes 5/10 seconds for it. I don't have hosting and mail is sent from
[EMAIL PROTECTED] like the samples from my Linux. I'd like 
to
hear from people who have this in real environment with configured mail
server.

Question2:
I plan to send sometimes hundreds of mail in a XSP Action launched by
scheduler, i wonder how i should proceed to pool them.
Best Regards,

Phil



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

--
Always remember that you are unique, just like everyone else!
* http://iki.fi/joose/ * [EMAIL PROTECTED] * +358 44 561 0270 *
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: XSP: cinclude and map:parameters problem

2004-04-21 Thread Andreas Hartmann
olivier demah wrote:

[...]

So i thought ; i had to do something to pass parameters from xsp to xsp 
because i call news.xsp with cinclude.
This does not work. Your compiled XSP is executed _before_ the
CInclude transformation, so including another XSP is not possible
this way.
-- Andreas

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


Re: XSP: cinclude and map:parameters problem

2004-04-21 Thread olivier demah
Andreas Hartmann a e'crit :

olivier demah wrote:

[...]

So i thought ; i had to do something to pass parameters from xsp to 
xsp because i call news.xsp with cinclude.


This does not work. Your compiled XSP is executed _before_ the
CInclude transformation, so including another XSP is not possible
this way.
at least its clear :)

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


RE: XSP and sitemap parameters

2004-04-21 Thread Carmona Perez, David

There are 2 versions: one that throws a ParameterException if not provided the default 
value, and the other you have commented.

I have tried out and it works!.

-Mensaje original-
De: olivier demah [mailto:[EMAIL PROTECTED]
Enviado el: miércoles, 21 de abril de 2004 16:01
Para: [EMAIL PROTECTED]
Asunto: Re: XSP and sitemap parameters



Carmona Perez, David a écrit :

 Thanks.
 
 I think there is other way
 
 xsp:exprparameters.getParameter(my-param)/xsp:expr

parameters requiers 2 parms if i'm not wrong :
parameters.getParameter(your-parm,defaultvalue);


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


*
Este correo ha sido procesado por el Antivirus del Grupo FCC.
*

*
Este correo ha sido procesado por el Antivirus del Grupo FCC.
*

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



RE: tomcat 5.0.19 and coccon 2.1.4

2004-04-21 Thread Isidro Vila Verde



Well, I solve the problem by manually copy jar files 
from $DOWNLOAD_DIR/cocoon-2.1.4/build/cocoon-2.1.4/blocks/ (jxforms-block.jar, 
woody-block.jar, ...) to $CATALINA_HOME/work/Catalina/localhost/cocoon/loader 
and unpack them. 

That's all.

I don't see why it wasn't extracted automatically from 
cocoon.war but it works, at least for now, to see the examples. 

I hope don't get into troubles when I made my own 
files.

Thank you Antonio and Arcadio for your try to 
help

Isidro

  
  
  De: Isidro Vila Verde [mailto:[EMAIL PROTECTED] 
  Enviada: quarta-feira, 14 de Abril de 2004 03:18Para: 
  '[EMAIL PROTECTED]'Assunto: tomcat 5.0.19 and coccon 
  2.1.4
  
  Dear 
  all,
  
  I am trying to 
  install (in linux)cocoon 2.1.4 as a webapp under Tomcat 5.0.19. I tested 
  it with some applications and it seems to be ok. But now I want to use 
  JXForms. As this is completely new for me I decide to test samples first 
  and... for my surprise it don't.
  That is I try to 
  access to http://localhost:8080/cocoon/samples/jxforms/calc/and 
  I got this error :
  
  "file:/usr/local/jakarta-tomcat-5.0.19/webapps/cocoon/samples/jxforms/calc/calc.js", 
  line 1: uncaught _javascript_ exception: at top-level script 
  (file:/usr/local/jakarta-tomcat-5.0.19/webapps/cocoon/samples/jxforms/calc/calc.js, 
  Line 1): java.io.FileNotFoundException: 
  /usr/local/jakarta-tomcat-5.0.19/work/Catalina/localhost/cocoon/loader/org/apache/cocoon/components/jxforms/flow/_javascript_/JXForm.js"file:/usr/local/jakarta-tomcat-5.0.19/webapps/cocoon/samples/jxforms/calc/calc.js", 
  line 1: uncaught _javascript_ exception: at top-level script 
  (file:/usr/local/jakarta-tomcat-5.0.19/webapps/cocoon/samples/jxforms/calc/calc.js, 
  Line 1): java.io.FileNotFoundException: 
  /usr/local/jakarta-tomcat-5.0.19/work/Catalina/localhost/cocoon/loader/org/apache/cocoon/components/jxforms/flow/_javascript_/JXForm.js
  
  
  Of courseI 
  check the directory and the subdir jxforms under $CATALINA_HOME/localhost/cocoon/loader/org/apache/cocoon/components 
  don't exist. In fact there are only a few directories there. 
  
  I have tried some 
  different coccon builds but unsuccessfully. I also look in mailing lists to 
  see if someone had the same problem but it seems there are not knowing 
  reports.
  
  Cansome of 
  you give me some help?
  
  Thank 
  you
  
  Isidro Vila Verdeemail:[EMAIL PROTECTED]web: http://serprest.pt/tel: 
  223743701tel: 969103006 
  
  ---Outgoing mail is certified Virus Free.Checked by 
  AVG anti-virus system (http://www.grisoft.com).Version: 6.0.656 / Virus 
  Database: 421 - Release Date: 
09-04-2004


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


Re: XSP and logicsheets namespaces inclusions

2004-04-21 Thread Olivier Billard
Really many thanks for your answer Christopher
In fact, we are using the use-store=true option, and we will try using 
the false.
Thank you very much, this problem is also annoying us for long time...

I'll write back results !

--
Olivier
Christopher Painter-Wakefield wrote:



Olivier,

we are using C2.0.3, and struggled with this problem for over a year.  We
have created many logicsheets, many of them using each other, and this
problem was frequent and frustrating.  The problem seems to be caused by
some kind of race condition, and we learned we could reproduce it reliably
by hitting the same (uncompiled) page twice quickly, i.e., the second
request before the compilation is complete.
 The fix for us turned out to be a cocoon.xconf setting which was recently
discussed on the list as buggy.  :(  The setting is the use-store setting
for the xslt-processor.  Apparently setting this to true improves
performance, but is known to be buggy.  Well, setting it to false fixed the
bug for us.
  xslt-processor
class=org.apache.cocoon.components.xslt.XSLTProcessorImpl
logger=core.xslt-processor
parameter name=use-store value=false/
parameter name=incremental-processing value=true/
  /xslt-processor
Please let me know if this works for you.

- Christopher



|-+
| |   Olivier Billard  |
| |   [EMAIL PROTECTED]|
| |   r   |
| |   Sent by: news|
| |   [EMAIL PROTECTED]|
| |   rg  |
| ||
| ||
| |   04/20/2004 09:49 |
| |   AM   |
| |   Please respond to|
| |   users|
| ||
|-+
  
--|
  |
  |
  |   To:   [EMAIL PROTECTED]  
|
  |   cc:  
  |
  |   Subject:  XSP and logicsheets namespaces inclusions  
  |
  
--|


Hi again,

I have an XSP that includes some logicsheets. Some of these logicsheets
also includes a logicsheet (xsp-request for example).
But some times (10% of the time) after a restart of the server, a
compilation error occurs, caused by the xsp-request logicsheet not
beeing translated, and xsp-request:... elements appearing in the java
source of the XSP.
Most of the time, the XSP compiles without any problem.
What could be the problem ?
Is it bad to use a logicsheet in another ?
Is there a special order in declaring logicsheets namespaces ?
Thanks,

--
Olivier Billard
-
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: XSP and sitemap parameters

2004-04-21 Thread Martin Holz
olivier demah [EMAIL PROTECTED] writes:

 Carmona Perez, David a écrit :
 
  Thanks.
   I think there is other way
 
   xsp:exprparameters.getParameter(my-param)/xsp:expr
 
 
 parameters requiers 2 parms if i'm not wrong :
 parameters.getParameter(your-parm,defaultvalue);

There are two versions of parameters.getParameter().
The one argument variant will throw a  ParameterException
if the parameter does not exist.


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



Re: Woody/Cocoon forms questions

2004-04-21 Thread Sebastian
Since this error is on the aggregate-widget and that one is not actually 
on the template, there is no position where the (!) should be next to.

Therefor you need to explitely position it with a separate 
ft:validation-error /

see also here: 
http://marc.theaimsgroup.com/?l=xml-cocoon-devm=108176649831199w=2
and here:
http://marc.theaimsgroup.com/?l=xml-cocoon-devm=107486651220426w=2

and let's thank Vadim :-)
Hmm. Very hacky :) Anyway. I think there is another bug there :) I don't 
know
if it's well known or if I should populate it on bugzilla.
Let me show my beautiful example :)

 fd:aggregatefield id=nip required=false
  fd:labelNIP:/fd:label
	fd:datatype base=string
fd:validation
	fd:nip
	 fd:failmessageInvalid NIP number./fd:failmessage
	/fd:nip			
/fd:validation  	
	/fd:datatype
  fd:split pattern=([0-9]{3})-([0-9]{2,3})-([0-9]{2})-([0-9]{2,3})
fd:map group=1 field=part1/
fd:map group=2 field=part2/
fd:map group=3 field=part3/
fd:map group=4 field=part4/
fd:failmessageNot a valid 10-digit NIP number./fd:failmessage
  /fd:split
  fd:combine expression='Concat(part1, -, part2, -, part3, -, 
part4)'/
  fd:widgets
fd:field id=part1
	fd:labelNIP:/fd:label
  fd:datatype base=string/
/fd:field
fd:field id=part2
	fd:label-/fd:label
  fd:datatype base=string/
/fd:field
fd:field id=part3
	fd:label-/fd:label
  fd:datatype base=string/
/fd:field
fd:field id=part4
	fd:label-/fd:label
  fd:datatype base=string/
/fd:field
  /fd:widgets
/fd:aggregatefield

fd:split pattern doesn't work correctly. For example. If I'll fill just 
single
field then I get a message Not a valid 10-digit NIP number.. That's 
correct.
If I fill all fields with integers I get Invalid NIP number.. That's 
correct
and not correct :) In fact it is an invalid NIP, but I can provide value
1-1-1-1 which not match the pattern and I should get Not a valid 10-digit 
NIP
number.. Moreover if I will fill all fields but some of it will be a text
instead of number I will get an exception from my NIP validator :) because
of course it'll be validated against NIP rule not pattern. I've tried to
change data types for parts to integer but in this case it doesn't validate
at all and always returns Not a valid 10-digit NIP number..
Bug or not bug? And is it a well known bug? :)

Kindly regards,

--
Thought by thought we see our own mistakes.
mailto: [EMAIL PROTECTED]

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


Re: how to initiate a CVS update from within Cocoon?

2004-04-21 Thread Upayavira
Lars Huttar wrote:

Hi all,
We're a team developing a Cocoon application, and we're sharing
our code (cocoon/mount/**) via CVS.
We have a test server, which we'll call salem, on which resides
a copy of Tomcat and Cocoon and our code.
The goal is to have a process for updating certain folders on
salem from the CVS server; and we want to be able to run this
update process remotely. Doing it through Cocoon itself would be
ideal (because it would leverage the ability we already have,
to send request URLs to salem, and avoid the need to give each
team member special permissions to run a Windows Scheduled Task,
not to mention that one of our members is a Mac user and can't
run Windows Scheduled Tasks over the network anyway).
So, what we need is a way to run a cvs update command from
Cocoon. Any ideas on how we could do this?
I see there is an Ant cvs task.
If that's a good idea, how do we call Ant from a Cocoon sitemap?
 

In the scratchpad block there is an AntBuildGenerator. Never used it, I 
presume it works.

Regards, Upayavira



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


Re: [portal] Opening portal page from CachingURICoplet's flow

2004-04-21 Thread Alex Romayev
I've posted this a few days ago -- let's give it
another try :)

--- Alex Romayev [EMAIL PROTECTED] wrote:
 I have implemeneted registration form as a CForm
 inside a CachingURICoplet.  At the end of
 registration
 (on confirm) I need to do the following in my
 flowscript:
 
 1. Write results to the database
 2. Log the user with the new username/passoword to
 portal
 3. Redirect to the main portal page (maintab = 0)
 
 Is it possible to do this from flow?  Using
 sendPage()
 for #3 would cause the page to be displayed inside
 my
 coplet, which is not what I want.
 
 Any ideas?
 
 Thanks,
 -Alex


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



HttpSession cocoonportal tomcat

2004-04-21 Thread Anna Bikkina
Hi,

I have a very peculiar problem with my application. Can someone please shed 
some light on this.

I have a webapplication(app1) whose logon page loads 2 frames. Frame1 has 
index.jsp from app1 and frame2 has my app from cocoon(app2).This app in 
cocoon uses cocoon's portal framework.

When user opens the first page of app1 both the frames are loaded with 
different applications. When user logs on to app1 internally using java 
script I logon to cocoon portal and display the logged in portal page in 
frame2. 

In frame2 I see the portal page but when the user tries to do anything it logs 
out. Session is lost I guess, and the same happens in frame1 also. Both the 
sessions are lost.And this interesting behaviour happens only when app1 is 
set as ROOT context of tomcat.If app1 is not the ROOT context of tomcat 
everything works fine.

Can someone please help me solve this. I have been struggling with this for a 
week now.Something very mysterious is happening and I am not good at manging 
sessions etc . I might be missing something.

Thanks in advance,
Anna.


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



Re: Flowscript and XSLT

2004-04-21 Thread Reinhard Poetz
Have you tried replacing the map:aggregate with map:generate? Does it 
return a result?
And what happens if you request registerd_user_area?

--
Reinhard


beyaNet Consultancy wrote:

Hi,
in the following sitemap snippet:
map:match pattern=registerd_user_area
!--map:act type=auth-protect
map:parameter name=handler 
value=beyarecords/--
map:aggregate element=home
map:part src=cocoon:/support/menu/
map:part 
src=cocoon:/support/contract-summary/
map:part 
src=context://beyarecords/content/adv-xyz-01.xml/
map:part 
src=cocoon:/support/banner/
/map:aggregate
   
map:transform type=xslt 
src=style/home-page.xsl/
map:call resource=serialize/
!--/map:act--
/map:match

the map:part section which make reference to src=cocoon:/ all 
make process xsp server pages, for example:

map:match pattern=support/menu
map:generate type=serverpages 
src=xsp/menu.xsp/
map:call resource=serialize/
/map:match

The problem that I am experiencing is that when this pattern, 
registerd_user_area,  is called from a flowscript:

function login() {

while (user == null) {
   
cocoon.sendPageAndWait(login.jx, {msg:msg});
try {
user = newUser.getUser(cocoon.request.get(username), 
cocoon.request.get(password) );
break;
}catch(e){
msg = The username password combination you entered does 
not exist. Please retry.;
}
}

cocoon.redirectTo(registerd_user_area); - HERE THE CALL IS MADE
}

the parts of the aggregation which process serverpages are not 
rendered to the screen, i.e. they appear blank. Why?

Peter
On 21 Apr 2004, at 11:10, Reinhard Poetz wrote:
beyaNet Consultancy wrote:

Hi,

1. is it possible to apply a stylesheet to a *.jx file like you can 
to xsp?

map:match pattern=*.jx
map:generate type=jx src=jx/{1}.jx/
map:transform type=xslt src=style/main.xsl/
map:serialize type=xhtml/
/map:match
If not, why? Surely not being able to apply a stylesheet to any 
document runs away from the xml/xslt ethos of cocoon!

2. can you aggregate *.jx files

map:match pattern=registerd
map:aggregate element=main
map:part src=context://beyarecords/jx/login.jx/
map:part src=cocoon:/support/contract-summary/
map:part src=context://beyarecords/content/adv-xyz-01.xml/
map:part src=cocoon:/support/banner/
/map:aggregate
map:transform type=xslt src=style/home-page.xsl/
map:call resource=serialize/
/map:match
In the above example, the login.jx file is not rendered to the 
screen, why?


If you use context:/ the physical available file is read and *not* 
the content of an URI provided by Cocoon.

--
Reinhard

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


Re: HttpSession cocoonportal tomcat

2004-04-21 Thread Anna Bikkina

Hi just an update on the post below.

I guess this is more to do with cocoon's handling of sessions. My 
application(app1) firsts logs onto cocoon's portal and then logons to itself. 
The session of cocoon is somehow getting invalidated when my app1 is getting 
logged in. I tried the same with an other application in frame2 other than 
cocoon. It worked as expected.

Can someone please shed some light on it.

On Wednesday 21 April 2004 03:57 pm, Anna Bikkina wrote:
 Hi,

 I have a very peculiar problem with my application. Can someone please shed
 some light on this.

 I have a webapplication(app1) whose logon page loads 2 frames. Frame1 has
 index.jsp from app1 and frame2 has my app from cocoon(app2).This app in
 cocoon uses cocoon's portal framework.

 When user opens the first page of app1 both the frames are loaded with
 different applications. When user logs on to app1 internally using java
 script I logon to cocoon portal and display the logged in portal page in
 frame2.

 In frame2 I see the portal page but when the user tries to do anything it
 logs out. Session is lost I guess, and the same happens in frame1 also.
 Both the sessions are lost.And this interesting behaviour happens only when
 app1 is set as ROOT context of tomcat.If app1 is not the ROOT context of
 tomcat everything works fine.

 Can someone please help me solve this. I have been struggling with this for
 a week now.Something very mysterious is happening and I am not good at
 manging sessions etc . I might be missing something.

 Thanks in advance,
 Anna.


 -
 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: Flow-Woody-Event-Woody... possible?

2004-04-21 Thread Joerg Heinicke
On 21.04.2004 07:45, Steve Steinitz wrote:

I had the same problem yesterday too:
http://marc.theaimsgroup.com/?l=xml-cocoon-devm=108238973125352w=4
and fixed it by changing the order of the form widgets in the definition.
Furthermore my form.submitId was also null at the end, while 
form.getSubmitWidget().getId() returned the correct value.

Does this help?
Yes, thank you.  In our flowscript we use a woody2.js Form so we
can use 'form.form' to get the java form within and so can write
if (remove.equals(form.form.getSubmitWidget().getId())) 

and all is good.

Note that so far we have been blissfully unaware of any symptoms
from the problem Marc alluded to: I really don't know what the
event-call on the continuations stack will do if you call showForm
from inside the event-handling but we are on alert.
Yes, my comment was completely unrelated to the possible problem Marc 
mentioned. It was only about an undefined form.submitId - while I'm 
really interested why form.submitId is different from 
from.getSubmitWidget().getId(), but I had no look into it until now.

Joerg

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


Re: Reference to undeclared namespace prefix: 'xmldb'.

2004-04-21 Thread Joerg Heinicke
On 20.04.2004 15:24, Nina Juliadotter wrote:

Hi everyone,

I've finally managed to get Cocoon and Xindice to talk to eachother :) but I get
this evil error:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click
the Refresh button, or try again later.


Reference to undeclared namespace prefix: 'xmldb'. Error processing resource
'http://localhost:8080/cocoon/nina1/remote/restaurant[name='Bravissimo']'. Line 2,
Position 69
xmldb:results query=/restaurant[name='Bravissimo'] resources=1xmldb:result
docid=Bravissimorestaurant src:col=/db/restaurants src:key=Bravissimo
xmlns:src=http://xml.apache.org/xindice/Query;
^
So the query is successful, it finds what it should, but then it somehow gets
confused by the namespace xmldb?
There seems to be no namespace declaration for the xmldb prefix in the file.

Is this an IE bug (or feature...)?
Probably not. IE is quite good in pure XML parsing. Just have a look on 
the source of the document (right click and Quelltext anzeigen/View 
sourcecode).

Has anyone seen this before?
The error message is more or less common. The question is where it does 
come from. It might be just a serialization problem, i.e. you can 
transform the XML in the pipeline correctly. Or a real bug somewhere in 
the XMLDB components. Difficult to guess. Do the XMLDB samples work for you?

Joerg

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


Re: redirect problem with flowscript : No pipeline matched request: safe_user_area

2004-04-21 Thread Joerg Heinicke
On 21.04.2004 09:09, Jan Hoskens wrote:

As found on http://cocoon.apache.org/2.1/userdocs/flow/api.html

To send:  cocoon.sendPage(mypipeline, {} );

I think the function expects a biz data (bean)  to be delivered (thus two parameters, not one), so just give {}.
AFAIK JavaScript can live with less parameters than in the function 
declaration. Don't ask me how this feature is called. Of course it could 
be that the function does something with the biz data and fails if it is 
not passed at all.

Joerg

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


Re: Flow-Woody-Event-Woody... possible?

2004-04-21 Thread Christopher Oliver
Never create continuations in an event handler. If you do the 
continuation stack is only that of the event handler and the original 
script will _not_ resume when the event handler completes. In other 
words the call stack looks like this

Java (FlowInterpreter.callFunction(myFunction)) = JS (myFunction())  
= JS (form.showForm())  = Java (Form.process()) = JS (event handler code)

JavaScript continuations are not preserved when there are callbacks to 
Java (as in Form.process()).

Regards,

Chris

Marc Portier wrote:



Joerg Heinicke wrote:

On 20.04.2004 09:44, Steve Steinitz wrote:

We couldn't find that example but here is what we've done:

fd:submit id=remove action-command=remove 
   fd:labelRemove/fd:label
/fd:submit
and in our xsp
wt:widget id=remove/

and in the flow

if (remove.equals(form.submitId)) {
...
}
This condition was never true so I logged the value of
form.submitid -- it was 'undefined'.
Is there anything else we need to do?


I had the same problem yesterday too:
http://marc.theaimsgroup.com/?l=xml-cocoon-devm=108238973125352w=4
and fixed it by changing the order of the form widgets in the 
definition.

Furthermore my form.submitId was also null at the end, while 
form.getSubmitWidget().getId() returned the correct value.

Does this help?

they still would be faced with the fact that their event-handling 
tries to show another form (see the original message, your case was 
about validation, theirs is about event-handling that wants to call 
showForm)

I haven't tried it, but that's mainly cause I would never do that: 
IMHO it's not your form's event but the flow that should decide on 
next forms to show

I really don't know what the event-call on the continuations stack 
will do if you call showForm from inside the event-handling?
If someone does, I'm quite interested to hear about it.

regards,
-marc=
Joerg

-
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]