Re: Modular Database Actions: Urgently seeking documentation

2003-03-19 Thread Christian Haul
On 18.Mar.2003 -- 03:15 PM, Richard In Public wrote:
> Hi Chris
> 
> Firstly, thanks for your response.  I have been mulling over this and
> revisiting the docs, but I have not managed to get things working.
> 
> I suspect that my problem lies in chanelling the request parameters passed
> by the form into the database action.
> Specifically, I cannot figure out what:
> 
> > I've not tested it, but in theory you could set the path separator for
> > the action to "/" and use the xmlform input module. Drawback is, you
> > need to pass the module name and form id for every value OR create
> > different instances of the xmlform module for each and every form
> > id.
> 
> would look like in practice.  Do you have any samples?

No, I haven't tested this.

First, you need to have a separate instance for the xmlform module in
cocoon.xconf


   42



To change the path separator, add
 /
to the action's config. This will change "table.column[row]" to
"table/column[row]". You might need to add
 false
as well to make it "table/row". In addition, switch the default input
to this new module:
 xmlform-42

In sitemap.xmap:

  

   
  database.xml
  false
  /
  false
  xmlform-42
   

  

and

 

 


Now, given a suitable database.xml which basically needs to list the
tables and columns, the above *should* be able to store values from an
XMLForm with id "42" to the database.

If this turns out to be useful, we could try to find a way to get the
xmlform-id to the xmlform module at run-time. It's a bit tricky,
though, so it hasn't been done, yet.

This is untested functionality and may or may not work. In any case
I'd be happy to hear about the outcome or even fixes.

Chris.
-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

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



Re: Modular Database Actions: Urgently seeking documentation

2003-03-18 Thread Richard In Public
Hi Chris

Firstly, thanks for your response.  I have been mulling over this and
revisiting the docs, but I have not managed to get things working.

I suspect that my problem lies in chanelling the request parameters passed
by the form into the database action.
Specifically, I cannot figure out what:

> I've not tested it, but in theory you could set the path separator for
> the action to "/" and use the xmlform input module. Drawback is, you
> need to pass the module name and form id for every value OR create
> different instances of the xmlform module for each and every form
> id.

would look like in practice.  Do you have any samples?

Best,

Richard

- Original Message -
From: "Christian Haul" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 14, 2003 8:43 AM
Subject: Re: Modular Database Actions: Urgently seeking documentation


> On 13.Mar.2003 -- 07:48 PM, Richard In Public wrote:
> > Hi
> >
> > I've been struggling for some time now to understand how to use modular
> > database actions.  I have not been able to find any directly helpful
> > documentation.
> >
> > Does anyone have a simple example using an XMLForm to insert a row with
a
> > modular database add action?
>
> I've not tested it, but in theory you could set the path separator for
> the action to "/" and use the xmlform input module. Drawback is, you
> need to pass the module name and form id for every value OR create
> different instances of the xmlform module for each and every form
> id. Provided there is sufficient demand, we could try to make passing
> the form id easier.
>
> > I've listed some of the sources that I've tried below.
>
> > 1.  Coocoon Wiki's ModularDatabaseActions page stops short of providing
> > information on using these actions from the sitemap.
>
> The usage from sitemap is like any other action. Details for
> parameters can be found in the accompanying javadocs.
>
> > 2.  I found the mod-db sample in the 2.1 source tree, with the sitemap
at:
> > cocoon-2.1\src\blocks\databases\samples\mod-db\sitemap.xmap.  I have not
> > been able to figure out how the 'req-params' actions are used, nor how
the
>
> req-params is a guard action that tests existence of request
> parameters. The nested database action thus fires only when a given
> set of request parameters is present.
>
> > value of the 'parameters' parameter is to be understood.  This example
also
> > seems to be based on ESQL, whereas I am trying to use XMLForms.
>
> ESQL and XMLForms do not overlap. ESQL is used in the sample to
> display the database contents.
>
> > 3.  When I invoke the action from my browser/xmlform it breaks (or
returns
> > null) and I have not be able to find any log entries relating to this.
I
> > have set the logger parameter when I declare the action in my sitemap.
>
> Since it is modular, log entries (need to enable log level DEBUG) stem
> from various classes and are distributed among sitemap.log and core.log
>
> > 4.  I have not been able to locate a straight forward example in the
mailing
> > lists or anywhere else.
>
> HTH
>
> Chris.
> --
> C h r i s t i a n   H a u l
> [EMAIL PROTECTED]
> fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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



Re: Modular Database Actions: Urgently seeking documentation

2003-03-14 Thread Christian Haul
On 13.Mar.2003 -- 07:48 PM, Richard In Public wrote:
> Hi
> 
> I've been struggling for some time now to understand how to use modular
> database actions.  I have not been able to find any directly helpful
> documentation.
> 
> Does anyone have a simple example using an XMLForm to insert a row with a
> modular database add action?

I've not tested it, but in theory you could set the path separator for
the action to "/" and use the xmlform input module. Drawback is, you
need to pass the module name and form id for every value OR create
different instances of the xmlform module for each and every form
id. Provided there is sufficient demand, we could try to make passing
the form id easier. 

> I've listed some of the sources that I've tried below.

> 1.  Coocoon Wiki's ModularDatabaseActions page stops short of providing
> information on using these actions from the sitemap.

The usage from sitemap is like any other action. Details for
parameters can be found in the accompanying javadocs.

> 2.  I found the mod-db sample in the 2.1 source tree, with the sitemap at:
> cocoon-2.1\src\blocks\databases\samples\mod-db\sitemap.xmap.  I have not
> been able to figure out how the 'req-params' actions are used, nor how the

req-params is a guard action that tests existence of request
parameters. The nested database action thus fires only when a given
set of request parameters is present.

> value of the 'parameters' parameter is to be understood.  This example also
> seems to be based on ESQL, whereas I am trying to use XMLForms.

ESQL and XMLForms do not overlap. ESQL is used in the sample to
display the database contents.

> 3.  When I invoke the action from my browser/xmlform it breaks (or returns
> null) and I have not be able to find any log entries relating to this.  I
> have set the logger parameter when I declare the action in my sitemap.

Since it is modular, log entries (need to enable log level DEBUG) stem
from various classes and are distributed among sitemap.log and core.log

> 4.  I have not been able to locate a straight forward example in the mailing
> lists or anywhere else.

HTH

Chris.
-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

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



Modular Database Actions: Urgently seeking documentation

2003-03-13 Thread Richard In Public
Hi

I've been struggling for some time now to understand how to use modular
database actions.  I have not been able to find any directly helpful
documentation.

Does anyone have a simple example using an XMLForm to insert a row with a
modular database add action?

I've listed some of the sources that I've tried below.

Richard

1.  Coocoon Wiki's ModularDatabaseActions page stops short of providing
information on using these actions from the sitemap.

2.  I found the mod-db sample in the 2.1 source tree, with the sitemap at:
cocoon-2.1\src\blocks\databases\samples\mod-db\sitemap.xmap.  I have not
been able to figure out how the 'req-params' actions are used, nor how the
value of the 'parameters' parameter is to be understood.  This example also
seems to be based on ESQL, whereas I am trying to use XMLForms.

3.  When I invoke the action from my browser/xmlform it breaks (or returns
null) and I have not be able to find any log entries relating to this.  I
have set the logger parameter when I declare the action in my sitemap.

4.  I have not been able to locate a straight forward example in the mailing
lists or anywhere else.



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