You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by "Michael C. Starkie" <mi...@michaelstarkie.com> on 2003/03/14 22:47:14 UTC

foreign key, how to get?

I modified the sample newapp so that when an entry is inserted 
from the page generated by the Insert.vm macro the resulting page
displays all the entries as well as a link to add an entry to a table
that contains a foreign key reference to the original RDF table.  How
do I get the RDF_ID key from the original table so I can insert it
into the new table as a foreign key?  When I use the macro below the 
foreign key is null:

$page.setTitle("InsertTask")

meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/head

body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"
form method="post" action="$link.setPage("IndexTask.vm").setAction("SQLTask")"
  div align="left"
    table bgcolor="#ffffff" cellpadding="5"
      tr
        #formCell ("Description" "description" "")
      /tr
      tr
        #formCell ("StartDate" "startdate" "")
      /tr
      tr
        #formCell ("EndDate" "enddate" "")
      /tr
      tr
        #formCell ("StatusId" "statusid" "")
      /tr
      tr
        #formCell ("Implementor" "implementor" "")
      /tr
    /table
    input type="submit" name="eventSubmit_doInsert" value="Insert"/
  /div
/form


Re: foreign key, how to get?

Posted by Eric Emminger <er...@ericemminger.com>.
Michael

It looks like you're putting <body> tags in your vm files. As long as 
you're using a regular screen class, the only markup in your vm files 
should be whatever would normally appear inside the body tag. Velocity 
will handle the rest for you.

Also, please try to get your email program to send messages correctly. 
It's dropping the less-than and greater-than chars.

Eric

Michael C. Starkie wrote:
> I modified the sample newapp so that when an entry is inserted 
> from the page generated by the Insert.vm macro the resulting page
> displays all the entries as well as a link to add an entry to a table
> that contains a foreign key reference to the original RDF table.  How
> do I get the RDF_ID key from the original table so I can insert it
> into the new table as a foreign key?  When I use the macro below the 
> foreign key is null:
> 
> $page.setTitle("InsertTask")
> 
> meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
> /head
> 
> body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"
> form method="post" action="$link.setPage("IndexTask.vm").setAction("SQLTask")"
>   div align="left"
>     table bgcolor="#ffffff" cellpadding="5"
>       tr
>         #formCell ("Description" "description" "")
>       /tr
>       tr
>         #formCell ("StartDate" "startdate" "")
>       /tr
>       tr
>         #formCell ("EndDate" "enddate" "")
>       /tr
>       tr
>         #formCell ("StatusId" "statusid" "")
>       /tr
>       tr
>         #formCell ("Implementor" "implementor" "")
>       /tr
>     /table
>     input type="submit" name="eventSubmit_doInsert" value="Insert"/
>   /div
> /form
> 


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