The Dreaded Request failed - status=500 on AJAX in CForms

2007-02-07 Thread Stewart, Gary
Hi people, 

I'm using Cocoon 2.1.8 (which is obviously using a different AJAX version from 
the current one) and I've discovered that there is some way to get it so it 
constantly fails updating the AJAX stuff for all users across all pipelines. 
I'm not sure how it happened. I've seen it a couple of times during dev when I 
was updating the sitemap. A restart would fix the problem. However I only 
recently saw it on the production system. Has anyone seen anything like this?

It looks like, to go into more detail, that the results are processed as HTML 
rather than XML (if you display the returned error you see that this is the 
case) therefore presumably the bu:update part is failing as it is wrapped in 
HTML. It looks likely that AJAX Request is and causing the selector to evaluate 
false as my form processing pipelines have something like 

map:select type=ajax-request
 map:when test=true
  map:serialize type=xml/
 /map:when
 map:otherwise
   map:call resource=session-process /
   map:call resource=default-transform /
   map:serialize type=html/
 /map:otherwise
/map:select

I'd try swapping the logic (so it tests for false and defaults to returning 
XML) but as I can't recreate the bug I don't know if that'd work.

I'll go check the patches for later versions of Cocoon though I know we 
switched to DOJO so we might not be using the same logic at all (I had a couple 
of problems with DOJO in 2.1.9 so I left upgrading, might be worth trying again 
with 2.1.10 though).

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]



setMaxInactiveInterval and CForms

2007-01-10 Thread Stewart, Gary
Hi there,

When a user authenticates on the system I'm designing I increase the max 
inactive interval by using cocoon.session.setMaxInactiveInterval which works 
fine. However I noticed that the continuations for CForms will still expire 
before this time has run out (leading to an exception). Is there a way of 
increasing the keep alive time on the CForms continuations (or continuations in 
general) to make it the same as the maxInactiveInterval?

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]



RE: displaying html in a cforms field

2006-11-16 Thread Stewart, Gary


 -Original Message-
 From: Fuad Efendi [mailto:[EMAIL PROTECTED]
 
 I think this is called cross site scripting attack and should be
 prevented...
 output field is simply a read-only widget with a value, and browsers
 should not interpret any pure HTML values of such objects...

It's not the browser though. It is the server that is updating that and 
displaying what it likes. If it chooses to inject information from another site 
then it was done at the developers choice.

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: IE AJAX Focus Stuff (maybe a little off topic)

2006-11-13 Thread Stewart, Gary

I wrote:
 I was thinking of maybe adding a function to set the focus of 
 the element after the update has been done but this might 
 present problems in itself. Just looking for any ideas or 
 suggestions but I shall take a look at the source (obviously 
 if I find a solution I will post the fix to save someone else 
 the headache). Looks like the 2.1.9 source I should be 
 looking at is ajax/cocoon.js though as my production system 
 is currently using 2.1.8 (I was having some problems with 
 DOJO) then  I think I should be looking at 
 org/apache/cocoon/ajax/resources/js/cocoon-ajax.js from the 
 ajax block.

Replying to my own messages. Sad ;).

Anyway I played around with the cocoon-ajax.js script and couldn't fix the 
problem. The main thing I was trying was to do was update 
cocoon.ajax.BrowserUpdater.prototype.processResponse = function(doc, request) 
so it got the active element at the beginning of the it's changes and attempted 
to set the focus back to the same element after the changes had been performed. 
Didn't seem to work though, unless you put a debug alert() message before every 
focus where it worked fine (grrr...).

Ah well I might remove the offending on-change handlers for now and try and fix 
it again later (maybe we'll have migrated to a real browser, I can live in 
hope).

If you do have any suggestions I'd love to hear then though.

Gary

PS: Should this be on the developers list?

*
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: IE AJAX Focus Stuff (maybe a little off topic)

2006-11-13 Thread Stewart, Gary


 -Original Message-
 From: David Legg [mailto:[EMAIL PROTECTED]

 I can't stand seeing a grown man cry ;-)  So I thought I'd 
 chip in with some ideas.

I'm 13. Just kidding.

I've got somewhere though. IE is messed up, but we knew that anyway. The three 
laws of IE6 AJAX in CForms appear to be:

1, If you are altering the DOM of the form item you are about to tab into then 
it will trigger the bug. 
2, If you are moving to a selection list from an item that has just been 
altered then you trigger the bug.
3, If IE can cause you pain and grief then it will do.

I tested this without using tabindex (which worked ok). Really just selection 
lists as well though they may be others but dull old input fields work fine.

Right I feel I've lost enough sanity on that for now but I might see if I can 
find anything of note later.

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]



IE AJAX Focus Stuff (maybe a little off topic)

2006-11-10 Thread Stewart, Gary
There has been a bug that has been plaguing me for a while. Though given it 
only happens in IE (6.0) and not Firefox I'm not really sure it is the fault of 
the Cocoon AJAX library but I thought I'd see if any of you have suggestions on 
scripts that I could play with to maybe fix it.

If you are tabbing through a form with AJAX enabled and the system performs an 
AJAX request which updates the DOM tree then IE seems to lose the current place 
of the tabs and sticks you back at the top of the page. It isn't so bad for me 
(as I'm just the developer) but infuriating for my users who fill in the forms 
all the time. I'd love to be able to say try using a browser that actually 
works but unfortunately I'm not in that position. 

You can see it in the samples/blocks/forms/do-multipage.flow example (in 
2.1.9). On the second page when are asked to Please enter a number (will 
automatically set a correct value below if needed):  if you enter a number and 
hit Tab in IE then it will jump back to the top where you'll have to tab back 
through to the item again. This is, presumably, because it updates the tree and 
IE gets confused and loses it's position. 

I was thinking of maybe adding a function to set the focus of the element after 
the update has been done but this might present problems in itself. Just 
looking for any ideas or suggestions but I shall take a look at the source 
(obviously if I find a solution I will post the fix to save someone else the 
headache). Looks like the 2.1.9 source I should be looking at is ajax/cocoon.js 
though as my production system is currently using 2.1.8 (I was having some 
problems with DOJO) then  I think I should be looking at 
org/apache/cocoon/ajax/resources/js/cocoon-ajax.js from the ajax block.

Thanks for any help you might be able to provide for this issue,

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: Dynamic HTML Values and AJAX

2006-10-26 Thread Stewart, Gary


 -Original Message-
 From: Jason Johnston [mailto:[EMAIL PROTECTED]
 Sent: 26 October 2006 01:34
 To: users@cocoon.apache.org
 Subject: Re: Dynamic HTML Values and AJAX
 
 You should be able to get the AJAX framework to update that 
 snippet of 
 code by wrapping it in a bu:replace element when it needs to 
 be updated. 
   Anything that is wrapped in a bu:replace will be sent to 
 the browser 


Thanks, that worked a treat. Now that I know how to make the AJAX system do 
updates like that I might well play around with other things I can do :D. I 
shall look at that helper class soon though to make sure I'm not making 
needless updates on that output.

Thanks again your help it's been marvellous.

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]



Dynamic HTML Values and AJAX

2006-10-25 Thread Stewart, Gary
Hi people,

I'm using CForms in Cocoon 2.1.8 and I've run into a bit of a problem (I sort 
of posted about this a while back so a bit of this is a repost). I was trying 
to feed some HTML into the form to provide output to the user. To do this I use 
a pipe that generates XML output and then I try and serialize that into the 
document using the JX template stuff that looks like:

jx:set var=xhtmlString 
value='${widget.getChild(op-list).getValue()}' /
jx:out 
value=${Packages.org.apache.cocoon.xml.StringXMLizable(xhtmlString)} /

Unfortunately that doesn't dynamically regenerate when the op-list value has 
changed (if anyone knows how to make it do that under AJAX that would be the 
best solution by far).

If I go for a straight up output then I just get the divpMoo/p/div tags 
displayed. I looked at serialization on the forms-field-styling.xsl, as XSLT 
1.0, and therefore Xalan (AFAIK) doesn't have a serialize function I looked at 
creating one that looked something like this:

!--This is an extension script to add serialization as a function--
  xalan:component prefix=custom functions=serialize
xalan:script lang=javascript
  function serialize(xmlString)
  {
var output = Packages.org.apache.cocoon.xml.StringXMLizable(xmlString);
if(output == null)
{ output = Oh Dear; }
return output;
  }
/xalan:script
  /xalan:component

but that just generated NULL values so I gave up on that.

I even wrote a stylesheet to convert the HTML into Text and just use output but 
IE seems to ignore the line breaks on the pre / tag when you insert it in 
dynamically (damn IE).

Any ideas on how to get the AJAX stuff to display this dynamically when the 
value changes?

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]



RE: how to call an internal-only pipeline by cocoon cron

2006-10-25 Thread Stewart, Gary


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: 24 October 2006 13:31
 To: users@cocoon.apache.org
 Subject: Re: how to call an internal-only pipeline by cocoon cron
 
 
 yes

That will be it then. The system won't be in an authenticated session so the 
redirect rule will apply (to take the user to the login page). If you remove 
the authentication from it (presumably you can put this in any external facing 
pipeline but the internal one can only be called by other pipelines anyway) 
then it should work as expected.

Hope this helps,

Gary

More of the message:
   
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 
 I've some job need to do by scheduler, the job is protected by
 internal-only pipeline, When the cron do pipeline call, it's 
 will direct
 to login form.
 
 
 
 Do you use an authentication handler as well as it being 
 internal only? 
 
 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]
 
   
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

*
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: Where do I put my own classes?

2006-09-20 Thread Stewart, Gary

 -Original Message-
 From: Dev at weitling [mailto:[EMAIL PROTECTED]

 Where do I put my own classes in the directory structure (mounted
 sitemap somewhere in my user directory) and/or do I have to declare a
 classpath in my sitemap?

You should just be able to put them in WEB-INF/classes (followed by any 
com/bleh/moo directory struture you have for the package) and that should work 
ok. You should then be able to call them (for example in flowscript) using 
Packages.com.bleh.moo.Foo or whatever. If you have them in a jar you can stick 
them in the WEB-INF/lib folder.

You'll need to restart Cocoon to make them visable though.

Hope this helps,

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]



HTML in CForms Output

2006-09-20 Thread Stewart, Gary
I was looking at creating HTML in CForms output. I found this post:

http://www.mail-archive.com/users@cocoon.apache.org/msg35125.html

which outlines doing:

jx:set var=xhtmlString 
value='${widget.getChild(myOutputWidget).getValue()}' /
jx:out value=${Packages.org.apache.cocoon.xml.StringXMLizable(xhtmlString)} 
/

(I'm using 2.1.8 still, hence the old method).

However that doesn't seem to be dynamically recreated with the AJAX stuff. Is 
there a way of refreshing that if the content has changed using AJAX (or even 
forcing a complete page reload?)?

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]



RE: [poll] Java 5 as minimum requirement for Cocoon 2.2

2006-08-14 Thread Stewart, Gary


 -Original Message-
 From: Reinhard Poetz [mailto:[EMAIL PROTECTED]
 
 On [EMAIL PROTECTED] we have started to dicuss whether we can make 
 Java 5 becoming the 
 minimum requirement for Cocoon 2.2. 

I've been using Java 5 for deployment for some time so it isn't a problem for 
me. There will probably be people still using older versions of Java who will 
want to migrate but if you can reduce development time or speed up the system 
by using features in Java 5 then I say go for it.

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: Performance and Sitemaps

2006-08-14 Thread Stewart, Gary


 -Original Message-
 From: Ard Schrijvers [mailto:[EMAIL PROTECTED]
 Sent: 26 July 2006 15:56
 To: users@cocoon.apache.org
 Subject: RE: Performance and Sitemaps

 Anyway, I don't use profilers to find my slow pieces. I do it 
 from a 10.000 kilometers above view. In my opinion this works 
 best. I record a page request with solex (eclipse plugin) and 
 count the time it takes to get the file again (after a clear 
 cache or before, just what you want to measuer). Then, I 
 start commenting sitemap parts. Within 30 sec you will find 
 any performance flaw, guaranteed.
 
 Then, I don't know what you consider slow. Are you talking 
 about slow the first time, slow when cached? Slow = 2 sec or 200 ms? 

Sorry about it taking me so long to reply. I thought I'd experiment more first 
to come back with a better answer and then I seemed to have saved this as a 
draft.

Slow was about 7 seconds for a response. It turns out that it was a very poor 
query on the database (that then returns XML to the cocoon pipe). I've worked 
on speeding that up and the rest of the pipe seems fine. Thanks for the advice; 
I replaced the generator on the sitemap with a dummy one and it showed the flaw 
from a 10.000 kilometer view :D.

Thanks again,

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]



Profiling

2006-07-21 Thread Stewart, Gary
Hi there,

I am attempting to use profiler in a couple of pipelines but I seem to be 
getting very strange results where each part of the pipeline seems very fast 
but the overall execution is slow. It seemes, from observation, that the slower 
value is the more accurate but I was hoping profiler could inform me where the 
bottleneck is. For example I get something like:

event  (2 results, total time: 30549, average time: 15274)  0   1
1   file src=cocoon:/sql-log-event/14   0   0   0
2   xslt-saxon src=stylesheets/event.xsl109 109 109
3   xsltc src=context://stylesheets/system/session_adder.xsl0   
0   0
4   session 0   0   0
5   encodeURL   0   0   0
6   xslt-saxon src=context://stylesheets/base.xsl   63  63  63
7   xhtml   0   0   0
8   TOTAL   15274   15329   15220

As you can see the pipelines don't come close to the total time. What does the 
total time include that isn't part of the profiler and is there a way to see 
this?

Thanks and sorry about the question I'm still new to the profiler,

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: Widget javascript validation problem

2006-07-05 Thread Stewart, Gary

-Original Message-
From: Andrew Madu [mailto:[EMAIL PROTECTED]
Sent: 05 July 2006 12:31
To: users@cocoon.apache.org
Subject: Widget javascript validation problem


 fd:validation
fd:javascript
var success = true;
var creditCardType = widget.lookupWidget(credit);
var accountNumberLength = widget.lookupWidget(account_no); 

try {
//Determine the credit card type and then check that the length 
//of the credit card number is correct for the credit card type.

if ( creditCardType.value == visa amp;amp; 
 accountNumberLength.value.length != 16) {
account_no.setValidationError(new 
 Packages.org.apache.cocoon.forms.validation.ValidationError(Visa card 
 numbers are 16 chracters in length. Please re-enter the number., false)); 
success = false;
}

} catch (e) {

}

return success;
/fd:javascript
 /fd:validation
 
I had lots of problems when I first started with validation. Thankfully you 
don't seem to be doing any of those. At a glance it looks like 
*account_no.setValidationError* is wrong as you declared the variable as 
*accountNumberLength*. This is why I like strict type checking.

Hope that helps,

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: Widget javascript validation problem

2006-07-05 Thread Stewart, Gary

-Original Message-
From: Andrew Madu [mailto:[EMAIL PROTECTED]
Sent: 05 July 2006 13:13
To: users@cocoon.apache.org
Subject: Re: Widget javascript validation problem

 The other problem I am having is with the widget datatype definition for 
 account_no:
 
 fd:datatype base=integer 

I've never used that datatype. However I tend to use regex to do any validation 
checking something like:

if(!/^[0-9]{16}$/.test(account_no.value)) { //This is invalid } 

will match an account number with no spaces.

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]



SOAP and CInclude

2006-06-30 Thread Stewart, Gary
I've just upgraded to Cocoon 2.1.9 so I can use CInclude POST (which had a bug 
in 2.1.8). I was trying it out with a SOAP service and I couldn't get it to 
work. I was wondering if anyone has and if so if they could show me a working 
example. I tried:

data xmlns:cinclude=http://apache.org/cocoon/include/1.0;
cinclude:includexml ignoreErrors=false

cinclude:srchttp://services.xmethods.net:80/soap/servlet/rpcrouter/cinclude:src
  cinclude:configuration
cinclude:parameter
  cinclude:namemethod/cinclude:name
  cinclude:valuePOST/cinclude:value
/cinclude:parameter
  /cinclude:configuration
  cinclude:parameters
cinclude:parameter
  cinclude:nameitem/cinclude:name
  cinclude:value
soapenv:Envelope  
  xmlns:q0=http://www.w3.org/1999/XMLSchema;  
  
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;  
  xmlns:xsd=http://www.w3.org/2001/XMLSchema;  
  
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;  
  soapenv:Body  
  ns0:getTemp  
  
soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;  
  xmlns:ns0=urn:xmethods-Temperature  
90210
  /ns0:getTemp  
  /soapenv:Body  
 /soapenv:Envelope
  /cinclude:value
/cinclude:parameter
  /cinclude:parameters
/cinclude:includexml
  /data

which should just return the temperature of that ZIP code (the one that most 
people use as an example :D). It returns a 500 code though. 

I was also thinking it might be the mime type... is there a way to change that 
in CInclude?

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]



RE: Lepido is dead - now what?

2006-06-23 Thread Stewart, Gary


 
 My question is: what all the people using lepido are doing now?

Still using it :D. I'm certainly using the sitemap navigation which I find very 
handy for navigating my large sitemaps. Still it is a shame that it is no 
longer in production. I guess it might have been killed because there was no 
active development and it never got to a final release.

I expect someone could pick up the project and they might well bring it back.

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: CForms: Inserting Text Into HTMLArea

2006-05-29 Thread Stewart, Gary


 Reijn wrote: 

 Hi Gary,
 
 just to be sure. Reading your email you have a javascript 
 that adds text to the HTMLArea object?
 HTMLArea puts the text back to the textarea on the onUnload 
 event. Are you sure it get's saved back to the textarea?

Ah, I think this helps. I want to use another widget on the CForm to add text 
to an HTMLArea Widget (a widget that then uses the HTML type for its 
display). Getting that widget's value returns null but that is probably because 
that's the text (which hasn't been assigned) and not the actual HTMLArea object 
which will populate that value on the onUnload event. I'm still not sure how I 
can actually call functions on the HTMLArea object though.

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]



RE: Accessing Global Variables As External File

2006-05-26 Thread Stewart, Gary


 -Original Message-
 From: Andrew Stevens [mailto:[EMAIL PROTECTED]

 The way we do it is by defining an external entity in the 
 internal DTD i.e.
 
 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE map:sitemap [
   !ENTITY environment SYSTEM environment.ent
 ]
 map:sitemap xmlns:map=http://apache.org/cocoon/sitemap/1.0;
 ...
   map:pipelines
 map:component-configurations
   global-variables
 environment;
   /global-variables
 /map:component-configurations
 ...

Thanks for that. Works well. Thanks to Ralph Goers for the parameters 
suggestion too. I might look into that later but I'm still on 2.1.8 at the 
moment.

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]



CForms: Inserting Text Into HTMLArea

2006-05-26 Thread Stewart, Gary
I'm using the HTMLArea component of CForms (though I did upgrade it to Xinha 
but most of the calls seem the same). I've got a javascript in my CForms 
definition file that attempts to add text to that component. However I've had 
difficulty accessing the object. I did a cocoon log output on the lookup and 
that returns null. Is there a way to access the HTML component from the 
definition?

I tried something like:

var cc = event.source.parent.lookupWidget(cctext).getValue();
cocoon.log.info(Lets check out the object:  + cc);

but that returns null (after entering text to try and check that the object was 
created.

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]



Accessing Global Variables As External File

2006-05-24 Thread Stewart, Gary
Hi there,

I was wondering if it was possible to access the global-variables component 
configuration as an external file? Basically there are some values in there 
that change depending on which server I was using so I figured I could separate 
that into a static XML file and not include that file in version control so I 
could customise it depending on the server.

Is there a way to do this or should I use something other than global-variables 
to access these values in the sitemaps.

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]



RE: overriding CForms xslt and css?

2006-04-06 Thread Stewart, Gary

 I need to provide a different look for the tabs (using images).
  
 What is the right way to override some but not all of the CForms xslt and css 
 files?
 There is this {$resources-uri} everywhere. 

I copied the files from source, changed them, and then pointed to the changed 
files though this does mean that you'll need to do a diff everytime you upgrade 
cocoon and reintegrate your changes. You might need to change files that you 
aren't changing a match in just to insure that it's imports and includes are 
pointing to your files.

Hope this helps,

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.
*


If you work for NHS Lothian and wish to have help to stop smoking, support is 
available by contacting [EMAIL PROTECTED] or 0131 537 9494  - internal 49494.  
For anyone else living/working in Lothian, please contact 0800 848484 for your 
nearest NHS stop smoking service.


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



CForms: Updating all instances of a widget in a repeater

2006-04-06 Thread Stewart, Gary
Hi there,

I've got a repeater with two selection lists in; staffmemeber and staffrole. 
Upon a value being changed on the staffrole or another selection list outside 
of the repeater (department) the list of staff members change. I'm using an 
on-changed-value on the staffrole repeater and that works fine but I'd also 
like to change the list if the department is updated for all the rows in the 
repeater using javascript on the department's on-changed-value event. 

I tried something like:

var staff_list = event.source.parent.lookupWidget(stafflist).getChildren();
var staff_item = null;
var staff_member = null;
var staff_role = null;
while(staff_list.hasNext())
{
staff_item = staff_list.next();
  staff_member = staff_item.lookupWidget(staffmember);
  staff_role = staff_item.lookupWidget(staffrole);
//set a new staff member event
}

but I got stuck at the first hurdle. That is that it looks like stafflist 
doesn't actually have any children (hasNext() returns false). It certainly 
should have. If it does have children is it then possible to do the latter 
logic of getting each child and looking up the components I want to get the 
value of and change the values of? 

Is there a different or better way that I should do this?

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.
*


If you work for NHS Lothian and wish to have help to stop smoking, support is 
available by contacting [EMAIL PROTECTED] or 0131 537 9494  - internal 49494.  
For anyone else living/working in Lothian, please contact 0800 848484 for your 
nearest NHS stop smoking service.


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



RE: CForms: Updating all instances of a widget in a repeater

2006-04-06 Thread Stewart, Gary


 -Original Message-
 From: Jason Johnston [mailto:[EMAIL PROTECTED]
 Sent: 06 April 2006 14:00
 To: users@cocoon.apache.org
 Subject: Re: CForms: Updating all instances of a widget in a repeater

 I think to get the rows from a Repeater you have to use 
 getRow() rather
 than getChildren(). I think I've used something like this in the past:
 
 var repeater = ...
 for(var i=0; irepeater.getSize(); i++) {
   var row = repeater.getRow(i);
   ...
 }
 
 Hope that works
 
 Actually the Javadoc for Repeater doesn't even look like it has a
 getChildren() method, so I'm not sure why you weren't getting 
 an error.

You are quite right; it isn't part of the class. I'll double check the code is 
actually being called :D. Thanks for pointing me to the correct documentation. 
For some reason I was looking at the container class.

Thanks again,

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.
*


If you work for NHS Lothian and wish to have help to stop smoking, support is 
available by contacting [EMAIL PROTECTED] or 0131 537 9494  - internal 49494.  
For anyone else living/working in Lothian, please contact 0800 848484 for your 
nearest NHS stop smoking service.


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



RE: Re: Using a Proxy Server for Cocoon

2006-03-30 Thread Stewart, Gary


 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] Behalf Of Edwin Kapauni

 http://wiki.apache.org/cocoon/ApacheModProxy
 

Unless I'm misreading this (which I might be) it was probably me not explaining 
my question very well. That's for getting cocoon to act as a proxy or to find 
out the original address from a proxy. I'm trying to get cocoon to use a proxy 
server for non-local addresses so that if I'm requesting a resource foo.com 
cocoon will use the proxy server settings to then go through another proxy to 
get the resource. However that got me thinking that the settings I'm looking 
for might be at the server container level so I'll have a quick look at the 
Tomcat documents as well.

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.
*


If you work for NHS Lothian and wish to have help to stop smoking, support is 
available by contacting [EMAIL PROTECTED] or 0131 537 9494  - internal 49494.  
For anyone else living/working in Lothian, please contact 0800 848484 for your 
nearest NHS stop smoking service.


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



RE: Using a Proxy Server for Cocoon

2006-03-30 Thread Stewart, Gary


 -Original Message-
 From: Bertrand Delacretaz [mailto:[EMAIL PROTECTED]
 
 Search for proxy in  http://wiki.apache.org/cocoon/FAQs - proxies  
 are defined at the JVM level and are by default global.
 
 -Bertrand

Thank you,

I feel really bad that I asked this since it is in the FAQ and everything.

Sorry to bother people with these sorts of questions! I'm adding to my every 
expanding collection of Look at the Wiki, Look at the mailing list archives.

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.
*


If you work for NHS Lothian and wish to have help to stop smoking, support is 
available by contacting [EMAIL PROTECTED] or 0131 537 9494  - internal 49494.  
For anyone else living/working in Lothian, please contact 0800 848484 for your 
nearest NHS stop smoking service.


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



User Roles and Flowscript

2006-03-29 Thread Stewart, Gary
Hi there,

I've been working with the authentication resource for a while but I figured it 
was about time I implemented per role pipelines (that is some pipelines can 
only be accessed by some roles). I am using flowscript to do this but I don't 
seem to be able to get it to work. The pipeline performs an authentication 
check (I figure this would give me the session information; or is there 
something I need to do in the flow?). In the Javascript I quite simply have:

function administratorOnlyPage()
{
 var resource = cocoon.parameters.resourceRequest;
 if(cocoon.request.isUserInRole(Administrator))
 {
  cocoon.sendPage(resource);
 }
 else
 {
  cocoon.sendPage(access-denied);
 }
}

I've checked the user role on another page and it appears that they are an 
administrator. Is there something I'm missing? Do I need to define the roles?

Sorry to bother and 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.
*


If you work for NHS Lothian and wish to have help to stop smoking, support is 
available by contacting [EMAIL PROTECTED] or 0131 537 9494  - internal 49494.  
For anyone else living/working in Lothian, please contact 0800 848484 for your 
nearest NHS stop smoking service.


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



Using a Proxy Server for Cocoon

2006-03-28 Thread Stewart, Gary
Hi there,

Is there any way to specify a proxy server for cocoon to use on either a 
per-pipeline basis, for a sitemap, or for the whole of the cocoon deployment? 
Also is there a way of setting up an exclusion list on it if there is one as 
there are some resources (such as the database) that shouldn't go through the 
proxy. 

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.
*


If you work for NHS Lothian and wish to have help to stop smoking, support is 
available by contacting [EMAIL PROTECTED] or 0131 537 9494  - internal 49494.  
For anyone else living/working in Lothian, please contact 0800 848484 for your 
nearest NHS stop smoking service.


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



CForms: Invisible Labels

2006-03-23 Thread Stewart, Gary
I've got a form with an invisible item and a radio box that will set it to 
active. It works fine except the label doesn't appear. The definition looks 
something like:

(On the widget):

fd:on-create
 fd:javascript

this.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.INVISIBLE);
 /fd:javascript
/fd:on-create

(On the activating widget):

fd:on-value-changed
 fd:javascript
  var dod_widget = event.source.parent.lookupWidget(dod);
  if(event.source.value == 0)
{
 
dod_widget.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.INVISIBLE);
 dod_widget.value = ;
}
   else //1
{
 
dod_widget.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE);
}
 /fd:javascript
/fd:on-value-changed

Is there anything else I need to set to make the label appear? I've tried using 
the column group layout for it and just manually having the label in the form 
but neither seem to show the label when the widget becomes active.

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.
*


If you work for NHS Lothian and wish to have help to stop smoking, support is 
available by contacting [EMAIL PROTECTED] or 0131 537 9494  - internal 49494.  
For anyone else living/working in Lothian, please contact 0800 848484 for your 
nearest NHS stop smoking service.


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



Setting Default Focus in CForms

2006-03-10 Thread Stewart, Gary
Hi there,

I've been trying to set the first form item to have focus when the form is 
loaded. Normally it would just be a case of setting 

document.form.name.focus();

but the issue seems to be that CForms uses a name:input format for the id. Is 
there a way of setting the focus in CForms? I looked at the Widget API but 
couldn't see a function to set the widget as focus (unless I'm missing 
something... which is quite possible).

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]



Tab Order in CForms

2006-03-09 Thread Stewart, Gary
Does anyone know how to change the tab order in CForms? I was hoping to change 
it so it ignores the links (such as the help and error links) until it gets all 
the way to the bottom of the form. I'd assume you'd do this by altering the tab 
order in the final HTML form. I figure I should be looking at the forms styling 
to do this. I can't actually find where forms-page-styling.xsl and 
forms-advanced-field-styling.xsl are located though. Any clue as to where to 
look and maybe how to implement this?

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]



RE: Tab Order in CForms

2006-03-09 Thread Stewart, Gary

 I havn't ever tried it, but you can add the tabindex 
 attribute just like
 any other, for example:
 
 ft:widget id=abc
   fi:styling tabindex=5/
 /ft:widget
 
 The stylesheets simply copy over all the attributes they don't
 understand to the target input element.
 
 There's also a shorter way of writing this, if you don't have 
 any nested
 elements in fi:styling (which is usually the case):
 
 ft:widget id=abc fi:tabindex=5/

That looks like a good way to go about it; thanks. Gave it a go and it looks 
like it is working fine on the forms (though it might be a little tedious to 
change when I make changes to forms I might create a stylesheet to automate 
adding the attributes to widgets; I can post it when I've done it and if anyone 
else is interested. 

However I'd still like to know how I can get access to the cocoon resource link 
since I was also looking at changing the HTMLArea (and possibly replacing it 
with Xinha). 

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]



AbstractTextSerializer Namespace Attributes

2006-02-23 Thread Stewart, Gary
Hi there,

I've been looking through my log file and found that I get:

WARN  (2006-02-23) 10:46.48:012 [sitemap.serializer.xhtml] (/protected/start) 
http-8080-Processor24/AbstractTextSerializer: Cannot know if transformer needs 
namespaces attributes - assuming NO.
org.xml.sax.SAXException: Saxon requires an XML parser that reports the QName 
of each element

Which still loads the page anyway (hence it wasn't really a concern). So 
presumably I want the AbstractTextSerializer.NamespaceAsAttributes enabled. I'm 
not quite sure how to go about it though. Was it wrong to use the XHTML 
serializer (should I be going for XML instead) and is there something I should 
set to force this to be true. 

Also would it be worth me sticking the solution to this (if there is one) in 
the Wiki's Saxon entry?

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]



Duplicate Results on CForms Repeat Bind

2006-02-22 Thread Stewart, Gary
Hi there,

I've trying to bind a form to an XML document for both loading and saving and 
it works ok loading a document (including the one initial repeat item) but if 
you create more items in the repeat and use on-insert-row insert-node to create 
the XML I get the extra result plus a repeat of the initial node so something 
like:

Identifiers

  Identifier
   Value0123456789/Value 
   TypeTest/Type 
  /Identifier

  Identifier
  Value0123456789/Value 
  TypeTest/Type 
  /Identifier

  Identifier
   Value123456789A/Value 
   TypeDiff/Type 
  /Identifier

/Identifiers

Do you know any reason why the repeat nodes might be occurring? I've looked at 
the form2 example (which has a good example of repeats and binding) and I 
noticed that a unique id for each row is generated (though it isn't declared 
unique in any way as far as I can see) I also noticed that it includes 
row-state=new though again this doesn't seem to do anything in particular. 

I'm a bit stuck as to what I might be doing wrong and any pointers would be 
appreciated.

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]



RE: Duplicate Results on CForms Repeat Bind

2006-02-22 Thread Stewart, Gary


 -Original Message-
 By me:

 I'm a bit stuck as to what I might be doing wrong and any 
 pointers would be appreciated.

Oops!

Sorry about this question I noticed the log file saying that it had rows to 
delete but no action specified. I needed 

fb:on-delete-row
 fb:delete-node /
/fb:on-delete-row

for it to work.

Sorry again for filling the mailing list with rubbish,

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]



CForms: Global JavaScript Variables?

2006-02-21 Thread Stewart, Gary
Hi there and sorry to bother with *yet another CForms question*,

I have a CForms form that loads an external XML document in the on-create 
function of the form (though the data doesn't change and therefore could be 
loaded in the flowscript instead if this would be easier). I parse it into a 
DOM tree and everything works ok. However I was wondering if there was a way of 
sharing this to a few objects in the form? So I could use a particular node in 
an output, say. Is there a way of making Javascript objects global in the 
context of a form? 

Also I noticed the Output document mentions using field and states to achieve 
the same effect. Does anyone know if there any intention on deprecating the 
output element later (ie should I just switch to using field instead)?

Thanks again,

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: CForms: HTMLArea Documentation

2006-02-21 Thread Stewart, Gary


 Is this something that needs to be taken up on the dev list?

Not sure. If you think it would I can forward it up there (though I'd have to 
join the dev list).

 I am sure that htmlArea was the best choice at the time 
 that the CForms package was first put together, but some
 technology just does not last [unlike Cocoon, of course!] 
 and continued reliance on (or seeming support for) a module
 that is no longer actively maintained is not to Cocoon's
 advantage...

I agree that using an unsupported and undeveloped unit for Cocoon wouldn't be 
in the best interest of the users. Presumably as Xinha was based on htmlArea3 
then the port would be pretty simple.

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: CForms: Global JavaScript Variables?

2006-02-21 Thread Stewart, Gary

Philippe Gassmann ([EMAIL PROTECTED]) wrote:
 Have you try to set your object as a form attribute ( 
 form.setAttribute(myDOM,doc); ) ?
 
 You can then get you object by form.getAttribute(myDOM);

Thanks for that. It works. Though for the achieve and additional notes you 
can't do that on the on-create as the form's on-create is called after the 
widgets (which I didn't know until now). So you could design a singleton class 
to get around that or, the solution I took, to set the widgets values using 
event.source.lookupWidget(dob).setValue(domValueForNode) in the Form 
on-create however I'm still using the suggested solution above for dynamic data 
loading.

Thanks again,

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]



CForms: Redirecting when in AJAX

2006-02-20 Thread Stewart, Gary
Hello,

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?

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]



CForms: HTMLArea Documentation

2006-02-20 Thread Stewart, Gary
Hi there,

Does anyone know where to get the documentation for the HTML Area? I'm trying 
to add some of the toolbar menus to the config but my guesses have been wrong. 
The htmlarea example states it can be found at 
http://www.htmlarea.com/htmlarea_2/documentation.html but that site doesn't 
appear to house the documentation anymore. I tried Google's Cache but that has 
been replaced as well. Does anyone have the documents?

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]



Using External Javascript in CForms

2006-02-13 Thread Stewart, Gary
Hi there,

I've been trying to use an external Javascript in an on-value-changed in a form 
field def.

I have something like:

fd:on-value-changed
  fd:javascript
 event.source.value = formatDate(event.source.value);
  /fd:javascript
/fd:on-value-changed

and I include the function in one of the stylesheets. I get a 
org.mozilla.javascript.EcmaError: formatDate is not defined; which is quite 
right as it hasn't been defined at that stage. I looked through the samples but 
I couldn't see anywhere were an external Javascript was included for this 
purpose. Can this be done or should all scripting be performed inline?

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]



More Questions About Date

2006-02-10 Thread Stewart, Gary
Sorry to bother people I'm still getting up to speed with all this.

I've been trying to use CForms with an existing application and I've got stuck 
in a few areas. I'm using the XML Binding stuff to create an XML document to be 
sent to another server. The first problem I've come across is that I have an 
XML document returned in the format

blah
 bar xsi:nil=true /
 fooHi there!/foo
/blah

where bar is a date type. As it is empty it fails. Is there a way to make the 
binding accept an empty value? 

I then figured I can strip any nil values from the document leaving just the 
filled in values left. However the output document looks something like:

blah
 fooHi there!/foo
 barFri Jan 12 00:03:00 GMT 1973/bar
/blah

with the two issues that:

1, The bound bar now is the last element which might be a problem with some 
schema. This wouldn't be a problem if there is a solution to the problem above 
though.
2, The format is a long datetime format. Is there a way of just getting the ISO 
date type? At the moment I'm just returning the DOM tree as it is in JXPath so 
presumably that's the Java localisation. I looked at the datatype documentation 
but couldn't find a way of doing a conversion on the submit.

Help with any of these would be most appreciated.

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



CForms Null Date

2006-02-09 Thread Stewart, Gary
Hi there,

Do anyone know how to allow a CForms date type to accept an empty date from an 
XML bind. At the moment it is throwing:

java.lang.RuntimeException: Incorrect value type for dob (expected class 
java.util.Date, got class java.lang.String).

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]



RE: Error using org.xml.sax.InputSource

2006-02-08 Thread Stewart, Gary

 You should search and remove any older xml-apis.jar somewhere in the 
 class path.

Thanks for that. It was that and an old version of the Rhino Continuations lib 
that were causing the problem.

Thanks again,

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]



CForms and Authenticate

2006-02-08 Thread Stewart, Gary
Hello,

Still working my way around CForms and ways that I can use it with my existing 
Cocoon system. I'm getting back an XML document (using jx:out 
value=#{bean}/) and, in one form, this is the user's name and password. 

The problem is that if I use this in conjunction with the authenticate resource 
so I have a pipeline that looks something like:

map:match pattern=authenticate
 map:generate type=jx src=return-dom.jx/
 map:transform src=stylesheets/authentication2.xsl /
 map:serialize type=xml /
/map:match

map:match pattern=do-login
 !-- try to login --
 map:act type=auth-login
   map:parameter name=handler value=authhandler/
   map:redirect-to uri=start/
 /map:act
 map:redirect-to uri=failed/
/map:match

I assume that the bound XML is not available in the authenticate pipe. Should I 
continue with this or just separate the parameters for username and password 
(after all there are only two) and pass them in or use flowscript to do the 
authentication?

Thanks for you help,

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]



Error using org.xml.sax.InputSource

2006-02-07 Thread Stewart, Gary
Hi there,

I've been looking at using CForms and been trying out some of the demos along 
with my own forms. I've gotten stuck at binding; I've found a few of the demos 
and my own code was throwing the exception:

java.lang.NoSuchMethodError: 
org.mozilla.javascript.JavaScriptException.sourceName()Ljava/lang/String;

org.apache.cocoon.components.flow.javascript.LocationTrackingDebugger$1.getLocation(LocationTrackingDebugger.java:61)

org.apache.cocoon.util.location.LocationUtils.getLocation(LocationUtils.java:264)

org.apache.cocoon.util.location.LocationUtils.getLocation(LocationUtils.java:203)
...

which is at the Tomcat level but I assume that is because I'm not handling the 
exception. I've isolated it down to the bindings.js script in the forms sample 
and it looks like 

var is = new Packages.org.xml.sax.InputSource(source.getInputStream());

is the offending line. source appears to be not null and I'm having 
difficulty seeing where it is going wrong. Sorry I can't be more specific but I 
really don't have much idea of the issues that could be causing this.

I'm using Java 1.5.0_04 and Cocoon 2.1.8 (though there might be a few 
non-standard libs; so I tried a standard build and got the same issues).

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



RE: CInclude POST (again)

2005-12-07 Thread Stewart, Gary

 -Original Message-
 From: Boisvert, Éric [mailto:[EMAIL PROTECTED]
 Sent: 06 December 2005 17:17
 To: users@cocoon.apache.org
 Subject: RE: CInclude POST (again)
 
 
 find attached the source code, keep in mind that's I'm not a 
 expert Java
 programmer (I'm more on C# and Delphi).  The component has 
 been designed to
 send POST query to WFS (Web Feature Service) servers, which 
 are typically
 small XML Query versus potentially very large XML Responses.  
 This is an
 issue in the code because the incoming XML is converted to a 
 DOM and then to
 a string (to fix a bug in DOM serializer that 'forgets' to serialize
 namespaces), I must manually reinsert the namespaces 
 declaration in the
 incoming XML.  
 
 I've added a bit more comments in the source code, for your either
 documentation or comic relief.
 
 I assume you are familliar with compiling+installing Cocoon 
 components.
 Also, this component is provided as is, and I cannot garantee it will
 function properly under stress conditions.. So if your business it the
 control Airplane traffic or controling a nuclear reactor, I 
 suggest you have
 this checked by a REAL java programmer. :P

If it was in nuclear reactors the Java licence agreement explicitly states:

You acknowledge that Licensed Software is not designed or intended for use in 
the design, construction, operation or maintenance of any nuclear facility.

so nuclear facility programmers shouldn't be using Java let alone cocoon or 
custom transformers on top of that :D.

I think XMLUtils.serializeNode might have been changed in 2.1.8 (the revision 
date shows 2005-11-13) and serialization now seems to return the namespace 
because at first I was getting a namespace already declared exception so I 
changed GetXmlRequest to the very short; I could give you a diff but it's only 
this function that I've changed:

private String GetXmlRequest(Document doc)
{
 String req = this.DomToString(doc); 
 return req; 
}

Thank you very much for the code; it has proved very useful. I'd still be 
interested in confirming whether CInclude's patch has been put through 
correctly but this certainly seems like the best route (it stops me needing to 
create CInclude wrappers as well).

Thanks again for the code and the help,

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]



CInclude POST (again)

2005-12-06 Thread Stewart, Gary
Hi there, 

I'm still having problems getting CInclude POST in 2.1.8 to work. I've been 
investigating a little further though and thought the extra information might 
help. I've checked the server and the response works ok to another system doing 
the post so it isn't at that end. My cinclude post looks something like:

?xml version=1.0 encoding=ISO-8859-1?
data xmlns:cinclude=http://apache.org/cocoon/include/1.0;
 cinclude:includexml
  cinclude:srchttp://10.231.27.63/sql_templates//cinclude:src
  cinclude:configuration
   cinclude:parameter
cinclude:namemethod/cinclude:name
cinclude:valuePOST/cinclude:value
   /cinclude:parameter
  /cinclude:configuration
  cinclude:parameters
   cinclude:parameter
cinclude:nametext/cinclude:name
cinclude:value
 ROOT xmlns:sql=urn:schemas-microsoft-com:xml-sql
   sql:xpath-query xmlns:lsa=blah 
mapping-schema=schema/address.xsd(/lsa:Address)/sql:xpath-query
 /ROOT
/cinclude:value
   /cinclude:parameter
  /cinclude:parameters
/cinclude:includexml
/data

If I set ignoreError to true I get an empty root node (data/) if it is false 
I get:

org.xml.sax.SAXParseException: The markup in the document following the root 
element must be well-formed.
context:/http://10.231.27.63/sql_templates/ - 1:37

which I'm not sure why it is appearing as a root node if it is. 

I've tried it on a fresh build and my slightly modified build (I thought that 
might be what was causing issues but it doesn't seem to be the case). 

If anyone has seen 2.1.8 CInclude POST work that would be useful and any 
suggestions on this problem would be greatly appreciated.

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]



RE: CInclude POST (again)

2005-12-06 Thread Stewart, Gary


 -Original Message-
 From: Boisvert, Éric [mailto:[EMAIL PROTECTED]
 Sent: 06 December 2005 15:39
 To: users@cocoon.apache.org
 Subject: RE: CInclude POST (again)
 
 
 Gary.. I gave up with this cinclude/POST business  - lost an 
 incredible
 amount of time trying to make it work to no avail. I created my own
 component (as a transformer).  it throws whaterver xml it 
 gets to a remote
 server and send the response down the pipeline.
 
 are you (or anyone) interested ?
 
 Eric


I was just talking to someone about doing the same thing :). I'd be very 
interested in a transformer that did a POST. I've replied to the thread rather 
than you just to note interests on the mailing list (if there was enough 
interests for it to be added to the build).

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]



Using CInclude POST

2005-11-30 Thread Stewart, Gary
Hi there,

I upgraded to Cocoon 2.1.8 to use the CInclude POST feature (there was 
previously a bug in it http://issues.apache.org/jira/browse/COCOON-1365 but I 
checked the source and it looks like the patch has been put in). I've been 
having some difficulty trying to use it or even check to see if the component 
is definitely working as expected. At first I tried sending a document like 
this:

?xml version=1.0 encoding=ISO-8859-1?
cinclude:includexml xmlns:cinclude=http://apache.org/cocoon/include/1.0;
 cinclude:srchttp://10.8.21.63:80/lsa_sql_templates/cinclude:src
 cinclude:configuration
  cinclude:parameter
   cinclude:namemethod/cinclude:name
   cinclude:valuePOST/cinclude:value
  /cinclude:parameter
 /cinclude:configuration
 cinclude:parameters
  cinclude:parameter
   cinclude:nametext/cinclude:name
   cinclude:value
lsa:LSA xmlns:lsa=blahXML Document Goodness/lsa:LSA
   /cinclude:value
  /cinclude:parameter
 /cinclude:parameters
/cinclude:includexml

as per the Wiki StreamGenerator docs 
(http://wiki.apache.org/cocoon/StreamGenerator?highlight=%28Cinclude%29). I got 
a org.xml.sax.SAXParseException: The markup in the document following the root 
element must be well-formed.
context:/http://10.8.21.63:80/lsa_sql_templates - 1:37 though the document 
before the CInclude looks fine. It might be something to do with the resultant 
output but I couldn't seem to get that from the pipe. I also quickly tried 
creating a sanity check by creating the pipeline:

map:match pattern=hollaback
 map:generate type=stream /
 map:serialize type=xml /
/map:match

and calling it (not using the cocoon protocol) though I'm not sure if this 
would work or not (I got a 500 error for that; so probably not). 

I also noticed that the CInclude document for 2.1 
(http://cocoon.apache.org/2.1/userdocs/cinclude-transformer.html) shows that 
the POST request is wrapped in a root node. I tried that for both of my tests 
but that didn't help either. 

Any ideas on this would be appreciated; even just the confirmation that POST is 
working correctly for anyone would be a good start.

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]



Using Values in the XML in the Pipeline

2005-11-15 Thread Stewart, Gary
This is probably a long shot as I haven't seen it mentioned in the 
documentation. Is it possible to get a particular value from a transform, say, 
and use that in the pipeline. Say I've got a transform that results in the XML:

returnid
 primary_guid86E72DC6-7EDA-47F2-8A3F-D2DA7E121EF0/primary_guid
/returnid

I want to use that to either generate a using a resource call or to do a 
redirect (I've taken into account the redirection in pipelines note; 
http://cocoon.apache.org/2.1/userdocs/concepts/redirection.html). Passing that 
value to fetch a document (I can do that in a cinclude though so it can be part 
of the same pipe without starting a new generate). 

It would be handy to do but my current solution would be to transform to a 
cinclude based on that returned document structure and carry on the pipeline to 
get the intended end result.

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]



Processing variables in the sitemap

2005-11-09 Thread Stewart, Gary
Hi there,

A bit of a strange question here. I have a chunk in my sitemap that does 
something like:

map:call resource=xforms-processing
 map:parameter name=form-name value=edit-form/{../id} /
/map:call 

and then in the resource it basically calls cocoon:/{form-name} along with some 
other processing. The problem appears to be that {../id} is handed to the call 
which doesn't have id as part of it's scope. Is there some way to assess the 
variable before handing it over as a parameter so basically the resource would 
see edit-form/1231.

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]



RE: Processing variables in the sitemap

2005-11-09 Thread Stewart, Gary



 Well, it _should_ be resolved before actually calling the resource... 
 Double-checked the code...

Thanks for that. I needed a sanity check :). It was to do with not actually 
calling the request action.

Thanks again,

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: Betr.: Parameter passing and the authentication framework

2005-10-28 Thread Stewart, Gary

 I think this should be
  map:generate src=cocoon:/get-event/{../id} /

Doh. Yep; the works a charm. Thanks for that :).

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]



Parameter passing and the authentication framework

2005-10-27 Thread Stewart, Gary
Hi there,

I'm having some problems with parameter passing (or expression matching) and 
the authentication framework. Basically I have something that needs to be 
authenticated but also needs the request parameters available to the match so I 
have something like

map:match pattern=event
 map:act type=request
  map:parameter name=parameters value=true/
  map:act type=auth-protect
   map:parameter name=handler value=authhandler/
   map:generate src=cocoon:/get-event/{id} /
   ...

or using map:match pattern=event/* would be fine as well. The auth-protect 
handler seems to gobble this up though; is there anyway of continuing this data 
into the rest of the pipe?

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]



POST Generator or Transformer?

2005-10-19 Thread Stewart, Gary
Had a look at the documentation but I'm probably just missing something. Is 
there a transformer (or generator) that can send a HTTP Post request to another 
server and generate a stream from the returned results? I figured that since 
that's kinda the format that SOAP requests are made there probably is but I 
couldn't find it.

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]



Using SQLXML within Cocoon

2005-09-29 Thread Stewart, Gary
Hi people,

I was looking at SQLXML which is a tool for MS SQL Server and using that within 
Cocoon. Effectively what I'm looking to do is have an SQL transformer that 
sends the query to the database (the query might be an XPath query rather than 
a straight up SQL query) and receive XML data back directly from the database 
rather than the usual rows returned. I was wondering if anyone had an 
experience of trying this before and if so what components they used to achieve 
it.

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]



Taking a serialized document and performing further actions on it

2005-09-08 Thread Stewart, Gary
Is there a way in Cocoon to take another pipeline and use it as a generator in 
the current pipeline. So there is a pipeline like:

pipeline match=working
  generate src=file.xml /
  transform src=blah.xsl /
  ...
  serialize type=xhtml /
/pipeline

pipeline match=more-working
  generate src=working /
  transform src=keep-transforming.xsl /
  serialize type=xhtml /
/pipeline

Effectively allowing you to perform additional actions on the first pipeline 
(depending on a switch statement for example). I could write the first pipeline 
in a different way it is just the way I'm trying to do at the moment should 
produce a cleaner sitemap.

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]



Calling a block of transformations

2005-08-25 Thread Stewart, Gary
Hi there,

Another newbie question I'm afraid. There are a set of transformers that I 
commonly call from a lot of pipelines and that I'd like to be able to possibly 
change at a later date. I was wondering if there is a way to call another 
pipeline inside a generate - serialize block so something like:

map:match pattern=edit-data
map:generate src=data-chunk.xml/
!--Do some specific transform--
  map:transform type=session/
!--Call another pipeline to do some more transformations--
??
map:serialize /
/map:match

map:pipeline internal-only=true
map:match pattern=xforms-convert
map:transform src=context://stylesheets/system.xsl /
map:transform src=context://stylesheets/base.xsl
map:transform src=context://stylesheets/client/xforms.xsl/
  /map:match
/map:pipeline

I don't think redirect is what I'm looking for but I don't think I want to use 
the aggregation (as there no generator) as seen in 
http://cocoon.apache.org/2.1/snippet/snippet-internal-pipeline.html.

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]



RE: Calling a block of transformations

2005-08-25 Thread Stewart, Gary


 -Original Message-
 From: Reinhard Poetz [mailto:[EMAIL PROTECTED]

 You can combine a group of sitemap components within a 
 resource and call them 
 from other pipelines by map:call resource=[name]/.
 Please note that this will be deprecated in Cocoon 2.2 in 
 favour of the concept 
 of virtual sitemap components.

Thank you kindly for yours and Chris Marasti-Gerorg's replies. I'll keep the 
virtual sitemap concept in mind for when 2.2 is released and I'm porting to it. 
I have seen resources previously used in this manor so why it didn't click I'm 
not sure. 

Thanks again,

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: Calling a block of transformations

2005-08-25 Thread Stewart, Gary


 -Original Message-
 From: JD Daniels [mailto:[EMAIL PROTECTED]

 I depend heavily on resources... Is there any form of virtual sitemap 
 components in the 2.1.x tree?

Reinhard did say deprecated so I imagine you'll still be able to use resources 
for some versions to come.

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]



Passing Session XML as Parameter

2005-07-29 Thread Stewart, Gary
Hi there,

Sorry to keep bugging people with really simple queries I just couldn't find 
the appropriate documentation on dealing with sessions from the site map (quite 
a bit on dealing with it in XSP). 

Anyway I've got a session authenticated and the user data is all there in an 
XML format. I'll now looking for a way of passing that XML as a parameter to an 
XSLT file (using a transformer) from the sitemap.

Anyone have any ideas on how to do this?

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]



Accepting XML Post

2005-07-27 Thread Stewart, Gary
Hi people,

I'm currently working on some XForms data client side (I also plan on 
integrating Chicoon later) and posting to a Cocoon server. The post works ok (I 
tested on a basic xsp request diagnosis page).

The content type seems correct (application/xml) and the post seems to work ok. 
Now I've actually got stuck trying to access the body of the post (hopefully an 
XML document) and then processing that within the cocoon framework. So I 
suppose my question is how do you access the body of a POST request?

Thanks in advance,

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]



Using a transformer on XSP

2005-07-20 Thread Stewart, Gary
Hi there,

I'm relatively new to using Cocoon and was still getting to grips with some of 
the basics. 

I have an XSP page and it does its thing just fine. However what I was hoping 
to do was to take the generated HTML from the XSP page and then pass it to 
another transformer to further process the HTML before serializing to the 
client. Is there a transformer that takes an XSP input and generates the code 
for the client or is it only performed during serialization?

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]



RE: Using a transformer on XSP

2005-07-20 Thread Stewart, Gary


 -Original Message-
 From: Olivier NOUGUIER [mailto:[EMAIL PROTECTED]
 Sent: 20 July 2005 16:05
 
 hi
 AFAIK, if XSP output is html you should *only* serialize, 
 transformation are xml === xml (not sure?)

Sorry it is XHTML and I've basically got a template that I'm trying to use for 
the whole site which is in an XSLT document. After any other actions have been 
taken on generating something for XHTML I then basically run that code into the 
XSLT and it wraps the XHTML document to put it into the template format. 
Obviously it doesn't work on an XSP document but it should work on a (XHTML) 
output of that document. 

I'm pretty sure all transformations are xml to xml as they input SAX events and 
output SAX events (leading to the conclusion that you can only put XML 
documents in a transform).

Thanks and sorry I didn't explain very well,

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.
**