[Fwd: Re: exposing script variables]

2001-05-21 Thread Peter Alfors
Thomas, I think that this might help. Pete Original Message Subject: Re: exposing script variables Date: Wed, 25 Apr 2001 09:20:02 -0500 From: Peter Alfors <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] Organization: HK Systems, Inc To: [EMAIL PROTECTED] Refe

Re: exposing script variables

2001-04-25 Thread Peter Alfors
Pierre, Morgan: Thank you VERY much! That is exactly what I needed. Pete Morgan Delagrange wrote: > (Pierre sent a related response as I was typing this, but I think it's > still helpful.) > > Ah, OK, I think I see what you're asking for now. Often when people > talk about scripting variabl

Re: exposing script variables

2001-04-24 Thread Morgan Delagrange
(Pierre sent a related response as I was typing this, but I think it's still helpful.) Ah, OK, I think I see what you're asking for now. Often when people talk about scripting variables, they're just talking about assigning attributes, but you want the real deal. OK, time to introduce you to th

Re: exposing script variables

2001-04-24 Thread Peter Alfors
Oops.. I miss-typed. Here is what I am currently doing: <% String organizationId = (String) organizationsBean.getColumn("ORGANIZATIONID"); %> The define tag retrieves the specified object from my own session management utility. The session scope in the define tag is different from the httpses

Re: exposing script variables

2001-04-24 Thread Pierre Delisle
Peter, Do you have a tagExtraInfo class associated with your tag? This is required to expose a scripting variable. For example, for the import tag (under xsl): public final class ImportTei extends TagExtraInfo { /** * Return information about the scripting variables to be created.

RE: exposing script variables

2001-04-24 Thread Morgan Delagrange
Actually, you did put your attribute in the session context. The findAttribute(String) method of the page context searches all the context (first page, then request, then session, then application) for your attribute. The alternative is the getAttribute(String) method of each scope, which only

Re: exposing script variables

2001-04-24 Thread Peter Alfors
Yep, that will work. However, I was hoping to mimic what the jsp:useBean tag does. I would like to reduce the amount of script code as much as possible. The jsp:useBean taglib somehow makes the variable accessible to the page without having to use pageContext.getAttribute(). Does anyone know how

RE: exposing script variables

2001-04-24 Thread Dave Newton
Hola, >> [...] This new tag needs to be able to make an object available as a scripting variable. [...] > String organizationId = pageContext.findAttribute("organizationsBean").getColumn("ORGANIZATIONID"); As a relative servlet/JSP newbie, I'm wondering why it would be better to put things in th

Re: exposing script variables

2001-04-24 Thread Morgan Delagrange
On Tue, 24 Apr 2001, Peter Alfors wrote: > Hello all, > > This is probably a simple question (hopefully) for you all. > I am writing a tag that is similar to jsp:useBean. > > This new tag needs to be able to make an object available as a scripting > variable. > example: > >