You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by CORNE Jean Michel Ext WANADOO <je...@wanadoo.com> on 2003/02/12 11:54:47 UTC

Trees hierarchy with Torque for TurbineUser

Hi dear community,
 
I am using the security service of Turbine (using TDK-2.2). My desire is to entend the TurbineUser 
by adding a department foreign key (to department table) and a self reference for a manager field.
 
My question is how to I define it in my project-schema.xml in an efficient way ?
The page http://db.apache.org/torque/peers-howto.html speaking about something with my needs ?
 
I want then to implement functions like getTeamForManager(TurbineUser), getSeniorManagers(TurbineUser), etc.
 
Do I need to create an alias for TurbineUser ? The how to for extended User, is vague about this feature ?
 
Thx for your help

Re: Encoding

Posted by Zidarics Zoltan <za...@vili.pmmf.hu>.
Hi,
pavel at 2003. február 12. 17:04 wrote: 
> I have migrated our application from T2.1 to T2.2. In T2.1,
> services.VelocityService.input.encoding=UTF-8 was uncommented, set as a
> default but in T2.2 it was not. The app is in 9 languages and now I am
> getting data encoded incorectly. Is there a way to get the data back
> into right encoding from the database?
> I was trying to switch to UTF-8 now but have some issues with
> presentation  so I have to resolve these first before we can switch to
> UTF-8.
I am a beginner in turbine, but I had this problem too. I made a separate 
parameterparser class to handle it. If you cannot solve your problem send me 
a privat email, and I post it to you.

-- 
bye,
----------------------------------------------------
Zoltan Zidarics programmer
PTE University Pecs, Hungary
icq: 43288694

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Encoding

Posted by Xavier Ottolini <xa...@qualipse.fr>.
There a several posts about encoding problems in the Turbine User List 
archive :

http://archives.apache.org/eyebrowse/ReadMsg?listName=turbine-user@jakarta.apache.org&msgId=629295

http://archives.apache.org/eyebrowse/ReadMsg?listName=turbine-user@jakarta.apache.org&msgNo=9840



Zidarics Zoltan wrote:

>Hi,
>pavel at 2003. február 12. 17:04 wrote: 
>  
>
>>I have migrated our application from T2.1 to T2.2. In T2.1,
>>services.VelocityService.input.encoding=UTF-8 was uncommented, set as a
>>default but in T2.2 it was not. The app is in 9 languages and now I am
>>getting data encoded incorectly. Is there a way to get the data back
>>into right encoding from the database?
>>I was trying to switch to UTF-8 now but have some issues with
>>presentation  so I have to resolve these first before we can switch to
>>UTF-8.
>>    
>>
>I am a beginner in turbine, but I had this problem too. I made a separate 
>parameterparser class to handle it. If you cannot solve your problem send me 
>a privat email, and I post it to you.
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Encoding

Posted by pavel <pa...@icecentric.com>.
Hello,
I have migrated our application from T2.1 to T2.2. In T2.1, 
services.VelocityService.input.encoding=UTF-8 was uncommented, set as a 
default but in T2.2 it was not. The app is in 9 languages and now I am 
getting data encoded incorectly. Is there a way to get the data back 
into right encoding from the database?
I was trying to switch to UTF-8 now but have some issues with 
presentation  so I have to resolve these first before we can switch to 
UTF-8.

Thank you.

pavel


pavel wrote:

> Hello,
>
> Please, I need to make change in TurbineResources.Properties, just to 
> uncoment this line.
> #services.VelocityService.input.encoding=UTF-8
>
> Will it take effect when Tomcat is restarted or do I have to run ant 
> init?
>
> Thank you
>
> pavel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: TurbineResources.Properties

Posted by ramadevi <ra...@cmcltd.com>.
restart the tomcat that is sufficient.

ramadevi
----- Original Message -----
From: "pavel" <pa...@icecentric.com>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Wednesday, February 12, 2003 8:52 PM
Subject: TurbineResources.Properties


> Hello,
>
> Please, I need to make change in TurbineResources.Properties, just to
> uncoment this line.
> #services.VelocityService.input.encoding=UTF-8
>
> Will it take effect when Tomcat is restarted or do I have to run ant init?
>
> Thank you
>
> pavel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: TurbineResources.Properties

Posted by Bill <bh...@collaborativefusion.com>.
I'm not sure thats true Fabio.  I believe he'll still need to run 'ant
update-tr-props'.  Then the restart will pick up the changes.  


On Wed, 2003-02-12 at 10:27, Fabio Daprile wrote:
> Hello,
> 
> you just need to restart tomcat.
> 
> greetings,
> 
> Fabio
> 
> pavel wrote:
> 
> > Hello,
> >
> > Please, I need to make change in TurbineResources.Properties, just to 
> > uncoment this line.
> > #services.VelocityService.input.encoding=UTF-8
> >
> > Will it take effect when Tomcat is restarted or do I have to run ant 
> > init?
> >
> > Thank you
> >
> > pavel
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
> 
> -- 
> ************************************
> Würth Phoenix S.r.l.
> Fabio Daprile
> Department
> Via Kravogl 4
> I-39100 Bolzano
> Phone: +39 0471  564111 (direct 564067)
> Fax: +39 0471  564122
> mailto:fabio.daprile@wuerth-phoenix.com
> http:// www.wuerth-phoenix.com
> *************************************
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: emergency

Posted by pavel <pa...@icecentric.com>.
Thank you!

CP Lim wrote:

> Hi Pavel,
>
> I'm guessing you're talking about submitting data via. forms.  What 
> you first need to know is what encoding the submitted data is in.  For 
> example if you use EUC-JP, then what you'll have to do is before 
> accessing Strings from your ParameterParser object, you'll have to 
> convert them from ISO-8859-1 to EUC-JP.  eg.
>
> ----------------------------------------------------------------
> public void convert(RunData data, String name)
> {
>     ParameterParser parser = data.getParameter();
>     String unconverted = parser.getString(name);
>     String converted = null;
>     try
>     {
>         if(unconverted != null)
>         {
>             byte[] bytes = unconverted.getBytes("8859_1");
>             converted = new String(bytes, "EUC-JP");
>         }
>     }
>     catch(UnsupportedEncodingException e)
>     {
>         // handle problem converting data
>     }
>
>     return converted;
> }
> ----------------------------------------------------------------
>
> Have a look at this link: 
> http://forum.java.sun.com/thread.jsp?thread=325429&forum=16&message=1320661 
>
>
> It claims that we shouldn't need to do this for Tomcat v4.x, but it 
> seems that I still need to, so that is (part of) my work around.
>
> cheers,
> CP
>
> pavel wrote:
>
>> Hello,
>>
>> Please, could you help me to set up turbine encoding right. We have 
>> small app in 9 languages - have no problem to render the pages on the 
>> screen but the data do not go right in the database. The app is live 
>> now. Fortunately because of time shift most foreign countries have 
>> night there. So, I have a couple of hours to fix that.
>>
>> We had it working fine in T2.1 (used default settings) and now in 
>> T2.2 we expected to be the same settings. It is my fault I did not 
>> check that.
>>
>> Please, could you tell me what exactly I have to set up so that the 
>> data go right in the database. Speaking of languages we have a mix of 
>> Chinese, korean, japanese, english, german ...
>>
>> I found in TurbineResources.properties :
>> #services.VelocityService.input.encoding=UTF-8
>>
>> Is that all? Or something more is involved?
>>
>> Thank you very much.
>>
>> Pavel
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>>
>>
>>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: emergency

Posted by CP Lim <cp...@redsheriff.com>.
Hi Pavel,

I'm guessing you're talking about submitting data via. forms.  What you 
first need to know is what encoding the submitted data is in.  For 
example if you use EUC-JP, then what you'll have to do is before 
accessing Strings from your ParameterParser object, you'll have to 
convert them from ISO-8859-1 to EUC-JP.  eg.

----------------------------------------------------------------
public void convert(RunData data, String name)
{
     ParameterParser parser = data.getParameter();
     String unconverted = parser.getString(name);
     String converted = null;
     try
     {
         if(unconverted != null)
         {
             byte[] bytes = unconverted.getBytes("8859_1");
             converted = new String(bytes, "EUC-JP");
         }
     }
     catch(UnsupportedEncodingException e)
     {
         // handle problem converting data
     }

     return converted;
}
----------------------------------------------------------------

Have a look at this link: 
http://forum.java.sun.com/thread.jsp?thread=325429&forum=16&message=1320661

It claims that we shouldn't need to do this for Tomcat v4.x, but it 
seems that I still need to, so that is (part of) my work around.

cheers,
CP

pavel wrote:
> Hello,
> 
> Please, could you help me to set up turbine encoding right. We have 
> small app in 9 languages - have no problem to render the pages on the 
> screen but the data do not go right in the database. The app is live 
> now. Fortunately because of time shift most foreign countries have night 
> there. So, I have a couple of hours to fix that.
> 
> We had it working fine in T2.1 (used default settings) and now in T2.2 
> we expected to be the same settings. It is my fault I did not check that.
> 
> Please, could you tell me what exactly I have to set up so that the data 
> go right in the database. Speaking of languages we have a mix of 
> Chinese, korean, japanese, english, german ...
> 
> I found in TurbineResources.properties :
> #services.VelocityService.input.encoding=UTF-8
> 
> Is that all? Or something more is involved?
> 
> Thank you very much.
> 
> Pavel
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> 
> 
> 


-- 
R E D S H E R I F F
C.P. Lim - Software Engineer
Level 1, 10 Queens Road    +61 3 9864 0733 tel
Melbourne VIC              +61 3 9864 0778 fax
Australia                  +61 413 781 846 mob

This message and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they are 
addressed. If you are not the intended recipient, you are hereby 
notified that any use or dissemination of this communication is strictly 
prohibited. If you have received this message in error please notify us 
immediately by return email or telephone +61 (3) 9659 0432, then delete 
this message. Any views expressed in this message are those of the 
individual sender and many not necessarily reflect the views of Red 
Sheriff.


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


emergency

Posted by pavel <pa...@icecentric.com>.
Hello,

Please, could you help me to set up turbine encoding right. We have 
small app in 9 languages - have no problem to render the pages on the 
screen but the data do not go right in the database. The app is live 
now. Fortunately because of time shift most foreign countries have night 
there. So, I have a couple of hours to fix that.

 We had it working fine in T2.1 (used default settings) and now in T2.2 
we expected to be the same settings. It is my fault I did not check that.

Please, could you tell me what exactly I have to set up so that the data 
go right in the database. Speaking of languages we have a mix of 
Chinese, korean, japanese, english, german ...

I found in TurbineResources.properties :
#services.VelocityService.input.encoding=UTF-8

Is that all? Or something more is involved?

Thank you very much.

Pavel


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: TurbineResources.Properties

Posted by pavel <pa...@icecentric.com>.
Thank you. Do you know by the way what is the default encoding if it is 
not specified in TurbineResources.Properties?

Fabio Daprile wrote:

> Hello,
>
> you just need to restart tomcat.
>
> greetings,
>
> Fabio
>
> pavel wrote:
>
>> Hello,
>>
>> Please, I need to make change in TurbineResources.Properties, just to 
>> uncoment this line.
>> #services.VelocityService.input.encoding=UTF-8
>>
>> Will it take effect when Tomcat is restarted or do I have to run ant 
>> init?
>>
>> Thank you
>>
>> pavel
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: TurbineResources.Properties

Posted by Fabio Daprile <fa...@wuerth-phoenix.com>.
Hello,

you just need to restart tomcat.

greetings,

Fabio

pavel wrote:

> Hello,
>
> Please, I need to make change in TurbineResources.Properties, just to 
> uncoment this line.
> #services.VelocityService.input.encoding=UTF-8
>
> Will it take effect when Tomcat is restarted or do I have to run ant 
> init?
>
> Thank you
>
> pavel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>

-- 
************************************
Würth Phoenix S.r.l.
Fabio Daprile
Department
Via Kravogl 4
I-39100 Bolzano
Phone: +39 0471  564111 (direct 564067)
Fax: +39 0471  564122
mailto:fabio.daprile@wuerth-phoenix.com
http:// www.wuerth-phoenix.com
*************************************




---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


TurbineResources.Properties

Posted by pavel <pa...@icecentric.com>.
Hello,

Please, I need to make change in TurbineResources.Properties, just to 
uncoment this line.
#services.VelocityService.input.encoding=UTF-8

Will it take effect when Tomcat is restarted or do I have to run ant init?

Thank you

pavel


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Trees hierarchy with Torque for TurbineUser

Posted by Scott Eade <se...@backstagetech.com.au>.
Pick your way through the extend-user howto - the you may be able to get
away with just providing the adapters for TurbineUser and TurbineUserPeer in
which you can implement the necessary methods.

HTH,

Scott
-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au
.Mac Chat/AIM: seade at mac dot com


On 12/02/2003 9:54 PM, "CORNE Jean Michel Ext WANADOO"
<je...@wanadoo.com> wrote:

> Hi dear community,
> 
> I am using the security service of Turbine (using TDK-2.2). My desire is to
> entend the TurbineUser
> by adding a department foreign key (to department table) and a self reference
> for a manager field.
> 
> My question is how to I define it in my project-schema.xml in an efficient way
> ?
> The page http://db.apache.org/torque/peers-howto.html speaking about something
> with my needs ?
> 
> I want then to implement functions like getTeamForManager(TurbineUser),
> getSeniorManagers(TurbineUser), etc.
> 
> Do I need to create an alias for TurbineUser ? The how to for extended User,
> is vague about this feature ?
> 
> Thx for your help
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org