You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by fa...@wuerth.it on 2002/02/07 21:52:19 UTC

RE: How to redirect after Login ! Problem solved. Thx Chris!

Hi,

Thank you very much Chris. It works!!!

All the problem was that the LoginAction was an extension of 
VelocitySecureAction, and this class throws the template without executing 
the screen java code.

Now it is an extension of VelocityAction.

I created a Login.java, (as you suggested) which has to be an extension of 
VelocityScreen, and not secure as seen for the Action upper and i changed a 
piece of code in the IsAuthorized method in my SecureScreen class.

It was:

    protected boolean isAuthorized( RunData data )  throws Exception
    {
        boolean isAuthorized = false;

        AccessControlList acl = data.getACL();

        if (acl==null || ! acl.hasRole("turbine_root"))
        {
            data.setScreenTemplate(
                TurbineResources.getString("template.login"));

            isAuthorized = false;
        }
        else if(acl.hasRole("turbine_root"))
        {
            isAuthorized = true;
        }
        return isAuthorized;
    }

And now it is:

    protected boolean isAuthorized( RunData data )  throws Exception
    {
        boolean isAuthorized = false;

        AccessControlList acl = data.getACL();

        if (acl==null || ! acl.hasRole("turbine_root"))
        {
            this.doRedirect(data, "Login.vm");

            isAuthorized = false;
        }
        else if(acl.hasRole("turbine_root"))
        {
            isAuthorized = true;
        }
        return isAuthorized;
    }



Thank you very much!!!

Don't you have a clear example of how to use the Sceduler service?
that would help me also.

Regards!

FD

Chris Campbell <ca...@kontiki.com> said:

> This is how I do it an it works like a charm:

1. create a Login.java screen class to go along with your login form =
(presumably Login.vm). This has special status and may be executed =
without being logged in because it is the home template

2. populate the context of the login template with =
"destination_template" and the parameters that come in with the request =
(the rundata object has everything you need, ie getTemplateInfo(), =
getParameters() )

3. in the action of the Login form, set the template to =
$destiation_template and for each parameter add a hidden input field to =
the form

ie

<form method="post"
	action="$ling.setAction("Login").setTemplate($destination_template)">

#foreach($parameter in $parameters)
<input type=hidden name="$parameter" =
value="$parameters.get($parameter)">

blah blah...

</form>

Chris C

-----Original Message-----
From: fabio@wuerth.it [mailto:fabio@wuerth.it]
Sent: Thursday, February 07, 2002 10:08 AM
To: Turbine Users List
Subject: Re: How to redirect after Login ! More information needed!


Thank you for the answer.

I've had a look to the archives.

What i have understood is that it is not possible to
do a redirect after login. TDK2.1 does not permit this yet.

Is that correct? This feature is quite important for our business =
because our 
support engineers do not have time to open BUGTRACK (our application) =
and 
navigate to the right page.

Is this feature working in TDK3.0.
If yes is TDK3.1 compatible with the TDK2.1 ? Or the porting implies a =
lot of 
code change!

Regards!

Fabio Daprile


Heiko Braun <he...@hlan.org> said:

> We had this discussion just a few weeks ago.
> The redirect should be implemented as the default behaviour. 
> You might search the archives (www.mail-archive.com) to find =
additional
> information on this topic. Maybe someone takes this task and submits a
> patch to the 2.1 branch?
> 
> /Heiko
> 
> Am Mit, 2002-02-06 um 20.19 schrieb fabio@wuerth.it:
> > Hello gentlemen,
> > 
> > I'm developing a Bug Tracking application for my company with =
turbine.
> > I use turbine but don't know how it works internally.
> > 
> > Here is my problem:
> > 
> > when one of my collegues inserts a new bug in the system my =
application 
sends 
> > a mail to other users. This mail contains a direct link to the bug.
> > 
> > the link looks like this:
> > 
> > =
http://localhost:8080/bugtrack/servlet/bugtrack/template/ShowTicket.vm?
> > id=1&mode=display
> > 
> > A user should click on this link and should be carried directly to =
the 
> > ShowTicket page after the Login.
> > 
> > The problem is the Login. Turbine sees that the user is not =
connected and 
> > show him the login page, but at this point the link is lost.
> > 
> > How can i store information included into the link so that i can =
redirect 
> > after the authentication!
> > 
> > Do i have to modify the security system.
> > Can somebody explain me what turbine does before the login and how =
is it 
> > possible to read the data included in the link.
> > Is the session crested before displaying the login?
> > 
> > If somebody can help me i'll be grateful!
> > 
> > 
> > Best regards!
> > 
> > Fabio Daprile
> >  
> > 
> > --
> > To unsubscribe, e-mail:   <mailto:turbine-user-
unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: <mailto:turbine-user-
help@jakarta.apache.org>
> > 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:turbine-user-
unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:turbine-user-
help@jakarta.apache.org>
> 
> 



-- 




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


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





-- 




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


Re: How to redirect after Login ! Still having problems...

Posted by Bartek Walter <Ba...@man.poznan.pl>.

fabio@wuerth.it wrote:

> Thank you very much Chris. It works!!!

I am not sure whether I did everything correctly, but for me it does
not. Could you provide me with more detailed info?

I think that saying LoginAction you mean LoginUser, yes? The action
inherits from Action (not VelocityAction neither VelocitySecureAction),
which is not secure, so why you say that the problem was in
inappropriate parent for the action?

And secondly, TemplateLink ($link) does not provide setTemplate() 
method (used in modified Login.vm template suggested by Chris Campbell).
The only method available is setPage(), but this probably causes the
doRedirect in SecureScreen to execute the Login screen tice upon the
form submit.

Any help (probably more detailed info will do... I might have missed
something important) is appreciated...

Bartek Walter

> All the problem was that the LoginAction was an extension of
> VelocitySecureAction, and this class throws the template without executing
> the screen java code.
> 
> Now it is an extension of VelocityAction.
> 
> I created a Login.java, (as you suggested) which has to be an extension of
> VelocityScreen, and not secure as seen for the Action upper and i changed a
> piece of code in the IsAuthorized method in my SecureScreen class.
> 
> It was:
> 
>     protected boolean isAuthorized( RunData data )  throws Exception
>     {
>         boolean isAuthorized = false;
> 
>         AccessControlList acl = data.getACL();
> 
>         if (acl==null || ! acl.hasRole("turbine_root"))
>         {
>             data.setScreenTemplate(
>                 TurbineResources.getString("template.login"));
> 
>             isAuthorized = false;
>         }
>         else if(acl.hasRole("turbine_root"))
>         {
>             isAuthorized = true;
>         }
>         return isAuthorized;
>     }
> 
> And now it is:
> 
>     protected boolean isAuthorized( RunData data )  throws Exception
>     {
>         boolean isAuthorized = false;
> 
>         AccessControlList acl = data.getACL();
> 
>         if (acl==null || ! acl.hasRole("turbine_root"))
>         {
>             this.doRedirect(data, "Login.vm");
> 
>             isAuthorized = false;
>         }
>         else if(acl.hasRole("turbine_root"))
>         {
>             isAuthorized = true;
>         }
>         return isAuthorized;
>     }
> 
> Thank you very much!!!
> 
> Don't you have a clear example of how to use the Sceduler service?
> that would help me also.
> 
> Regards!
> 
> FD
> 
> Chris Campbell <ca...@kontiki.com> said:
> 
> > This is how I do it an it works like a charm:
> 
> 1. create a Login.java screen class to go along with your login form =
> (presumably Login.vm). This has special status and may be executed =
> without being logged in because it is the home template
> 
> 2. populate the context of the login template with =
> "destination_template" and the parameters that come in with the request =
> (the rundata object has everything you need, ie getTemplateInfo(), =
> getParameters() )
> 
> 3. in the action of the Login form, set the template to =
> $destiation_template and for each parameter add a hidden input field to =
> the form
> 
> ie
> 
> <form method="post"
>         action="$ling.setAction("Login").setTemplate($destination_template)">
> 
> #foreach($parameter in $parameters)
> <input type=hidden name="$parameter" =
> value="$parameters.get($parameter)">
> 
> blah blah...
> 
> </form>
> 
> Chris C
> 
> -----Original Message-----
> From: fabio@wuerth.it [mailto:fabio@wuerth.it]
> Sent: Thursday, February 07, 2002 10:08 AM
> To: Turbine Users List
> Subject: Re: How to redirect after Login ! More information needed!
> 
> Thank you for the answer.
> 
> I've had a look to the archives.
> 
> What i have understood is that it is not possible to
> do a redirect after login. TDK2.1 does not permit this yet.
> 
> Is that correct? This feature is quite important for our business =
> because our
> support engineers do not have time to open BUGTRACK (our application) =
> and
> navigate to the right page.
> 
> Is this feature working in TDK3.0.
> If yes is TDK3.1 compatible with the TDK2.1 ? Or the porting implies a =
> lot of
> code change!
> 
> Regards!
> 
> Fabio Daprile
> 
> Heiko Braun <he...@hlan.org> said:
> 
> > We had this discussion just a few weeks ago.
> > The redirect should be implemented as the default behaviour.
> > You might search the archives (www.mail-archive.com) to find =
> additional
> > information on this topic. Maybe someone takes this task and submits a
> > patch to the 2.1 branch?
> >
> > /Heiko
> >
> > Am Mit, 2002-02-06 um 20.19 schrieb fabio@wuerth.it:
> > > Hello gentlemen,
> > >
> > > I'm developing a Bug Tracking application for my company with =
> turbine.
> > > I use turbine but don't know how it works internally.
> > >
> > > Here is my problem:
> > >
> > > when one of my collegues inserts a new bug in the system my =
> application
> sends
> > > a mail to other users. This mail contains a direct link to the bug.
> > >
> > > the link looks like this:
> > >
> > > =
> http://localhost:8080/bugtrack/servlet/bugtrack/template/ShowTicket.vm?
> > > id=1&mode=display
> > >
> > > A user should click on this link and should be carried directly to =
> the
> > > ShowTicket page after the Login.
> > >
> > > The problem is the Login. Turbine sees that the user is not =
> connected and
> > > show him the login page, but at this point the link is lost.
> > >
> > > How can i store information included into the link so that i can =
> redirect
> > > after the authentication!
> > >
> > > Do i have to modify the security system.
> > > Can somebody explain me what turbine does before the login and how =
> is it
> > > possible to read the data included in the link.
> > > Is the session crested before displaying the login?
> > >
> > > If somebody can help me i'll be grateful!
> > >
> > >
> > > Best regards!
> > >
> > > Fabio Daprile



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


RE: Importing data in Torque&IdBroker

Posted by Heiko Braun <he...@hlan.org>.
sorry for the spam,
my mailer does weired things today..
it should be over now.

/heiko

Am Fre, 2002-02-08 um 16.26 schrieb Heiko Braun:
> Ok. now i understand.
> But i actually have no idea how
> the idBroker handles cases like this.
> I guess you run into a lot of problems,..
> 
> ;)
> 
> Are you doing the imports via torque aswell?
> 
> 
> 
> Am Fre, 2002-02-08 um 15.13 schrieb Emmanuel Bardet:
> > Thanks Heiko for your reply. I do want to keep idbroker for the table except
> > when I import a file where the key is provided which happens from time to
> > time. Are you suggesting I should maintain 2 ******-schema.xml files ?
> > 
> > > -----Original Message-----
> > > From: Heiko Braun [mailto:heiko@hlan.org]
> > > Sent: vendredi 8 février 2002 15:03
> > > To: Turbine Users List
> > > Subject: Re: Importing data in Torque&IdBroker
> > >
> > >
> > > possible values for the idMethod attribute are:
> > > idBroker, native, autoincrement, sequence, none, null.
> > > choose the one which pleases you most.
> > >
> > > take a look at "source/dtd/database.dtd" for more information.
> > > the file is included in the turbine source distribution.
> > >
> > > /Heiko
> > >
> > >
> > > Am Fre, 2002-02-08 um 14.51 schrieb Emmanuel Bardet:
> > > > Hello all,
> > > >
> > > > I need to import data in a table on which the idbroker generates primary
> > > > keys. This is fine except that I need to keep the primary key
> > > provided with
> > > > the import file. How do I tell Torque not to use the idbroker for those
> > > > inserts ?
> > > >
> > > > <table name="TAR_MENU_UNIT" idMethod="idbroker" >
> > > >   <column name="UNIT_ID" required="true" primaryKey="true"
> > > >           autoIncrement="true" type="INTEGER"/>
> > > >   ...
> > > > </table>
> > > >
> > > > Thanks.
> > > >
> > > > Emmanuel.
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > <ma...@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > > <ma...@jakarta.apache.org>
> > > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > 
> > 
> > 
> > --
> > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
> > 
> -- 
> '
>  Heiko Braun
>  Software Development
> 
>  Java, Open Source
>  
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
-- 
'
 Heiko Braun
 Software Development

 Java, Open Source
 


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


RE: Importing data in Torque&IdBroker

Posted by Emmanuel Bardet <em...@bardet.org>.
Yes, I wanted to use torque for the import as it's really convinient. I
guess I'd better create the sql statements for each entry in the file... :-(

> -----Original Message-----
> From: Heiko Braun [mailto:heiko@hlan.org]
> Sent: vendredi 8 février 2002 15:21
> To: Turbine Users List
> Subject: RE: Importing data in Torque&IdBroker
>
>
> Ok. now i understand.
> But i actually have no idea how
> the idBroker handles cases like this.
> I guess you run into a lot of problems,..
>
> ;)
>
> Are you doing the imports via torque aswell?
>
>
>
> Am Fre, 2002-02-08 um 15.13 schrieb Emmanuel Bardet:
> > Thanks Heiko for your reply. I do want to keep idbroker for the
> table except
> > when I import a file where the key is provided which happens
> from time to
> > time. Are you suggesting I should maintain 2 ******-schema.xml files ?
> >
> > > -----Original Message-----
> > > From: Heiko Braun [mailto:heiko@hlan.org]
> > > Sent: vendredi 8 février 2002 15:03
> > > To: Turbine Users List
> > > Subject: Re: Importing data in Torque&IdBroker
> > >
> > >
> > > possible values for the idMethod attribute are:
> > > idBroker, native, autoincrement, sequence, none, null.
> > > choose the one which pleases you most.
> > >
> > > take a look at "source/dtd/database.dtd" for more information.
> > > the file is included in the turbine source distribution.
> > >
> > > /Heiko
> > >
> > >
> > > Am Fre, 2002-02-08 um 14.51 schrieb Emmanuel Bardet:
> > > > Hello all,
> > > >
> > > > I need to import data in a table on which the idbroker
> generates primary
> > > > keys. This is fine except that I need to keep the primary key
> > > provided with
> > > > the import file. How do I tell Torque not to use the
> idbroker for those
> > > > inserts ?
> > > >
> > > > <table name="TAR_MENU_UNIT" idMethod="idbroker" >
> > > >   <column name="UNIT_ID" required="true" primaryKey="true"
> > > >           autoIncrement="true" type="INTEGER"/>
> > > >   ...
> > > > </table>
> > > >
> > > > Thanks.
> > > >
> > > > Emmanuel.
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > <ma...@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > > <ma...@jakarta.apache.org>
> > > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
'
 Heiko Braun
 Software Development

 Java, Open Source



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


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


RE: Importing data in Torque&IdBroker

Posted by Heiko Braun <he...@hlan.org>.
Ok. now i understand.
But i actually have no idea how
the idBroker handles cases like this.
I guess you run into a lot of problems,..

;)

Are you doing the imports via torque aswell?



Am Fre, 2002-02-08 um 15.13 schrieb Emmanuel Bardet:
> Thanks Heiko for your reply. I do want to keep idbroker for the table except
> when I import a file where the key is provided which happens from time to
> time. Are you suggesting I should maintain 2 ******-schema.xml files ?
> 
> > -----Original Message-----
> > From: Heiko Braun [mailto:heiko@hlan.org]
> > Sent: vendredi 8 février 2002 15:03
> > To: Turbine Users List
> > Subject: Re: Importing data in Torque&IdBroker
> >
> >
> > possible values for the idMethod attribute are:
> > idBroker, native, autoincrement, sequence, none, null.
> > choose the one which pleases you most.
> >
> > take a look at "source/dtd/database.dtd" for more information.
> > the file is included in the turbine source distribution.
> >
> > /Heiko
> >
> >
> > Am Fre, 2002-02-08 um 14.51 schrieb Emmanuel Bardet:
> > > Hello all,
> > >
> > > I need to import data in a table on which the idbroker generates primary
> > > keys. This is fine except that I need to keep the primary key
> > provided with
> > > the import file. How do I tell Torque not to use the idbroker for those
> > > inserts ?
> > >
> > > <table name="TAR_MENU_UNIT" idMethod="idbroker" >
> > >   <column name="UNIT_ID" required="true" primaryKey="true"
> > >           autoIncrement="true" type="INTEGER"/>
> > >   ...
> > > </table>
> > >
> > > Thanks.
> > >
> > > Emmanuel.
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
-- 
'
 Heiko Braun
 Software Development

 Java, Open Source
 


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


RE: Importing data in Torque&IdBroker

Posted by Heiko Braun <he...@hlan.org>.
Ok. now i understand.
But i actually have no idea how
the idBroker handles cases like this.
I guess you run into a lot of problems,..

;)

Are you doing the imports via torque aswell?



Am Fre, 2002-02-08 um 15.13 schrieb Emmanuel Bardet:
> Thanks Heiko for your reply. I do want to keep idbroker for the table except
> when I import a file where the key is provided which happens from time to
> time. Are you suggesting I should maintain 2 ******-schema.xml files ?
> 
> > -----Original Message-----
> > From: Heiko Braun [mailto:heiko@hlan.org]
> > Sent: vendredi 8 février 2002 15:03
> > To: Turbine Users List
> > Subject: Re: Importing data in Torque&IdBroker
> >
> >
> > possible values for the idMethod attribute are:
> > idBroker, native, autoincrement, sequence, none, null.
> > choose the one which pleases you most.
> >
> > take a look at "source/dtd/database.dtd" for more information.
> > the file is included in the turbine source distribution.
> >
> > /Heiko
> >
> >
> > Am Fre, 2002-02-08 um 14.51 schrieb Emmanuel Bardet:
> > > Hello all,
> > >
> > > I need to import data in a table on which the idbroker generates primary
> > > keys. This is fine except that I need to keep the primary key
> > provided with
> > > the import file. How do I tell Torque not to use the idbroker for those
> > > inserts ?
> > >
> > > <table name="TAR_MENU_UNIT" idMethod="idbroker" >
> > >   <column name="UNIT_ID" required="true" primaryKey="true"
> > >           autoIncrement="true" type="INTEGER"/>
> > >   ...
> > > </table>
> > >
> > > Thanks.
> > >
> > > Emmanuel.
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
-- 
'
 Heiko Braun
 Software Development

 Java, Open Source
 


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


RE: Importing data in Torque&IdBroker

Posted by Heiko Braun <he...@hlan.org>.
Ok. now i understand.
But i actually have no idea how
the idBroker handles cases like this.
I guess you run into a lot of problems,..

;)

Are you doing the imports via torque aswell?



Am Fre, 2002-02-08 um 15.13 schrieb Emmanuel Bardet:
> Thanks Heiko for your reply. I do want to keep idbroker for the table except
> when I import a file where the key is provided which happens from time to
> time. Are you suggesting I should maintain 2 ******-schema.xml files ?
> 
> > -----Original Message-----
> > From: Heiko Braun [mailto:heiko@hlan.org]
> > Sent: vendredi 8 février 2002 15:03
> > To: Turbine Users List
> > Subject: Re: Importing data in Torque&IdBroker
> >
> >
> > possible values for the idMethod attribute are:
> > idBroker, native, autoincrement, sequence, none, null.
> > choose the one which pleases you most.
> >
> > take a look at "source/dtd/database.dtd" for more information.
> > the file is included in the turbine source distribution.
> >
> > /Heiko
> >
> >
> > Am Fre, 2002-02-08 um 14.51 schrieb Emmanuel Bardet:
> > > Hello all,
> > >
> > > I need to import data in a table on which the idbroker generates primary
> > > keys. This is fine except that I need to keep the primary key
> > provided with
> > > the import file. How do I tell Torque not to use the idbroker for those
> > > inserts ?
> > >
> > > <table name="TAR_MENU_UNIT" idMethod="idbroker" >
> > >   <column name="UNIT_ID" required="true" primaryKey="true"
> > >           autoIncrement="true" type="INTEGER"/>
> > >   ...
> > > </table>
> > >
> > > Thanks.
> > >
> > > Emmanuel.
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
-- 
'
 Heiko Braun
 Software Development

 Java, Open Source
 


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


RE: Importing data in Torque&IdBroker

Posted by Heiko Braun <he...@hlan.org>.
Ok. now i understand.
But i actually have no idea how
the idBroker handles cases like this.
I guess you run into a lot of problems,..

;)

Are you doing the imports via torque aswell?



Am Fre, 2002-02-08 um 15.13 schrieb Emmanuel Bardet:
> Thanks Heiko for your reply. I do want to keep idbroker for the table except
> when I import a file where the key is provided which happens from time to
> time. Are you suggesting I should maintain 2 ******-schema.xml files ?
> 
> > -----Original Message-----
> > From: Heiko Braun [mailto:heiko@hlan.org]
> > Sent: vendredi 8 février 2002 15:03
> > To: Turbine Users List
> > Subject: Re: Importing data in Torque&IdBroker
> >
> >
> > possible values for the idMethod attribute are:
> > idBroker, native, autoincrement, sequence, none, null.
> > choose the one which pleases you most.
> >
> > take a look at "source/dtd/database.dtd" for more information.
> > the file is included in the turbine source distribution.
> >
> > /Heiko
> >
> >
> > Am Fre, 2002-02-08 um 14.51 schrieb Emmanuel Bardet:
> > > Hello all,
> > >
> > > I need to import data in a table on which the idbroker generates primary
> > > keys. This is fine except that I need to keep the primary key
> > provided with
> > > the import file. How do I tell Torque not to use the idbroker for those
> > > inserts ?
> > >
> > > <table name="TAR_MENU_UNIT" idMethod="idbroker" >
> > >   <column name="UNIT_ID" required="true" primaryKey="true"
> > >           autoIncrement="true" type="INTEGER"/>
> > >   ...
> > > </table>
> > >
> > > Thanks.
> > >
> > > Emmanuel.
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
-- 
'
 Heiko Braun
 Software Development

 Java, Open Source
 


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


RE: Importing data in Torque&IdBroker

Posted by Heiko Braun <he...@hlan.org>.
Ok. now i understand.
But i actually have no idea how
the idBroker handles cases like this.
I guess you run into a lot of problems,..

;)

Are you doing the imports via torque aswell?



Am Fre, 2002-02-08 um 15.13 schrieb Emmanuel Bardet:
> Thanks Heiko for your reply. I do want to keep idbroker for the table except
> when I import a file where the key is provided which happens from time to
> time. Are you suggesting I should maintain 2 ******-schema.xml files ?
> 
> > -----Original Message-----
> > From: Heiko Braun [mailto:heiko@hlan.org]
> > Sent: vendredi 8 février 2002 15:03
> > To: Turbine Users List
> > Subject: Re: Importing data in Torque&IdBroker
> >
> >
> > possible values for the idMethod attribute are:
> > idBroker, native, autoincrement, sequence, none, null.
> > choose the one which pleases you most.
> >
> > take a look at "source/dtd/database.dtd" for more information.
> > the file is included in the turbine source distribution.
> >
> > /Heiko
> >
> >
> > Am Fre, 2002-02-08 um 14.51 schrieb Emmanuel Bardet:
> > > Hello all,
> > >
> > > I need to import data in a table on which the idbroker generates primary
> > > keys. This is fine except that I need to keep the primary key
> > provided with
> > > the import file. How do I tell Torque not to use the idbroker for those
> > > inserts ?
> > >
> > > <table name="TAR_MENU_UNIT" idMethod="idbroker" >
> > >   <column name="UNIT_ID" required="true" primaryKey="true"
> > >           autoIncrement="true" type="INTEGER"/>
> > >   ...
> > > </table>
> > >
> > > Thanks.
> > >
> > > Emmanuel.
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
-- 
'
 Heiko Braun
 Software Development

 Java, Open Source
 


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


RE: Importing data in Torque&IdBroker

Posted by Heiko Braun <he...@hlan.org>.
Ok. now i understand.
But i actually have no idea how
the idBroker handles cases like this.
I guess you run into a lot of problems,..

;)

Are you doing the imports via torque aswell?



Am Fre, 2002-02-08 um 15.13 schrieb Emmanuel Bardet:
> Thanks Heiko for your reply. I do want to keep idbroker for the table except
> when I import a file where the key is provided which happens from time to
> time. Are you suggesting I should maintain 2 ******-schema.xml files ?
> 
> > -----Original Message-----
> > From: Heiko Braun [mailto:heiko@hlan.org]
> > Sent: vendredi 8 février 2002 15:03
> > To: Turbine Users List
> > Subject: Re: Importing data in Torque&IdBroker
> >
> >
> > possible values for the idMethod attribute are:
> > idBroker, native, autoincrement, sequence, none, null.
> > choose the one which pleases you most.
> >
> > take a look at "source/dtd/database.dtd" for more information.
> > the file is included in the turbine source distribution.
> >
> > /Heiko
> >
> >
> > Am Fre, 2002-02-08 um 14.51 schrieb Emmanuel Bardet:
> > > Hello all,
> > >
> > > I need to import data in a table on which the idbroker generates primary
> > > keys. This is fine except that I need to keep the primary key
> > provided with
> > > the import file. How do I tell Torque not to use the idbroker for those
> > > inserts ?
> > >
> > > <table name="TAR_MENU_UNIT" idMethod="idbroker" >
> > >   <column name="UNIT_ID" required="true" primaryKey="true"
> > >           autoIncrement="true" type="INTEGER"/>
> > >   ...
> > > </table>
> > >
> > > Thanks.
> > >
> > > Emmanuel.
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
-- 
'
 Heiko Braun
 Software Development

 Java, Open Source
 


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


RE: Importing data in Torque&IdBroker

Posted by Emmanuel Bardet <em...@bardet.org>.
Thanks Heiko for your reply. I do want to keep idbroker for the table except
when I import a file where the key is provided which happens from time to
time. Are you suggesting I should maintain 2 ******-schema.xml files ?

> -----Original Message-----
> From: Heiko Braun [mailto:heiko@hlan.org]
> Sent: vendredi 8 février 2002 15:03
> To: Turbine Users List
> Subject: Re: Importing data in Torque&IdBroker
>
>
> possible values for the idMethod attribute are:
> idBroker, native, autoincrement, sequence, none, null.
> choose the one which pleases you most.
>
> take a look at "source/dtd/database.dtd" for more information.
> the file is included in the turbine source distribution.
>
> /Heiko
>
>
> Am Fre, 2002-02-08 um 14.51 schrieb Emmanuel Bardet:
> > Hello all,
> >
> > I need to import data in a table on which the idbroker generates primary
> > keys. This is fine except that I need to keep the primary key
> provided with
> > the import file. How do I tell Torque not to use the idbroker for those
> > inserts ?
> >
> > <table name="TAR_MENU_UNIT" idMethod="idbroker" >
> >   <column name="UNIT_ID" required="true" primaryKey="true"
> >           autoIncrement="true" type="INTEGER"/>
> >   ...
> > </table>
> >
> > Thanks.
> >
> > Emmanuel.
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



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


Re: Importing data in Torque&IdBroker

Posted by Heiko Braun <he...@hlan.org>.
possible values for the idMethod attribute are:
idBroker, native, autoincrement, sequence, none, null.
choose the one which pleases you most.

take a look at "source/dtd/database.dtd" for more information.
the file is included in the turbine source distribution.

/Heiko 


Am Fre, 2002-02-08 um 14.51 schrieb Emmanuel Bardet:
> Hello all,
> 
> I need to import data in a table on which the idbroker generates primary
> keys. This is fine except that I need to keep the primary key provided with
> the import file. How do I tell Torque not to use the idbroker for those
> inserts ?
> 
> <table name="TAR_MENU_UNIT" idMethod="idbroker" >
>   <column name="UNIT_ID" required="true" primaryKey="true"
>           autoIncrement="true" type="INTEGER"/>
>   ...
> </table>
> 
> Thanks.
> 
> Emmanuel.
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 



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


Importing data in Torque&IdBroker

Posted by Emmanuel Bardet <em...@bardet.org>.
Hello all,

I need to import data in a table on which the idbroker generates primary
keys. This is fine except that I need to keep the primary key provided with
the import file. How do I tell Torque not to use the idbroker for those
inserts ?

<table name="TAR_MENU_UNIT" idMethod="idbroker" >
  <column name="UNIT_ID" required="true" primaryKey="true"
          autoIncrement="true" type="INTEGER"/>
  ...
</table>

Thanks.

Emmanuel.


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