Title: RE: databaseaddaction...help me....

Brilliant, thank you thank you thank you it works like a charm
jenny

-----Original Message-----
From: Christian Haul [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 9:51 AM
To: [EMAIL PROTECTED]
Subject: Re: databaseaddaction...help me....


On 05.Apr.2002 -- 09:26 AM, Rolfe Jenny wrote:
> HttpProcessor[8080][3]/AbstractDatabaseAction: Setting column 2 named
> key:page:pageid with value null

From this we can conclude that the value is not found. OK, the issue
is a bit complicated here. And you coudn't have known unless
inspecting the source (which I did just now):

If you happen to insert a key column like Guiseppe did, you can use
   <key param="key:base:id" dbcol="id" type="int" mode="request-attribute"/>
Where the important part is the mode attribute.

If you want to insert into a "value" column, however, this is not
supported. Instead, you need to provide the complete request attribute
name which is prefixed with "org.apache.cocoon.acting.AbstractDatabaseAction:"
thus it would be in your case
org.apache.cocoon.acting.AbstractDatabaseAction:key:page:pageid

The action will first try to find a request parameter with that name
and then try a request attribute of that name.

> <connection>xcpt</connection>
>   <table name="page">
>        <keys>
>          <key param="pageid" dbcol="pageid" type="int" mode="manual" />
>        </keys>
>     <values>
>
>       <value param="layoutnum" dbcol="layoutnum" type="string"/>
>       ...more values...
>     </values>
>   </table>
>
>   <table name="boalinks">
>     <values>
        <value param="org.apache.cocoon.acting.AbstractDatabaseAction:key:page:pageid" dbcol="childpageid" type="int" />

<!--
        If it were a key column:
        <key param="key:page:pageid" dbcol="childpageid" type="int" mode="request-attribute"/>
-->
>       ...more values...
>    </values>
>   </table>

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

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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

Reply via email to