> On Thu, 20 Sep 2001, Christian Royle wrote:
>
> > A case statement is undoubtedly the best/simplest logic for this
> > implementation.
> >
> > IMHO, if you are going to address the browser 'type', then you might
> > consider extending the taglib to include at least an appropriate
> > sub-set of other client-side properties.
>
> Quick thought:
>
> Perhaps this logic could be integrated with with JSPTL's currently planned
> mechanisms for conditional logic? In other words, instead of introducing
> a tag that supports syntax like
>
> <useragent:if browser="netscape" version="5">
>
> a tag could expose a data structure that describes the browser. Then,
> later in the page, JSPTL's <if> and <choose>/<when>/<otherwise> tags could
> traverse this data structure. E.g.,
>
> <useragent var="browser"/>
>
> ...
>
> <jx:choose>
> <jx:when test='$browser.type="netscape"'> ... </jx:when>
> </jx:choose>
Sounds good to me. Then the 'browser bean' that gets exposed could have all
kinds of useful properties that can be used to choose which content &
display is output. The 'browser bean' could be useful outside of the taglib,
for example in MVC controller servets too.
James
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com