The combined usage with jsptl is a nice idea - all tag libs could start to
go this way? Are there any issues? I'm sure it would hamper forte's auto
completion assistance ;)

I guess a partially dual approach could be a nice alternative - have a few
useragent tags, such as simple ifs, or whatever becomes useful/necessary.
But expose the more detailed/complicated functionality through the bean and
jsptl; thus reducing the syntax to learn (and build) as you suggest.


An existing browser determination bean would be a good place to start,
assuming that the licenses et al are correct... doesn't Cocoon do something
like this as well?

k@rl

----- Original Message -----
From: "Shawn Bayern" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 21, 2001 4:24 AM
Subject: RE: Browser detection taglib


> 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>
>
> Shawn
>

Reply via email to