beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlin Rogers" <carlin.rog...@gmail.com>
Subject Re: Add a new <netui:div> tag for additional client side JavaScript support
Date Wed, 13 Dec 2006 22:16:32 GMT
Yes, thanks. I've looked at SRS some.

So just to make sure I follow, the page developer would then be using
a tag to set an attribute of another tag. Something like...

<div id="<netui:rewriteName name='myFragDiv' forTagId='true'/>">
    ...
</div>

...or some other general tag other than rewriteName. Is that what you
were thinking? I guess my first thought was that it seemed a little
weird to use a tag to set an attribute of another tag but not a big
deal. What do you think?

Thanks again,
Carlin

On 12/13/06, Eddie O'Neil <ekoneil@gmail.com> wrote:
>   Maybe the ScriptRequestState object and use the "mapTagId" method
> would help here -- SRS is a nice data structure for tracking the
> mapping that's used to render the JavaScript that's ultimately written
> to the page.
>
>   HTH.
>
> Eddie
>
>
>
> On 12/13/06, Carlin Rogers <carlin.rogers@gmail.com> wrote:
> > OK, I'll take a look and see, though I'm not yet sure how to tie it
> > into generating the entries for the netui_tagIdNameMap for the script
> > container. My thought was that a tag that was mapped to an HTML
> > element like <div> could just leverage the existing tagId attribute
> > and script container support. It would basically extend the
> > HtmlBaseTag.
> >
> > Thanks for the feedback.
> > Carlin
> >
> > On 12/13/06, Eddie O'Neil <ekoneil@gmail.com> wrote:
> > >   That makes sense -- it seems like the same functionality be
> > > generally implemented by doing something similar to <rewriteName>
> > > which creates a scoped name, makes it available in the pageContext,
> > > and registers it with list of HTML ids to render.  How about a new
> > > rewriteName attribute or a new tag that does the same for page scoped
> > > names?
> > >
> > >   That would be a solution that could be used on all HTML tags.
> > >
> > > Eddie
> > >
> > >
> > > On 12/13/06, Carlin Rogers <carlin.rogers@gmail.com> wrote:
> > > > Eddie,
> > > >
> > > > Yes, correct. And in addition, if this was within a
> > > > <netui:scriptContainer generateIdScope="true">
> > > > ...
> > > > </netui:scriptContainer>
> > > >
> > > > the id would be scoped, so rendered like...
> > > >
> > > > <div id="n0.foo">...</div>
> > > >
> > > > Carlin
> > > >
> > > > On 12/13/06, Eddie O'Neil <ekoneil@gmail.com> wrote:
> > > > > Carlin--
> > > > >
> > > > >   Right -- you're talking about scoping in the page rather than
> > > > > scoping a request, though I'm still not sure I'm clear on the use
of
> > > > > the tag.
> > > > >
> > > > >   Is the goal to have a NetUI tag that renders a <div> which
is
> > > > > registered with the rendered tagId / id mapping JavaScript?  Something
> > > > > like:
> > > > >
> > > > >   <netui:div tagId="foo">
> > > > >     ....
> > > > >   </netui:div>
> > > > >
> > > > > that renders:
> > > > >
> > > > >   <div id="foo">...</div>
> > > > >
> > > > > along with the JavaScript to map the rendered <div> into the
> > > > > netui_names / netui_tagIdNameMap.
> > > > >
> > > > > Eddie
> > > > >
> > > > >
> > > > > On 12/13/06, Carlin Rogers <carlin.rogers@gmail.com> wrote:
> > > > > > Eddie,
> > > > > >
> > > > > > The <netui:rewriteName> tag is designed to participate
in URL
> > > > > > rewriting. Say in a portal, the URL rewriting is for the scoping
a
> > > > > > request to a portlet and just prepends the portlet scope to
a name.
> > > > > > This request scoping is different than the scoping generated
with the
> > > > > > NetUI tag and JavaScript support within <netui:scriptContainer
> > > > > > generateIdScope="true">. The tags generate a map in a page
for the
> > > > > > tagId attributes of NetUI tags and can scope them to the
> > > > > > scriptContainer tag... but it's a different scoping.
> > > > > >
> > > > > > The <netui:divPanel> tag is used as a dynamic client side
routine for
> > > > > > switching between different template sections within the panel.
At
> > > > > > first I thought this could be used but the generated id on the
> > > > > > rendered div tags doesn't seem to work for this case. I just
tried a
> > > > > > simple test. There may be a way to get this to go but still
does not
> > > > > > feel very intuitive as it involves using <netui-template:section>,
> > > > > > etc.
> > > > > >
> > > > > > Carlin
> > > > > >
> > > > > > On 12/13/06, Eddie O'Neil <ekoneil@gmail.com> wrote:
> > > > > > > Carlin--
> > > > > > >
> > > > > > >   Interesting idea, though I thought this could be accomplished
with a
> > > > > > > regular HTML <div>, the generated NetUI JavaScript,
and the
> > > > > > > <netui:rewriteName> tag.  For example, the type of
thing that's
> > > > > > > available here in "web/tags/rewriteTags/index.jsp".
> > > > > > >
> > > > > > >   Would the <netui:div> panel do something different?
> > > > > > >
> > > > > > > Eddie
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On 12/13/06, Carlin Rogers <carlin.rogers@gmail.com>
wrote:
> > > > > > > > At the moment there isn't an easy way to map a fragment
of markup with
> > > > > > > > a NetUI tag using a tagId to use with the NetUI client
side JavaScript
> > > > > > > > support. Most of the NetUI tags have the tagId attribute
for the
> > > > > > > > JavaScript support but the tags map to specific form
controls and
> > > > > > > > acnhors, etc.
> > > > > > > >
> > > > > > > > I'd like to propose adding a <netui:div> tag
to the set of NetUI HTML tags.
> > > > > > > >
> > > > > > > > One use case is a page using the NetUI tag scoping
of the generated
> > > > > > > > HTML id attributes and custom client side JavaScript
code that needs
> > > > > > > > to access a fragment of markup using the NetUI lookIdByTagId()
> > > > > > > > JavaScript function. The markup in the fragment may
not require or use
> > > > > > > > other NetUI tags. Something like...
> > > > > > > >
> > > > > > > > <netui:div tagId="myFragDiv">
> > > > > > > >   <someprefix:someTag ..."/>
> > > > > > > >   ...
> > > > > > > > </div>
> > > > > > > >
> > > > > > > > Any concerns or thoughts?
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > > Carlin
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Mime
View raw message