Merico Raffaele wrote:
Tobia Conforto wrote:
In Cocoon 2.1, Forms, how do I require the user to fill at least
one out of two (or more) fields?
For example, I might have the 'phone' and 'mobile' fields. I want
the user to fill at least one of them. Where should I put such a
validator?
I
Wolfgang Ruelfing wrote:
Hello,
you can put the general form validation code straight into the form
element
Thank you! This is exactly what I was looking for.
I had tried to do something like this on my own, but I made an
critical mistake: I set the validation error on the form itself,
Hello
In Cocoon 2.1, Forms, how do I require the user to fill at least one
out of two (or more) fields?
For example, I might have the 'phone' and 'mobile' fields. I want the
user to fill at least one of them, possibly both, and I don't want the
form to validate if they're both empty.
I wrote:
As soon as this happens, all pages being worked on at the same time
fail with such messages as:
SQLTransformer.Query: Failed to execute query [...]
com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: No
operations allowed after connection closed.
For the record, this
Hello
I have a big problem right now: my Cocoon MySql connections have
started to fail randomly, and when they do they bring down all pages
currently being generated.
My gut feeling is that it's a synchronization problem, some race
condition in Cocoon or in the Mysql connector. This is
On 17 Apr 2008, Derek Hohls wrote:
in this mail:
http://marc.info/?l=xml-cocoon-usersm=119996793507680w=2
you gave guidance on how to post-process escaped tags from a
database. However, when I implement it, it also strips out all the
sql:field tags as well, leaving just text inside the
[EMAIL PROTECTED] wrote:
FYI: Cocoon's redirects usually escape from the current processing.
The redirect is sent to the browser, but the request may not have
been processed. That does not appear to be what you need.
I don't quite understand what you mean here.
The Redirect from
Hi
In our (limited) experience, here are pros and cons of using a single
instance:
+ better use of server resources (RAM, CPU) this is quite important;
+ single global configuration (servlet container, Java VM, Apache or
other frontend...)
+ being forced to deploy global updates (to
Does anybody occasionally get a NullPointerException in the logs,
without a matching stacktrace?
Like this:
$date ERROR $url [sitemap.handled-errors] ErrorHandlerHelper: Sitemap:
error calling function $flowscript_func
at map:call - $sitemap_path
java.lang.NullPointerException
And
Victor Oomens wrote:
How can I return to another page after a user completes an ajax form?
Put a cocoon.redirectTo(...) after your showForm
See http://cocoon.apache.org/2.1/userdocs/flow/api.html
Tobia
-
To unsubscribe,
Alec Bickerton wrote:
I need the pipeline to return to the pipeline in the global sitemap
if nothing matches so that the default matchers will get hit.
You need to issue an internal redirect to the parent sitemap.
Assuming /default is a (fake) path that in the parent sitemap falls
through
Rainer Pruy wrote:
wildcard *matcher* is one of the most used components with cocoon,
I'd reckon. But what to do, when one needs to handle X/c/** and X/**
(excluding X/c/**) different? At least if the contained components
are not final (serialize, read)
Cocoon has no URI selector,
Lincoln Mitchell wrote:
I simple need to convert this inline javascript:
script type=text/javascript
function myFunction(){
xsl:choose
xsl:when test= $myParam='x'
alert('x')
/xsl:when
/xsl:choose
}
/script
…to an external javascript file like:
function myFunction(){
if
Nacho (Derecho.com) wrote:
* I have this URL http://localhost:8080/b/menores-de-edad;
* In sitemap i have a match like b/**
* I need to do replace - in {1} to spaces
* I do this using an input module inheriting from
AbstractJXPathModule, and using a xpath like expression,
Joerg Heinicke wrote:
Nacho (Derecho.com) wrote:
{request:translate('{1}','-','')}
the user might go to: http://localhost:8080/b/hello',nasty.java.call(),'world
It's JXPath, not JXTemplate. Does it evaluate Java calls at all?
If your example really works,
Derek Hohls wrote:
upgrading on the servers is, unfortunately, a much longer and time-
consuming process. I guess I was hoping it was not a bug.
Maybe it's not. Can you post a minimal example (simple form with
maybe 1 widget) and minimal sitemap that exhibits the problem?
Tobia
Derek Hohls wrote:
if I use MySQL Year column and Cocoon Forms integer type
together, then the forms validator complains that the widget is not
a date type.
This part I don't understand. Are you trying to apply some sort of
date widget or date formatting or date validation to the integer
[EMAIL PROTECTED] wrote:
The reload (Mozilla) or refresh (MSIE) command should force
browsers to ignore cache and retrieve the entire page from the
server. This is not always effective.
This reminds me, Shift+Reload forces the browser to refresh the entire
page, including all
alexandre mazouz wrote:
I have 2 web applcations A and B in localhost with the same adress
and ports (127.0.0.1:8080\) in 2 server jetty (J1 and J2).
i close A and launch B i have A.
The only way to have B is to clean the cache of the browser.
You might try to define an action that sets the
[EMAIL PROTECTED] wrote:
FILE: mvn.bat
== Fix Bad command or filename
REM if %HOME% == (set HOME=%HOMEDRIVE%%HOMEPATH%)
SET HOME=C:\apache\maven-2.0.8
== Fix Invalid switch
REM exit /B %ERROR_CODE%
I haven't used Windows much (fortunately) but I have the feeling this
script was written for
Carlos Martínez wrote:
I use the language from the page
http://cocoondev.org/xreporter/docs/core/exprlang.html
and it seems that work properly.
Yes, that link comes straight from the Most obscure and valuable
subfolder of my Cocoon bookmarks folder :-)
Tobia
Carlos Martínez wrote:
I don't know how the expression of the assert should be.
I believe this is the language used in fd:assert, at least in Cocoon
2.1:
http://cocoondev.org/xreporter/docs/core/exprlang.html
Don't ask me why...
Tobia
Peter Sparkes wrote:
The problem turned out to be in web.xml
I amended
param-nameform-encoding/param-name
param-valueISO-8859-1/param-value
To
param-nameform-encoding/param-name
param-valueUTF-8/param-value
and now everything is in UTF-8 and works properly
Edward Elhauge wrote:
I would like some guidance on what the best way is to attach an
'onkeypress' event handler to a Cocoon CForm Widget?
My use case is that I want to set a 'form dirty' flag as users type
data into my forms. I've been using the 'fd:on-value-changed'
handler for that
Jon Evans wrote:
How would I have made it work as a Configurable reader? I had this in
my sitemap:
map:read type=conceptimage mime-type=image/gif src={1}/
map:parameter name=defaultFilename
value=context://images/default.gif/
/map:read
I'm not sure what Configurable is supposed to do
stevecam wrote:
I have text that I am taking from a database that has formatting in
it, mainly as CR and LF characters. I want these to appear as br/
tags in my XHTML output. Is there a standard mechanism to achieve
this, hopefully simply by adding a standard transformer into my
pipeline?
Jon Evans wrote:
I've implemented a class which extends AbstractReader. It uses some
SOAP calls to pull some binary gif image data from a remote system.
My problem is that the resource is not cached if I throw a
MissingResourceException.
At the moment, products with no icons cause the remote
Hello
Hans-Christian Meier wrote:
I have noticed that the use of JXTemplate produces blank lines in the
HTML source code. For example the import of the macros to use CForms
(jx-macros.xml). In the HTML output the jx:import line is replaced
with many blank lines. Is there a way to prevent
Derek Hohls wrote:
I need to check that a valid web address (grammatically correct
anyway) is being entered in a form field. I am trying to check for
the address starting with a valid prefix - the regexp I am using is:
pattern=^(http|https|ftp)://
The regexp validator anchors the pattern by
dperez wrote:
Jeroen Reijn wrote:
You can find that on the website:
http://cocoon.apache.org/798_1_1.html
Arrrgh, another web page I don't know how to reach through the menus!
???
It's the first page shown when you click on Getting involved /
Committer's and contributor's section.
Tobia
[EMAIL PROTECTED] wrote:
Within a Document a stylesheet reference was set as:
Document
...
stylesheetmyStyleA/stylesheet
...
/Document
How could I apply a certain stylesheet ?
This seems to be another example of content-based pipeline, which is not
directly supported in Cocoon.
Severin Gehwolf wrote:
select a particular XML file with the best-matching language extension
according to users Accept-Language HTTP headers.
This is usually achieved in Cocoon using the LocaleAction:
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/acting/LocaleAction.html
Other kinds
Sébastien Geindre wrote:
i need to make a conditional treatment in my site
generator
transformer A
if condition on xml from transformerA -- transformer B1
else -- transformer B2
transformer C
serializer
the condition is computed on xml data and global variables
What you ask for is not
Peter Flynn wrote:
I think the last time I asked, the recommendation was to make httpd
proxy Tomcat [...] Does anyone have any specific Dos or Donts about
this platform or configuration?
My personal experience with Tomcat for use with Cocoon 2.1 has been
terrible, both on RHEL and Debian.
We
Derek Hohls wrote:
on this server it did not seem to have any effect, so I was wondering
if there was some other setting I had overlooked.
There is a setting in cocoon.xconf that might be related:
/cocoon/flow-interpreters/component-instance/reload-scripts
Tobia
Derek Hohls wrote:
I already have a setting looking like this:
reload-scriptstrue/reload-scripts
Is this what you meant?
Yes. Well I guess you can try and use the ?cocoon-reload=true request
parameter, which is faster than restarting the whole container.
You can enable it in
Another thing: sometimes I run into missing reloads caused by
differences in the system time on servers or workstations.
That is, a newer file is not reloaded if Cocoon doesn't see it
as newer, based on the system clock.
Depending on your setup, you might want to investigate that.
Tobia
I think I stumbled upon a bug in the XSLTC transfomer regarding the
document() function. Here is a minimal example:
--- sitemap fragment: --
match pattern=test
generate src=foo.xml/
transform src=foo-bar.xsl type=xsltc/
serialize type=xml/
/match
---
Ard Schrijvers wrote:
I'm wondering if there is a way to pre-compile XSLT into Java
classes, using the command-line xsltc compiler, put those classes
somewhere in Cocoon's classpath and use them as transformers.
Actually, since Cocoon can already run the cached compiled
stylesheets
Hello,
I'm wondering if there is a way to pre-compile XSLT into Java classes,
using the command-line xsltc compiler, put those classes somewhere in
Cocoon's classpath and use them as transformers.
Tobia
-
To unsubscribe,
Ard Schrijvers wrote:
I'm wondering if there is a way to pre-compile XSLT into Java
classes, using the command-line xsltc compiler, put those classes
somewhere in Cocoon's classpath and use them as transformers.
your xsl stylesheets are compiled only once in cocoon and then held in
memory
I wrote:
I'm saving the input module into a global flowscript variable, because
it's supposed to be request-independent.
Nevermind that. I realized I must acquire the input module from the
selector every time, lest I end up with IllegalStateExceptions.
Tobia
Marcus Wejderot wrote:
I have tried all kinds of things in @test. What I really want to do
is to check if the variable ${userid} is empty. How to do this?
I usually write: test=${empty(userid)}
empty() is native JX language for testing against most kinds of empty,
such as (IIRC) 0, false,
Joerg Heinicke wrote:
Tobia Conforto wrote:
But I cannot pass null to my own input module in place of the third
parameter (Map objectModel) because I use that objectModel in my
class
Another workaround is to create a map in your flowscript with the
necessary data.
Yes, I had arrived
Luiz Antonio Falaguasta Barbosa wrote:
using Cocoon includes putting images into the pure XML files
(saved by MS Office 2003) too, right?
If (and only if) those file formats really are valid XML, there's
nothing in them that Cocoon can't handle.
You will have to figure out how exactly the
Hello
I'm following the advice Grzegorz gave me about coding my custom
URL-rewriting logic into an input module and using that input module
with the LinkRewriterTransformer, and wherever else I need it.
My input module works well in the sitemap, but I don't seem to be able
to call it from
Kamal Bhatt wrote:
I would like to create a tab based interface where the user can freely
navigate between tabs, without the screen validating and without every
field being on the form (only the fields on the tab). Additionally, I
would like to validate the form completely validates at the
[EMAIL PROTECTED] wrote:
XSLT Extensions assist formatting. Data collection belongs in the XML
generation phase. Using XSLT Extensions to generate data is a very
bad practice. What are the requirements?
Let me explain better.
I need to translate URIs in a XML document, in the middle of a
Peter Sparkes wrote:
I have to use a Smart host, smtp.bytemark.co.uk. Please is it
possible to use a Smart Host with sendmail and if so how.
You didn't say whether you're using the Sendmail Transformer, the
Sendmail Action, or another thing entirely.
Here is how you can configure for the
Grzegorz Kossakowski wrote:
I'm not sure if it's going to fit in your case but I would suggest to
take a look at Cocoon's quite powerful LinkRewriterTransformer[1].
Very interesting, thanks.
It seems to fit my case perfectly!
Basically all you would need to do is to implement your own input
Hi
I'm rewriting some functionality into Java XSLT extensions, for
performance reasons.
For now I'm just writing a Java class, copying it to WEB-INF/classes and
calling its static methods from XSLT as such:
xsl:value-of select=myclass:myMethod($whatever)
Joerg Heinicke wrote:
Derek Hohls wrote:
We are trying to install Cocoon 2.1.8 under SunOS (version 5.7).
The vanilla version of Cocoon installs and runs fine. However, as
soon as we try and add a mySQL driver to the lib directory, and
alter the cocoon.xconf file, the Cocoon startup
Derek Hohls wrote:
In the meantime, rather than hacking around with all sorts of
combinations, we are trying to locate and use another server
(running Linux, which seems not to have these sorts of problems)
The server I was having that problem on was running Linux, so I believe
the issue to be
Luiz Antonio Falaguasta Barbosa wrote:
Is it possible to use Cocoon to change keys by values into .DOC and
.PPT file types? Does anybody could give me some example?
I don't have first-hand experience with it, but here are a few ideas.
If the file is not too big, you can load it into memory as
Lincoln Mitchell wrote:
I am building many website and placing them in folders in webbapp
1st I to this locally:
http://localhost:/Asite.com.au/
I then move it to the webapp on the server to go live:
http://www.Asite.com.au/
The problem is that when I move to webapp on the server the
Andrew Stevens wrote:
Tobia Conforto writes:
I cannot change this data source component, therefore I need a
transformer to examine every text node in the stream, split it at the
fake br tags, substitute them with xhtml:br/ elements, and
replace every escaped HTML entity with the relevant
Sébastien Geindre wrote:
I try to do this in a xslt stylesheet :
xsl:variable name=top select=if(($type='cb') and
($typeName!='wims:statusweatherproduct')) then 'max_fub' else 'top'/
if (...) then ... else ... is not an XPath 1.0 expression!
You have a few options.
One is to use standard
I'm currently experiencing an annoying problem where Cocoon does not log
exceptions generated by sub-pipelines called through CInclude.
Here is my setup: a pipeline (already nested in other calls) generates a
CInclude include element and passes it through the CInclude transformer.
The transformer
Dear all,
While trying to optimize execution and load time for a Cocoon web
application, I noticed that AJAX forms require a 173K dojo.js file.
This file is only transferred once per session or less, and then cached,
but I'd like to optimize the first load time among other things.
Therefore I
Peter Sparkes wrote:
If I serialize it as html the output is :
textarea .../textarea
However when I serialize as XHTML 1.0 Strict the xhtml output is:
textarea .../
What you say is true and also happens with div/, script/, and a
few other elements. My advice is to avoid the xhtml
Hello
I have a data source from which I get SAX text nodes into my pipeline
that contain escaped HTML entities and br tags. In Java syntax:
Lorem ipsum mdash; dolor sit amet. br Consectetuer
or, in XML syntax:
Lorem ipsum amp;mdash; dolor sit amet. lt;brgt; Consectetuer
As you can see, the
Never mind, I solved it by hand
I wrote a Python script that takes a list of HTML entities and generates
a huge tree of switch() { case: switch () { case: switch () { case: ...
The generated Java code goes through a char[] in a single pass and when
it recognizes an entity it pushes the
Jason Johnston wrote:
So digging around in the Rhino API I discovered the WrapFactory
class[1], which is what Rhino uses to wrap Java objects returned from
methods so that they can be scripted. By default it wraps
java.lang.String objects just like it wraps any other Java object,
giving your
Hello
Am I the only Cocoon user who is extremely annoyed by the fact that Java
strings are not Javascript strings are not Java strings?
Depending on the context, in your Flowscript you have to use either:
str.startsWith(...)
str.length()
str.codePointAt(n)
and the rest
Jason Johnston wrote:
Rhino also makes the JavaScript methods available to Java strings if
the java.lang.String class doesn't already define them. For example:
js javaString.match(/a.*/)
Thanks, that clears part of the confusion to me.
It also explains why sometimes I could get away with
Derek Hohls wrote:
I have been frustrated before by the fact that it only nests down to
one level; its still not clear to me why further levels of nesting
cannot be supported?
Can you explain this problem and maybe provide an example?
I think I've nested queries up to 4 levels deep without
Lincoln Mitchell wrote:
but doesn't indent my html in the xsl file
indentyes/indent does not actually indent the code, it just adds
newlines here and there.
I personally prefer to leave all output unindented (one long line) and
just *view* it indented when I want to. This way I don't need to
Johnson wrote:
Is it possible to set up expired time for the generated pages of cocoon
Yes. Take a look at pipeline configuration, here:
http://cocoon.apache.org/2.1/userdocs/concepts/caching.html
and in the root sitemap.xmap from the Cocoon distribution, lines 370–440.
You might also find the
Johannes Textor wrote:
this is probably because you have not included com.mysql.jdbc.Driver
(not sure if this is the exact class name) in web.xml.
Or maybe he didn't copy the actual driver class.
For example, mine is:
WEB-INF/lib/mysql-connector-java-5.0.6-bin.jar
Tobia
Lincoln Mitchell wrote:
img src=http://www.absnetwork.com.au/abs_consult-106079.jpg;
img src=http://static-r.arttoday.com/thb/thb13/JU/5366_C00347/
4559477.thb.jpg?dlsmC0034765
only the 1st image appears, but if I save the HTML cocoon generates
and open that html file independent of cocoon
Lincoln Mitchell wrote:
You said: What you probably can do is to make the request to your
Cocoon server and let Cocoon grab it for you with a reader from the
remote server. I am not familiar with the terms you are using so am a
bit confused.
He meant: «Generate an HTML page that will make the
Boissé Denis wrote:
Usually ungreedy matcher are in a form (.*?) and suppose to match
something like temp/hello/ or temp/hi/ but not matching something like
temp/hello/dir/ (that's what happen to me)
As Alfred said, you cannot use the 'greediness' of quantifiers to
control the matching of an
Mark Lundquist wrote:
I've got some CForms widgets of datatype base=long/, so I expect
that the widget value should be a java.lang.Long, right?
Widget's getValue() returns an Object, so that would make sense, yes.
it seems like every reference to the widget value gets converted to a
JS
warrell harries wrote:
From the xml snippet it appears that you have missed out the sql:
prefix
Actually his namespaces seem to be ok, so I'm not sure what the problem
might be... maybe the SQLTransformer code is not prefix-independent?
The source XML: sql-select-themes.xml
?xml
christoph wrote:
I get following error:
line 6: Can't find method
org.apache.cocoon.components.flow.util.PipelineUtil.processToDOM(string).
Maybe because it's processToDOM(String uri, Object viewData)
See http://cocoon.apache.org/2.1/apidocs/index.html
Or maybe it's something else...
Does anybody know how to disable url encoding in Cocoon on Jetty?
For a certain web application I want sessions to be handled only through
cookies (and not to work when cookies aren't available.)
Is it a Cocoon or a Jetty configuration parameter?
Tobia
Let me explain the problem a bit more.
I'm still curious about the issue, although I've found a workaround.
According to the docs Cocoon will not rewrite URLs, unless you use the
encodeURL transformer or call the equivalent flowscript function.
What I'm seeing is that the Location header of a
Nevermind, something was (is) creating spurious sessions where it
shouldn't. It will take a while to figure out what misguided component
or piece of flowscript is doing so.
In the meantime I have put this in a couple places to make sure there is
no session before calling redirectTo():
if
Schmitz, Jeffrey A wrote:
First, is there anywhere to see specifics about the compilation error
encountered? All it tells me is Compilation produced 1 syntax error
on line 1.
Check your cocoon.log file (it's in WEB-INF/logs/ if you didn't change
its location; you can change its location in
Hi all
Is there an established way, recommended way, ad-hoc component or sample
about manually controlling the client-side cache?
I'm serving the css for some pages as a unified, space-stripped, virtual
css file. This speeds up page loading a bit, especially when the
original css files are many
Vaduvoiu Tiberiu wrote:
in my parent sitemap I have
map:match pattern=*/*/*/*
map:mount check-reload=yes uri-prefix={1}/{2}/{3}
src={3}/sitemap.xmap /
/map:match
and in my sub-sitemap I have:
map:match pattern=home.htm
map:aggregate element=root label=source
map:part
blogger wrote:
I am pipelining a b2evolution blog through cocoon, and I am having a
problem maintaining the sessions and cookies.
I suggest you fire a packet sniffer (my favorites are tcpick in a
terminal, followed by Wireshark in a GUI or on Windows) to capture both
the traffic between your
Let's recap. The following two statements are equivalent and are both
prefix-independent:
xsl:apply-templates select=sq2:[EMAIL PROTECTED] = 'program-view']/
xsl:apply-templates select=*[local-name() = 'rowset'
and namespace-uri() = 'http://apache.org/cocoon/SQL/2.0'
and @name =
Here's an interesting question: is one of the following more efficient
than the other?
xsl:value-of select=//wh:thing xmlns:wh=http://whatever/
xsl:value-of select=//*[local-name() = 'thing' and namespace-uri() =
'http://whatever']/
I'm talking about runtime efficiency, not compilation speed
Dev at weitling wrote:
in an on-action-javascript in my forms definition I want to get access
to the bizData provided with the showForm()-function.
In the end I want to be able to change the entries in a selection list
on an ActionEvent.
It might be just personal taste, but I tend to write
Christian Sengstock wrote:
What happens is: the ID is not changing anymore! It's the same for all
users requesting the form with a given browser.
We restarted tomcat .. still the same problem
We cleared the work dir .. still the same problem
We restared the machine .. the form is working
robf wrote:
At some point in an xsp I want to include the resultset from calling
another xsp, just like it is possible in xslt's
This should work:
xsp:page language=java
xmlns:xsp=http://apache.org/xsp;
xmlns:util=http://apache.org/xsp/util/2.0;
.
.
.
util:get-source
Joerg Heinicke wrote:
Tobia Conforto wrote:
throw new Packages.org.apache.cocoon.ResourceNotFoundException()
produces the following Java stacktrace:
org.mozilla.javascript.JavaScriptException
Caused by: org.mozilla.javascript.WrappedException
Caused
Joerg Heinicke wrote:
Tobia wrote:
cocoon.sendStatus(404)
cocoon.response.setStatus(404)
cocoon.response.sendError(404)
throw new Packages.java.io.FileNotFoundException()
throw new Packages.org.apache.cocoon.ResourceNotFoundException()
The problem with the (send|set)(Status|Error)
Rob Frohwein wrote:
- query1.xmlusing SqlTransformer on table1
- cleansql.xsl rename sql:dbfield
- process1.xsl reorganize
- query2.xslquery different table
- cleansql.xsl rename sql:dbfield
- process2.xsl reorganize
...
It works, but is this the right approach?
I'm also
[EMAIL PROTECTED] wrote:
When the XQuery generator is called for in a map:part, it is
impossible to pass the request parameters:
map:aggregate element=root
!-- get XML representation of request --
map:part src=cocoon:/requestAsXML/
!-- get XQuery result --
Hi
I need to parse a POST parameter as XML and use it in the rest of my
pipeline. I thought of doing something like:
generate type=request/
transform src=extract-parameter.xsl/
transform type=string-to-xml/
...
But I don't know how to begin writing the
Jeroen Reijn wrote:
Hi Tobia,
you might want to have a look at the Stream generator.
Awesome!
Thanks
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
93 matches
Mail list logo