You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Marc Lustig <ma...@marclustig.com> on 2003/01/31 22:31:53 UTC

Intake: meaning of $myForm.setQueryKey("abc") ??

Hi,
I have some trouble with mapping a form to a torque-object and then updating
it. In the howto I read this:
#set($loginForm = $mytool.getLoginFormInstance())
$loginForm.setQueryKey("abc")
#set($loginGroup = $intake.LoginGroup.mapTo($loginForm))

What I don't understand here is the line $loginForm.setQueryKey("abc")
Why should I assign the object (that exists already in the database) a new
primary key?? I don't want to change the PK! How is this related to mapping
the form against the object?

I'd grateful if somebody sheds light on this.

Marc


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


Re: AW: Intake: meaning of $myForm.setQueryKey("abc") ??

Posted by Scott Eade <se...@backstagetech.com.au>.
On 3/02/2003 7:26 PM, "Marc Lustig" <ma...@marclustig.com> wrote:

> Scott, if the "wiki" format is the standard for submitting a doc, why don't
> you write a wiki-howto and put it on the web-site, so that all turbine-users
> are aware of it and can contribute.

The wiki is a useful tool for developing documentation but the official
documentation will always be on the sites themselves.

IMO a wiki howto is unnecessary (there are tonnes of documents on how to use
a wiki available already).  A wiki is very easy to use and the minimal
effort required to understand the concepts involved is the least we can all
do in order to make a contribution.

If you use turbine, like it and perhaps derive benefits from it then you
should want to make contributions, no matter how small, back to the turbine
community.  This is how projects stay alive and hopefully grow.

Contributing answers to the list is a great way to give back to the
community, contributing to the wiki is arguably better, contributing patches
to the xdocs and the code itself is obviously even better.

It is really easy to moan that the documentation could be better - everyone
did this a couple of months ago and the consensus that a wiki would be a
great way to allow everyone to contribute towards the documentation.
Whether or not it is a success is a shared responsibility.

Note that Quinton has already added a link to the howto documents housed on
the wiki.  Perhaps we should put a further link to the relevant wiki pages
in the top level menus for the turbine sites.

Cheers,

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


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


AW: Intake: meaning of $myForm.setQueryKey("abc") ??

Posted by Marc Lustig <ma...@marclustig.com>.
Scott, if the "wiki" format is the standard for submitting a doc, why don't
you write a wiki-howto and put it on the web-site, so that all turbine-users
are aware of it and can contribute.


> -----Ursprungliche Nachricht-----
> Von: Scott Eade [mailto:seade@backstagetech.com.au]
> Gesendet: Montag, 3. Februar 2003 09:12
> An: turbine-user
> Betreff: Re: Intake: meaning of $myForm.setQueryKey("abc") ??
>
>
> On 3/02/2003 6:45 PM, "Xavier Ottolini"
> <xa...@qualipse.fr> wrote:
>
> > It would be great if the explanations were as good in the
> Turbine Web site.
> >
> > Xavier
>
> Patches and wiki contributions are most welcome.
>
> Scott
> --
> Scott Eade
> Backstage Technologies Pty. Ltd.
> http://www.backstagetech.com.au
> .Mac Chat/AIM: seade at mac dot 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: Intake: meaning of $myForm.setQueryKey("abc") ??

Posted by Scott Eade <se...@backstagetech.com.au>.
On 3/02/2003 6:45 PM, "Xavier Ottolini" <xa...@qualipse.fr> wrote:

> It would be great if the explanations were as good in the Turbine Web site.
> 
> Xavier

Patches and wiki contributions are most welcome.

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


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


Re: Intake: meaning of $myForm.setQueryKey("abc") ??

Posted by Xavier Ottolini <xa...@qualipse.fr>.
It would be great if the explanations were as good in the Turbine Web site.

Xavier

Bill wrote:

>Marc
>
>If the object you are mapping does exist, you do not need to set the
>query key.
>
>I'm including some example code that we use:
>
>#if( $member )
>    #set($Member = $intake.Member.mapTo($member) )
>#else
>    #set($Member = $intake.Member.Default )
>#end
>
>The screen class for each template places the necessary objects in the
>context (e.g. member) so the template can access them.  This allows us
>to use the same form for creation and editing.
>
>Hope that helps...
>
>-b
>
>
>On Fri, 2003-01-31 at 16:31, Marc Lustig wrote:
>  
>
>>Hi,
>>I have some trouble with mapping a form to a torque-object and then updating
>>it. In the howto I read this:
>>#set($loginForm = $mytool.getLoginFormInstance())
>>$loginForm.setQueryKey("abc")
>>#set($loginGroup = $intake.LoginGroup.mapTo($loginForm))
>>
>>What I don't understand here is the line $loginForm.setQueryKey("abc")
>>Why should I assign the object (that exists already in the database) a new
>>primary key?? I don't want to change the PK! How is this related to mapping
>>the form against the object?
>>
>>I'd grateful if somebody sheds light on this.
>>
>>Marc
>>
>>
>>---------------------------------------------------------------------
>>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
>
>  
>



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


Re: Intake: meaning of $myForm.setQueryKey("abc") ??

Posted by Bill <bh...@collaborativefusion.com>.
Marc

If the object you are mapping does exist, you do not need to set the
query key.

I'm including some example code that we use:

#if( $member )
    #set($Member = $intake.Member.mapTo($member) )
#else
    #set($Member = $intake.Member.Default )
#end

The screen class for each template places the necessary objects in the
context (e.g. member) so the template can access them.  This allows us
to use the same form for creation and editing.

Hope that helps...

-b


On Fri, 2003-01-31 at 16:31, Marc Lustig wrote:
> Hi,
> I have some trouble with mapping a form to a torque-object and then updating
> it. In the howto I read this:
> #set($loginForm = $mytool.getLoginFormInstance())
> $loginForm.setQueryKey("abc")
> #set($loginGroup = $intake.LoginGroup.mapTo($loginForm))
> 
> What I don't understand here is the line $loginForm.setQueryKey("abc")
> Why should I assign the object (that exists already in the database) a new
> primary key?? I don't want to change the PK! How is this related to mapping
> the form against the object?
> 
> I'd grateful if somebody sheds light on this.
> 
> Marc
> 
> 
> ---------------------------------------------------------------------
> 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