<br><br><div><span class="gmail_quote">On 10/6/05, <b class="gmail_sendername">Will Smith</b> <<a href="mailto:willbelair@yahoo.com">willbelair@yahoo.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Thanks, that's what i meant.</div>
<div>Another question that I hope i can get the answer from the expert:</div>
<div>- I have a DB of quite a few tables. Running scaffold is no
problem with every single table. Using has_a, has_many (not really
work) to display data is ok. But if I want to:</div>
<div>- Add an Artist (this is done by the <a href="http://add.tt" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">add.tt</a> created by Scaffold) and then add Cds that belong to that artist. My question is:
</div>
<div>1- Using CDBI can I call another sub in different Controller (e.g.
call [sub add_cd] in music::C::CDBI:: cd from
music::C::CDBI::artist in any sub using $c->foward(...) , not sure
what to put in ). I'm sure that I read this somewhere, but cannot
remember <br>
</div>
</blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>2- From <a href="http://add.tt" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
add.tt</a> in /Artist I add an artist, then how can I pass the artistid to the <a href="http://add.tt" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">add.tt</a> in /Cd.</div>
<div> </div>
<div>These are just simple relationship question, but I just can't figure out. Please help</div><br>
</blockquote></div><br>Hey Will. <br>
<br>
I think you are depending too much on the scaffolding at this point.
It's just meant to be a simple code generation tool to kick off your
application. If you want to do complex things like this, you'll have to
start modifying the templates. For example, you can make the cd add
template fill in artist automatically if it's called with a artistid as
a request param, and then add a add link which includes that param from
the artist view action.<br>
<br clear="all"><br>-- <br>With regards<br>Marcus Ramberg