You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Moabi Nyokong <Mo...@discovery.co.za> on 2003/01/07 15:01:05 UTC

RE: Extending user

HI, I'm having this same problem...all my new columns are not initialised
and return null...anybody have any clue? I followed exactly what pierre has
done here...

Using JS 1.4-b3 on Weblogic 7.1

-----Original Message-----
From: Pierre Henry [mailto:phenry@proconcept.ch] 
Sent: 21 November 2002 05:13
To: Jetspeed User List (E-mail)
Cc: James Somers
Subject: Extending user


Hi!
I extended the JetspeedUser to MyUser with another table name and a new
field Title. I already : -generated the Peer classes with torque (with the
JavaName param for the table, so that I can keep the same class name)
-extended the JetspeedUser with MyUser and the BaseJetspeedUser with
MyUserImpl to add the getTitle and SetTitle methods -changed the
services.JetspeedSecurity.user.class parameter in all
JetspeedSecurity.* files to point to MyUserImpl

Now I try to use it in MyHelloUserPortlet. I filled the titles values in the
DB by hand. I do this to get the title : MyUser user
=(MyUser)rundata.getUser(); String title = user.getTitle();

but this returns me null for title.

>From what I have found, the key TITLE doesn't exist in user.perm .

The sql queries are done correctly (including TITLE) as registered in the
logs.

The problem seems to be that when the user object is constructed in
TurbineUserPeer.row2UserObject(...), it is done in a for loop :

   for( int i=0; i<columnNames.length; i++ )
   {
      put the value into the Hashtable with columnNames[j] as key
   }

but TITLE IS NOT IN columnNames.

I don't understand why, it should be since columnNames is initialized by

    private static Schema schema = initTableSchema(TABLE_NAME);
    private static com.workingdogs.village.Column[] columns = 
        initTableColumns(schema);
    public static String[] columnNames = initColumnNames(columns);

and TABLE_NAME is right and points to the new table, not the old one...

Somebody, an idea ? any help greatly apreciated !

Pierre

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Extending user

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Tuesday, January 7, 2003, at 06:01  AM, Moabi Nyokong wrote:

> HI, I'm having this same problem...all my new columns are not 
> initialised
> and return null...anybody have any clue? I followed exactly what 
> pierre has
> done here...
>
> Using JS 1.4-b3 on Weblogic 7.1

Send your Torque schema and property files, and any Java classes and 
I'll try to test it out.

--
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
+01 707 773-4646




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>