Actually, I prefer "both" rather than "local,remote".
But that's not what my point was. It was more of, do we take the
valid_values and split them. Or do what it's doing now, which is take
the field value and index into valid_values.
But now, an aditional issue. Do we split up the tag value also? I don't
think we should. Is there any case where we allow multiple values for
the same tag? (ie view-type="local,remote") (yes i know this doesn't
work. it's just an example)
IMHO, valid_values should have been a String[] with each value seperate.
the way it is now limits the content of what's valid (ie: no commas can
be present in the value). Not to mention the performance hit we get for
tokenizing the same strings over and over.
-David
On Thu, 31 Jan 2002, Dmitri Colebatch wrote:
> I was noticing this the other day. in InterfaceTagsHandler.isInterfaceMethod we have
>
> if( "both".equals( viewType ) )
> {
> viewType = "local,remote";
> }
>
> so at a method level, you can use local,remote or both. but, in
>LocalInterfaceSubTask.matchesGenerationRules we check for
>
> if( ( generate != null ) && ( generate.indexOf( "local" ) == -1 ) )
>
> so we have a little inconsistancy here.
>
> What do people prefer? By the sounds of it David prefers "both" and Ara
>"local,remote" (o: it wouldn't be too hard to support
> both "both" and "local,remote", but the code needs a little refactoring there (I can
>make time for this tonight if we agree on it
> today).
>
> thoughts?
>
> cheers
> dim
>
> ps - Ara, I got Jerome's stuff just before I left for work this morning, and will
>get that in tonight as well.
>
> ----- Original Message -----
> From: "Ara Abrahamian" <[EMAIL PROTECTED]>
> To: "'David Budworth'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Thursday, January 31, 2002 8:11 AM
> Subject: RE: [Xdoclet-devel] ejb:bean view-type question
>
>
> > > I'm working on making the ejb:bean tags inheritable (and fixing all
> > > sorts of problems with figuring out what's local/remote/both).
> > >
> > > question is, is:
> > > @ejb:bean view-type="local,remote"
> > >
> > > Still valid?
> >
> > AFAIK "both" is legal, not "remote,local".
> >
> > > But the validator doesn't split up the value to see if each one is in
> > > the valid options string. It just does an indexof into the valid
> > > values.
> >
> > This is wrong. Yes we need to stringtokenize it by ",".
> >
> > > So, do I fix getTagValue to attempt to parse the values? Or we just
> > > don't support multiple tag values like this? (oh please, oh please,
> > say
> > > we just don't support it anymore)
> >
> > it's not a good practice to split values like that, but I think it's
> > better to keep/correct it than remove it.
> >
> > Ara.
> >
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > _______________________________________________
> > Xdoclet-devel mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/xdoclet-devel
> >
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel