Craig Christophersen | 1 Jul 2004 01:01
Favicon

Re: DHTML drop down menus in Frames

I just read that thread and I don't believe it is the same.
Reason being that the menus drop down into the lower frame fine without the
lower frame being a pipeline.
Using IE6 SP1. I will mess with the IFrame idea.

I will mess with the IFrame idea.
----- Original Message ----- 
From: "Joerg Heinicke" <joerg.heinicke <at> gmx.de>
To: <users <at> cocoon.apache.org>
Sent: Wednesday, June 30, 2004 4:15 PM
Subject: Re: DHTML drop down menus in Frames

> On 30.06.2004 17:57, Craig Christophersen wrote:
>
> > I am having trouble getting DHTML drop down menus to display across
> > frames. My toolbar frame is html. However I would like it to drop
> > down into the frame beneath, which is a frame with a pipeline as its
> > source. My code works fine without cocoon & the xsl.  I have the xsl
> > such that I am not getting errors, and can make it work fine if I do
> > not use frames and put the toolbar and menus in the same xsl. Anyone
> > out there with an answer to this?
>
> Isn't it the same problem as for
> http://marc.theaimsgroup.com/?t=108422064700006&r=1&w=4 ?
>
> Joerg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
> For additional commands, e-mail: users-help <at> cocoon.apache.org
(Continue reading)

David Crossley | 1 Jul 2004 01:25
Picon
Favicon

Re: Validating XML in pipeline?

Joerg Heinicke wrote:
> Joel McConaughy wrote:
> 
> > I would like to validate XML within the pipeline before running it 
> > through a set of stylesheets.  Rooting thru the archives, I found a 
> > couple of references to a custom action that validates against a DTD.  
> > Is there a way to do this without resorting to an action?  This seems 
> > like it should be simple to do -- I'm hoping Ive overlooked something.  
> 
> There is a ValidationTransformer at 
> http://wiki.cocoondev.org/Wiki.jsp?page=ValidationTransformer. It seems 
> it has not yet ben committed to CVS.

There is a recent thread in the dev archives about this.
It couldn't be committed due to various issues. Other
solutions were proposed, but no further action yet.

--

-- 
David Crossley
David Crossley | 1 Jul 2004 01:33
Picon
Favicon

Re: Where i can find summary of question and answer to help other's not ask the same question

andi wrote:
> Dear all,
> 
> Where i can find the question and the answer that has been posted by any one
> else.
> If there's not plase to see the summaries question and answer the same
> question will be
> asked again and again.
> 
> I Hope my idea will be useful

It is a useful idea. There are many questions that continually
get asked. Anyone is free to add to our Frequently Asked Questions:
http://cocoon.apache.org/2.1/faq/
If you cannot manage a patch in the xdocs format, then just send
a text version to this mailing list. However, as Derek said, it is
very difficult to keep those FAQs and the Wiki pages up-to-date.
If each person in this big community helped just a tiny bit, then
we would get there - the power of community.

--

-- 
David Crossley
Joe Latty | 1 Jul 2004 02:59
Picon

Tomcat and logkit conflicts

I am constantly having conflicts within tomcat, all seem to center around the logging (logkit?).

 

My cocoon application is contained in its own context (all jars in WEB-INF/lib) nothing in tomcat shared or common. However if I add my application the manager app in tomcat does not work with the following error (or variations on this).  

 

org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: java.lang.ClassNotFoundException: org.apache.commons.logging.impl.LogKitLogger

 

but my cocoon app works. Whereas if I remove the cocoon app (context) then tomcat fires up fine and the manager app works.

 

Has anyone else experienced this?

Antonio Gallardo | 1 Jul 2004 04:56
Favicon

Re: Tomcat and logkit conflicts

Hi Joe:

This seems to be a problem in commons-logging and not in LogKit. Check if
you have diferent versions or older versions of the commons-logging-jar.

Best Regards,

Antonio Gallardo

Joe Latty dijo:
> I am constantly having conflicts within tomcat, all seem to center
> around the logging (logkit?).
>
> My cocoon application is contained in its own context (all jars in
> WEB-INF/lib) nothing in tomcat shared or common. However if I add my
> application the manager app in tomcat does not work with the following
> error (or variations on this).
>
> org.apache.commons.logging.LogConfigurationException:
> org.apache.commons.logging.LogConfigurationException:
> java.lang.ClassNotFoundException:
> org.apache.commons.logging.impl.LogKitLogger
>
> but my cocoon app works. Whereas if I remove the cocoon app (context)
> then tomcat fires up fine and the manager app works.
>
> Has anyone else experienced this?
Scott Yeadon | 1 Jul 2004 05:35
Picon
Picon

Authentication and accessing the request object

Hello,

I have set up a basic authetication page using the 
authentication-manager and implementing the Authenticator interface with 
my own class, which works fine. However I need to pass information back 
via the request object within this class but the two parameters for 
Authenticator are of type SourceParameters and HandleConfiguration, 
neither of which provide me access to the request object nor allow me to 
utilise ObjectModelHelper in any way in order to obtain the request 
object. Is the only way I can accomplish this not to use the 
authentication model but instead break it down into separate actions 
which will allow me access to the request? I would rather not do this if 
possible. The relevant areas of my sitemap are shown below.

Thanks.

<!-- define some authentication for protected pages -->
    <authentication-manager>
      <handlers>
        <handler name="testauth">
          <redirect-to uri="password-login"/>
          <authentication authenticator="au.edu.anu.SimpleAuthenticator"/>
        </handler>
      </handlers>
    </authentication-manager>
  </map:component-configurations>

<map:pipeline>
<!-- entry to show the login page -->
<map:match pattern="password-login">
    <map:call function="handleForm">
      <map:parameter name="function" value="passwordLogin"/>
      <map:parameter name="form-definition" 
value="forms/password-login.xml"/>
   </map:call>
</map:match>

<!-- entry to start the authentication process (auth-login action). Note 
that the parameter element's name attribute's value MUST start with 
"parameter_" according to the doco -->
<map:match 
pattern="login">                                                      
   <map:act type="auth-login">
      <map:parameter name="handler" value="testauth"/>
      <map:parameter name="parameter_userid" 
value="{request-param:userid}"/>
      <map:parameter name="parameter_password" 
value="{request-param:password}"/>
   </map:act>
   <!-- authentication failed: -->
   <map:redirect-to 
uri="http://myInitialScreen"/>                                                                               
</map:match>                                                                                                                                                    

<map:match pattern="logout">
   <map:act type="auth-logout">
      <map:parameter name="handler" value="testauth"/>
   </map:act>
</map:match>
andi | 1 Jul 2004 05:45
Picon

in jboss-4dr4 calendar not show up


Dear all,

i just using jboss-4 and installed in default/deploy/cocoon.war directory
and i trying
http://localhost:8888/cocoon/samples/blocks/tour/bean-editor/edit/singleTask
?taskId=1
http://localhost:8080/cocoon/samples/blocks/javaflow/editForm2.do
error calendar not found

the calendar not found

thank you for the answer

best regards

andi kusnadi
Scott Yeadon | 1 Jul 2004 06:19
Picon
Picon

CForm bind problem (EvaluatorException: org.mozilla.javascript.UniqueTag)

Hello,

I am trying to understand the process and minimum requirement for 
setting up a simple CForm in Cocoon 2.1.5. I have followed the doco and 
samples where possible but I think I've hit a wall. I have created a 
simple form, but failed when binding from an XML file with the following 
error:
org.mozilla.javascript.EvaluatorException: 
"resource://org/apache/cocoon/forms/flow/javascript/Form.js", line 164: 
Invalid JavaScript value of type org.mozilla.javascript.UniqueTag

I reduced the form down to a simple single text field bind, but still 
received the same error.

What I have set up is a simple form called batchUpload with its own dir 
area as follows:
BASEDIR: cocoon2.1.5/build/webapp/forms-test
Forms: $BASEDIR/forms
Flow: $BASEDIR/flow
Resources: $BASEDIR/resources (this is a copy of the cocoon resources 
dir build/webapp/samples/blocks/forms/resources, so has the field 
stylesheets, etc)
Messages: $BASEDIR/messages
Sitemap: $BASEDIR/sitemap.xmap

The sitemap file is as follows:

<?xml version="1.0"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:components>
 <map:transformers default="xalan">
   <map:transformer name="i18n" 
src="org.apache.cocoon.transformation.I18nTransformer">
     <catalogues default="other">
       <catalogue id="other" name="OtherMessages" location="./messages"/>
     </catalogues>
     <cache-at-startup>true</cache-at-startup>
   </map:transformer>
 </map:transformers>
</map:components>

<map:flow language="javascript">
 <map:script src="flow/batchUpload.js"/>
</map:flow>

<map:pipelines>
  <map:pipeline>

<map:match pattern="batchUpload">
 <map:call function="handleForm">
   <map:parameter name="function" value="batchUpload"/>
   <map:parameter name="form-definition" value="forms/batchUpload.xml"/>
   <map:parameter name="documentURI" value="forms/batchUpload_data.xml"/>
   <map:parameter name="bindingURI" value="forms/batchUpload_bind.xml"/>
 </map:call>
</map:match>

<map:match pattern="*.continue">
 <map:call continuation="{1}"/>
</map:match>

<map:match pattern="batchUpload-display-pipeline">
 <map:generate src="forms/batchUpload_template.xml"/>
 <map:transform type="forms"/>
 <map:transform type="i18n">
   <map:parameter name="locale" value="en-US"/>
 </map:transform>
 <map:transform src="resources/forms-samples-styling.xsl"/>
 <map:serialize/>
</map:match>

<map:match pattern="batchUpload-success-pipeline.jx">
 <map:generate type="jx" src="forms/batchUpload_success.jx"/>
 <map:serialize/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>

=====================
The Javascript to do the form load (batchUpload.js), bind and display is 
as follows (within the form.load() is where the exception mentioned 
above is thrown)

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

function batchUpload() {
   var form = new Form("forms/batchUpload.xml");
// added for bind
   var documentURI = cocoon.parameters["documentURI"];

   // parse the document to a DOM-tree
   var document = loadDocument(documentURI);

   // bind the document data to the form
   form.load(document);

   // The showForm function will keep redisplaying the form until
   // everything is valid
   form.showForm("batchUpload-display-pipeline");
}

function loadDocument(uri) {
   var parser = null;
   var source = null;
   var resolver = null;
   try {
       parser = 
cocoon.getComponent(Packages.org.apache.excalibur.xml.dom.DOMParser.ROLE);
       resolver = 
cocoon.getComponent(Packages.org.apache.cocoon.environment.SourceResolver.ROLE); 

       source = resolver.resolveURI(uri);
       var is = new 
Packages.org.xml.sax.InputSource(source.getInputStream());
       is.setSystemId(source.getURI());
       return parser.parseDocument(is);
   } finally {
       if (source != null)
           resolver.release(source);
       cocoon.releaseComponent(parser);
       cocoon.releaseComponent(resolver);
   }
}

============

The binding file (batchUpload_bind.xml) is the simplified bding file:

<?xml version="1.0"?>
<fb:context xmlns:fb="http://apache.org/cocoon/forms/1.0#binding" 
path="/" direction="load" 
xmlns:fd="http://apache.org/cocoon/forms/1.0#definition">
   <fb:value id="bitstreamDirSelect" path="/dc-elements/dc-element1"/>
</fb:context>

==============

The simplified data file (batchUpload_data.xml) is as follows:

<?xml version="1.0"?>
<dc-elements>
  <dc-element1 qualified="true">subject.other</dc-element1>
</dc-elements>

===================

The form definition (batchUpload.xml) is as follows:

<?xml version="1.0"?>
<fd:form
 xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
 xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
 <fd:widgets>

   <fd:upload id="metafileSelect" required="true">
     <fd:label>Metadata File:</fd:label>
   </fd:upload>

   <fd:field id="bitstreamDirSelect" required="true">
     <fd:label>Content Directory:</fd:label>
     <fd:datatype base="string">
   <fd:validation>
     <fd:length min="5">
      <fd:failmessage>This field must be at least five 
chars</fd:failmessage>
     </fd:length>
   </fd:validation>
     </fd:datatype>
   </fd:field>

   <fd:field id="bitstreamNameField" required="true">
     <fd:label>Filename Field:</fd:label>
     <fd:datatype base="string"/>
     <fd:selection-list>
   <fd:item value="title"/>
   <fd:item value="library category"/>
   <fd:item value="filename"/>
   <fd:item value=" other categories"/>
     </fd:selection-list>
   </fd:field>

   <fd:field id="licenseFile" required="false">
     <fd:label>License File:</fd:label>
     <fd:datatype base="string"/>
   </fd:field>

   <fd:repeater id="DCMap" initial-size="3">
     <fd:label>Dublin Core Mapping</fd:label>
     <fd:widgets>
   <fd:field id="DCElement">
     <fd:datatype base="string"/>
     <fd:label>Dublin Core Field</fd:label>
     <fd:selection-list>
       <fd:item value=""/>
       <fd:item value="title"/>
       <fd:item value="subject.lcc"/>
       <fd:item value="subject.other"/>
     </fd:selection-list>
   </fd:field>
   <fd:field id="metadataField" required="true">
      <fd:datatype base="string"/>
      <fd:label>Metadata Field</fd:label>
      <fd:selection-list>
             <fd:item value="title"/>
             <fd:item value="library category"/>
             <fd:item value="filename"/>
             <fd:item value="other categories"/>
      </fd:selection-list>
   </fd:field>
   <fd:field id="separator">
      <fd:datatype base="string"/>
      <fd:label>Separator</fd:label>
   </fd:field>
     </fd:widgets>
   </fd:repeater>

   <fd:repeater id="results" initial-size="3">
     <fd:label>Results</fd:label>
     <fd:widgets>
   <fd:output id="failedItem">
     <fd:datatype base="string"/>
     <fd:label>Failed Item</fd:label>
   </fd:output>
   <fd:output id="failedReason">
     <fd:datatype base="string"/>
     <fd:label>Failed Reason</fd:label>
   </fd:output>
     </fd:widgets>
   </fd:repeater>  </fd:widgets>
</fd:form>

==================

Finally, the template file (batchUpload_template.xml) is as follows:
<?xml version="1.0"?>
<page xmlns:ft="http://apache.org/cocoon/forms/1.0#template"
 xmlns:fi="http://apache.org/cocoon/forms/1.0#instance" 
xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
 <title>BatchUpload</title>
 <content>
   <ft:form-template action="batchUpload" method="POST" 
enctype="multipart/form-data">
   <fi:group>
     <fi:styling type="fieldset" layout="columns"/>
     <fi:label>Metadata and Content Setup</fi:label>
     <fi:items>
        <ft:widget id="metafileSelect"/>
        <ft:widget id="bitstreamDirSelect"/>
        <ft:widget id="bitstreamNameField"/>
        <ft:widget id="licenseFile"/>
     </fi:items>
   </fi:group>

   <br/>
   <fi:group>
   <fi:styling type="fieldset"/>
     <fi:label><ft:widget-label id="DCMap"/></fi:label>
   <fi:items>
   <table cellspacing="10">
       <tr>
         <th><ft:repeater-widget-label id="DCMap" 
widget-id="DCElement"/></th>
         <th><ft:repeater-widget-label id="DCMap" 
widget-id="metadataField"/></th>
         <th><ft:repeater-widget-label id="DCMap" 
widget-id="separator"/></th>
       </tr>
      <ft:repeater-widget id="DCMap">
         <tr>
           <td><ft:widget id="DCElement"/></td>
           <td><ft:widget id="metadataField"/></td>
           <td><ft:widget id="separator"/></td>
         </tr>
       </ft:repeater-widget>
   </table>
   </fi:items>
   </fi:group>

       <fi:group>
     <fi:styling type="fieldset" layout="columns"/>
     <fi:label>Status Window</fi:label>
     <fi:items>
       <ft:widget id="results"/>
     </fi:items>
       </fi:group>
   </ft:form-template>
   <script>
   </script>
 </content>
</page>

Anyone know what's behind this error?

Thanks.

Scott.
Nina Juliadotter | 1 Jul 2004 06:44
Picon
Picon
Favicon

XML schema and XForms

Hi all,

I'm about to start a project where I generate a web form (could be HTML, XHTML or
WML) from an XML schema, transformed by an XSLT file. Obvously, Cocoon is an ideal
platform for this. Has anybody else used Cocoon for this before and care to share
their expericences?

I'm also looking at transforming the schema to XForms somehow, as that's suppose to
be the new web forms standard. Is CForms is in fact an implementation of XForms? The
W3C page http://www.w3.org/MarkUp/Forms/ says that Cocoon's XMLForm is an
implementation of XForms, but that is deprecated and refers to JXForms as the
implementation of XForms. So what's the difference between CForms and JXForms?
CForms seem to be much more used, by looking at the postings to the mailinglist.

So it boils down to 2 questions:
1. Is CForms an implementation of XForms and how does it differ from JXForms? Any
recommendations which to use, from those with experience of these forms frameworks?
2. Has anybody used XSLT in Cocoon to transform a XML schema to an XForms form or
XHTML/WML form and care to share their experiences?

Cheers,
Nina
Ralph Goers | 1 Jul 2004 06:46
Favicon

Re: Authentication and accessing the request object

The method recommended to me was to implement Contextualizable. In the 
contextualize method save the context that is passed in. Then use:

Map objModel = ContextHelper.getObjectModel(this.context);

I'm using this in a source factory to get the request object.

Ralph

At 6/30/2004  08:35 PM, you wrote:
>Hello,
>
>I have set up a basic authetication page using the authentication-manager 
>and implementing the Authenticator interface with my own class, which 
>works fine. However I need to pass information back via the request object 
>within this class but the two parameters for Authenticator are of type 
>SourceParameters and HandleConfiguration, neither of which provide me 
>access to the request object nor allow me to utilise ObjectModelHelper in 
>any way in order to obtain the request object. Is the only way I can 
>accomplish this not to use the authentication model but instead break it 
>down into separate actions which will allow me access to the request? I 
>would rather not do this if possible. The relevant areas of my sitemap are 
>shown below.

Gmane