turbine-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xavier Ottolini <xavier.ottol...@qualipse.fr>
Subject Re: Intake: meaning of $myForm.setQueryKey("abc") ??
Date Mon, 03 Feb 2003 07:45:05 GMT
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


Mime
View raw message