--- Michael O'Connor <[EMAIL PROTECTED]> wrote:
> Hi there -
> 
> I'm still having problems writing templates - hope
> someone can help..
> 
> In my EJB class (the EJB is called "Gebruiker") I
> have the following xdoclet
> tags:
> 
>    @ejb:bean name="Gebruiker" type="CMP"
> primkey-field="userId"
>    @ejb:pk class="java.lang.Integer"
> 
> And in my template I am trying to construct a line
> of java source such as:
> 
>     public GebruikerData getGebruiker(Integer id) {
> 
> The template I'm writing so far is this:
> 
>     public <XDtEjb:ejbName/>Data
> get<XDtEjb:ejbName/>(<XDtEjbPk:pkClass/>
> <XDtEjbPk:pkfieldList/>) {
> 
> And this is producing the output:
> 
>     public GebruikerData
> getGebruiker(java.lang.Integer ) {

It works properly.  You liked to have pk class, 
you got pk class ( integer ), after it you liked to 
have list of pk fields ( which you did not specified
on getters at all, because you are using @ejb.pk
class="foo"  -  so this list is pretty empty )



> So - I can't seem to get hold of the *name* of the
> primary key (just the
> one, "id" in this case).  I can see in the
> documentation that there are
> extra EjbPk tags such as "primkeyField" and
> "primkeyGetter" but these
> methods don't exist in my
> xdoclet.jar-->xdoclet.ejb.tags.PkTagsHandler (I
> suppose I have an old version..?)
> 
> I decompiled the xdoclet.ejb.tags.PkTagsHandler that
> I do have, and the
> pkfieldList method is looking for an xdoclet-tag
> "ejb:pk-field", but if I
> add one to my EJB source - still no luck...

I would suggest your to get your inspiration  from 
entitypk.xdt  ( which generates PK, and contains all 
the usefull template tags for it )

regards,

=====
Konstantin Priblouda ( ko5tik )    Freelance Software developer
< http://www.pribluda.de > < play java games -> http://www.yook.de >
< render charts online -> http://www.pribluda.de/povray/ >

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to