List Info

Thread: RE: lookupIdByTagId and scope




RE: lookupIdByTagId and scope
user name
2007-05-24 14:45:52
The enhanced rewriteName tag makes more sense now, thanks.
As I
understand it, the trick is to use this tag in the JS script
block
instead of lookupIdByTagId().

Looks like the forTagId attribute is what we need. Guess
we'll have wait
for it to be released. Is there an ETA?

Thanks,
-- Srivathsan

-----Original Message-----
From: Carlin Rogers [mailto:carlin.rogersgmail.com] 
Sent: Wednesday, May 23, 2007 12:39 PM
To: Beehive Users
Subject: Re: lookupIdByTagId and scope

Hi Srivathsan,

Good questions. First note that the work for supporting
generating a
tag Id using <netui:rewriteName> is complete but not
yet released
(just to be clear to all the users). One scenario for using
<netui:rewriteName> would be to generate a tag Id as
an attribute of a
tag that you would like to be able to identify using the
NetUI
JavaScript routines. For instance, you could create a div
tag that
would have a NetUI rendered tag ID by writing...

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

Then a call can be made to lookupIdByTagId( "foo",
tag ) to find the
actual id of the div tag.

Also, a page developer may want to use the
"resultId" attribute to add
values to the PageContext attribute map.  Then, those values
can be
referenced using JSP EL or scriptlet. For example,

    <netui:rewriteName name="foo"
resultId="fooString"
forTagId="true"/>
    <div id="${pageScope.fooString}">
    </div>

In your case though, you don't have a tag to use so the
lookupIdByTagId() can identify the scoping and return to you
the
actual value (the real id) for a tagId name. However, if
your
JavaScript routine is rendered from the same page you could
just use
the rewriteName tag as it would render the actual value of
the scoped
tag Id for a given name. It would be the same as what you
get back
with a call to lookupIdByTagId() but without having to pass
in the a
scope reference.

Kind regards,
Carlin

On 5/22/07, Varadarajan, Srivathsan <SVaradarajantiaa-cref.org> wrote:
> Carlin,
>
> I did find a workaround using an <iframe>,
setting it src attribute to
> javascript:false; and using the onload event to obtain
a reference to
> the iframe and eventually a reference to the rendered
id of the
element
> (which is a sibling of the iframe) with a tagId. This
approach
bypasses
> the use of lookupIdByTagId.
>
> The enhanced <netui:rewriteName> doesn't help my
case since it still
> doesn't give me a scope reference to pass into
lookupByTagId.
>
> On a side note, when would you use
<netui:rewriteName> as opposed to
> just setting the tagId attribute on a netui html tag?
Only if you
don't
> want to use the netui html tag?
>
> -- Srivathsan
>
> -----Original Message-----
> From: Carlin Rogers [mailto:carlin.rogersgmail.com]
> Sent: Friday, May 11, 2007 4:44 PM
> To: Beehive Users
> Subject: Re: lookupIdByTagId and scope
>
> Hi Srivathsan,
>
> Did you figure out a way to do this? I assume that your
page fragment
> in the scriptContainer  requires scoping. If not, you
could do
> something like in the tagIdSupport.jsp sample in the
"Tags Support for
> JavaScript" document.
> http://beehive.apache.org/docs/1.0.2/netui/tags/j
avascript.html
>
> Otherwise, for a page that is made up of multiple
scoped
> scriptContainer elements, I think you'd want to use the
enhancement
> completed in BEEHIVE-1179. It's not part of a release
yet but is fixed
> in the main trunk of SVN for Beehive. The improvement
allows you to
> use the <netui:rewriteName> tag to generate a tag
Id from a name using
> the same scoping to participate in the NetUI JavaScript
scoping
> features. See...
> ht
tps://issues.apache.org/jira/browse/BEEHIVE-1179
>
> Kind regards,
> Carlin
>
> On 5/7/07, Varadarajan, Srivathsan <SVaradarajantiaa-cref.org> wrote:
> > I'm a little unclear on the scope parameter of
lookupIdByTagId(). In
> my
> > case, I don't have a button or link in the same
scope to use as a
> lookup
> > reference. I need to setup a JS object by using
lookupIdByTagId()
and
> > can do this only after the page loads so that the
framework
generated
> JS
> > is available. How do I get a reference to the
scope in script that
is
> > run on window load?
> >
> >
> >
> > Part of the problem I'm facing is due to the fact
that framework
> > generated JS is placed outside the scriptContainer
and not inside
the
> > scriptContainer along with the element that has a
tagId.
> >
> >
> >
> > Anyone faced this situation?
> >
> >
> >
> > -- Srivathsan
> >
> >
> > ******************************************
> > This message, including any attachments, contains
confidential
> information intended for a specific individual and
purpose, and is
> protected by law.  If you are not the intended
recipient, please
contact
> sender immediately by reply e-mail and destroy all
copies.  You are
> hereby notified that any disclosure, copying, or
distribution of this
> message, or the taking of any action based on it, is
strictly
> prohibited.
> > TIAA-CREF
> > ******************************************
> >
>
> ******************************************
> This message, including any attachments, contains
confidential
information intended for a specific individual and purpose,
and is
protected by law.  If you are not the intended recipient,
please contact
sender immediately by reply e-mail and destroy all copies. 
You are
hereby notified that any disclosure, copying, or
distribution of this
message, or the taking of any action based on it, is
strictly
prohibited.
> TIAA-CREF
> ******************************************
>

************************************************************
********************************
This message, including any attachments, contains
confidential information intended 
for a specific individual and purpose, and is protected by
law. If you are not the intended 
recipient, please contact the sender immediately by reply
e-mail and destroy all copies.
You are hereby notified that any disclosure, copying, or
distribution of this message, or
the taking of any action based on it, is strictly
prohibited.

TIAA-CREF
************************************************************
********************************

Re: lookupIdByTagId and scope
user name
2007-05-24 17:41:09
Hi Srivathsan,

Yes, that's correct. I think that should work for you.

I don't know of an ETA for the next official Apache Beehive
release
yet. It would probably just be a minor patch release. The
process is
for folks in the dev community to propose and plan the next
release,
determine what else needs to be included/excluded, then
prepare
release candidates and a vote by the PMC.

Kind regards,
Carlin

On 5/24/07, Varadarajan, Srivathsan <SVaradarajantiaa-cref.org> wrote:
> The enhanced rewriteName tag makes more sense now,
thanks. As I
> understand it, the trick is to use this tag in the JS
script block
> instead of lookupIdByTagId().
>
> Looks like the forTagId attribute is what we need.
Guess we'll have wait
> for it to be released. Is there an ETA?
>
> Thanks,
> -- Srivathsan
>
> -----Original Message-----
> From: Carlin Rogers [mailto:carlin.rogersgmail.com]
> Sent: Wednesday, May 23, 2007 12:39 PM
> To: Beehive Users
> Subject: Re: lookupIdByTagId and scope
>
> Hi Srivathsan,
>
> Good questions. First note that the work for supporting
generating a
> tag Id using <netui:rewriteName> is complete but
not yet released
> (just to be clear to all the users). One scenario for
using
> <netui:rewriteName> would be to generate a tag Id
as an attribute of a
> tag that you would like to be able to identify using
the NetUI
> JavaScript routines. For instance, you could create a
div tag that
> would have a NetUI rendered tag ID by writing...
>
>     <div id="<netui:rewriteName name='foo'
forTagId='true'/>">
>     </div>
>
> Then a call can be made to lookupIdByTagId(
"foo", tag ) to find the
> actual id of the div tag.
>
> Also, a page developer may want to use the
"resultId" attribute to add
> values to the PageContext attribute map.  Then, those
values can be
> referenced using JSP EL or scriptlet. For example,
>
>     <netui:rewriteName name="foo"
resultId="fooString"
forTagId="true"/>
>     <div id="${pageScope.fooString}">
>     </div>
>
> In your case though, you don't have a tag to use so
the
> lookupIdByTagId() can identify the scoping and return
to you the
> actual value (the real id) for a tagId name. However,
if your
> JavaScript routine is rendered from the same page you
could just use
> the rewriteName tag as it would render the actual value
of the scoped
> tag Id for a given name. It would be the same as what
you get back
> with a call to lookupIdByTagId() but without having to
pass in the a
> scope reference.
>
> Kind regards,
> Carlin
>
> On 5/22/07, Varadarajan, Srivathsan
<SVaradarajantiaa-cref.org> wrote:
> > Carlin,
> >
> > I did find a workaround using an <iframe>,
setting it src attribute to
> > javascript:false; and using the onload event to
obtain a reference to
> > the iframe and eventually a reference to the
rendered id of the
> element
> > (which is a sibling of the iframe) with a tagId.
This approach
> bypasses
> > the use of lookupIdByTagId.
> >
> > The enhanced <netui:rewriteName> doesn't
help my case since it still
> > doesn't give me a scope reference to pass into
lookupByTagId.
> >
> > On a side note, when would you use
<netui:rewriteName> as opposed to
> > just setting the tagId attribute on a netui html
tag? Only if you
> don't
> > want to use the netui html tag?
> >
> > -- Srivathsan
> >
> > -----Original Message-----
> > From: Carlin Rogers [mailto:carlin.rogersgmail.com]
> > Sent: Friday, May 11, 2007 4:44 PM
> > To: Beehive Users
> > Subject: Re: lookupIdByTagId and scope
> >
> > Hi Srivathsan,
> >
> > Did you figure out a way to do this? I assume that
your page fragment
> > in the scriptContainer  requires scoping. If not,
you could do
> > something like in the tagIdSupport.jsp sample in
the "Tags Support for
> > JavaScript" document.
> > http://beehive.apache.org/docs/1.0.2/netui/tags/j
avascript.html
> >
> > Otherwise, for a page that is made up of multiple
scoped
> > scriptContainer elements, I think you'd want to
use the enhancement
> > completed in BEEHIVE-1179. It's not part of a
release yet but is fixed
> > in the main trunk of SVN for Beehive. The
improvement allows you to
> > use the <netui:rewriteName> tag to generate
a tag Id from a name using
> > the same scoping to participate in the NetUI
JavaScript scoping
> > features. See...
> > ht
tps://issues.apache.org/jira/browse/BEEHIVE-1179
> >
> > Kind regards,
> > Carlin
> >
> > On 5/7/07, Varadarajan, Srivathsan
<SVaradarajantiaa-cref.org> wrote:
> > > I'm a little unclear on the scope parameter
of lookupIdByTagId(). In
> > my
> > > case, I don't have a button or link in the
same scope to use as a
> > lookup
> > > reference. I need to setup a JS object by
using lookupIdByTagId()
> and
> > > can do this only after the page loads so that
the framework
> generated
> > JS
> > > is available. How do I get a reference to the
scope in script that
> is
> > > run on window load?
> > >
> > >
> > >
> > > Part of the problem I'm facing is due to the
fact that framework
> > > generated JS is placed outside the
scriptContainer and not inside
> the
> > > scriptContainer along with the element that
has a tagId.
> > >
> > >
> > >
> > > Anyone faced this situation?
> > >
> > >
> > >
> > > -- Srivathsan
> > >
> > >
> > > ******************************************
> > > This message, including any attachments,
contains confidential
> > information intended for a specific individual and
purpose, and is
> > protected by law.  If you are not the intended
recipient, please
> contact
> > sender immediately by reply e-mail and destroy all
copies.  You are
> > hereby notified that any disclosure, copying, or
distribution of this
> > message, or the taking of any action based on it,
is strictly
> > prohibited.
> > > TIAA-CREF
> > > ******************************************
> > >
> >
> > ******************************************
> > This message, including any attachments, contains
confidential
> information intended for a specific individual and
purpose, and is
> protected by law.  If you are not the intended
recipient, please contact
> sender immediately by reply e-mail and destroy all
copies.  You are
> hereby notified that any disclosure, copying, or
distribution of this
> message, or the taking of any action based on it, is
strictly
> prohibited.
> > TIAA-CREF
> > ******************************************
> >
>
>
************************************************************
********************************
> This message, including any attachments, contains
confidential information intended
> for a specific individual and purpose, and is protected
by law. If you are not the intended
> recipient, please contact the sender immediately by
reply e-mail and destroy all copies.
> You are hereby notified that any disclosure, copying,
or distribution of this message, or
> the taking of any action based on it, is strictly
prohibited.
>
> TIAA-CREF
>
************************************************************
********************************
>

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )