Re: databaseaddaction...help me....

2002-04-05 Thread Christian Haul

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.

 connectionxcpt/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]




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

2002-04-05 Thread Rolfe Jenny
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.


 connectionxcpt/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]





databaseaddaction...help me....

2002-04-04 Thread Rolfe Jenny
Title: databaseaddaction...help me





Okay so what I want to do is use the default database add action to update two tables, in one I automatically generate an id then I want to also put this id into the second table. So here's what I do:

connectionxcpt/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=key:page:pageid dbcol=childpageid type=int /
 ...more values...
 /values
 /table


I've tried putting in a key, tried page.pageid, etc, etc, ect. Basically I'm randomly trying stupid things now, pissing in the wind and getting very angry with it.

I'm using cocoon-2.0.2-dev on Tomcat 4.01


I may cry very soon...


And yes I know I've already double posted a big bloated version of this plea for help but this will be the last time I ask, promise!

jenny