(I could be wrong, as I really don't consider myself much more than a
Value Stack / OGNL n00b)

I think it just resolves it against the value stack, which the
variable was pushed onto by his s:url... This would be my assumption
as I have used it to create links like this -

<s:url id="someUrl" value="..." />
<a href="%{someUrl}">..</a>

Of course, just because it works, doesn't mean that my understanding
is correct :)

What looks goofy to me is that I've only used the '#' to refer to
specific objects in OGNL such as #request, #session, etc. I also know
that the '#' char is behind a few problems related to ELs clashing.

-Wes

On 10/6/07, Dave Newton <[EMAIL PROTECTED]> wrote:
> %{statesUrl} would try to resolve against the action,
> not the named object created by <s:url...>, no?
>
> --- Wes Wannemacher <[EMAIL PROTECTED]> wrote:
>
> > Ted,
> >
> > Did you play around with the href= in your
> > yui:autocomleter? The %{#
> > doesn't look right to me, I would think that
> > %{statesUrl} should be
> > enough.
> >
> > -W
> >
> > On 10/6/07, Musachy Barroso <[EMAIL PROTECTED]>
> > wrote:
> > > is the action returning the expected JSON? The
> > easiest way to debug
> > > problems is to just copy the generated javascript
> > to your jsp and play
> > > with it (really small js section), and compare it
> > to what the YUI docs
> > > say. Make sure that no css is getting applied to
> > the autocompleter
> > > element, as that sometimes makes a mess.
> > >
> > > I gave you access to svn so if you find a
> > problem..well you know ;)
> > >
> > > musachy
> > >
> > > On 10/6/07, Ted Husted <[EMAIL PROTECTED]> wrote:
> > > > I've got the YUI datepicker up easy enough, but
> > I'm having trouble
> > > > with the autocompleter. I tried to adopt the
> > starter code from the
> > > > wiki, but when I open the JSP, I only get a text
> > input field and a
> > > > submit button. No select. In the MyEclipse Web
> > 2.0 browser, I can see
> > > > the "query" request run, but the list is not
> > displayed. Here's what I
> > > > have. (I'll post a WAR if it helps.)
> > > >
> > > > <%@ taglib prefix="yui" uri="/struts-yui-tags"
> > %>
> > > > <%@ taglib prefix="s" uri="/struts-tags" %>
> > > > <html>
> > > > <head>
> > > >     <yui:head autocompleter="true"
> > datepicker="true" />
> > > > </head>
> > > >
> > > > <body>
> > > >     <s:url id="statesUrl" action="autocompleter"
> > includeParams='none'/>
> > > >     <s:form action="autocompleter">
> > > >         <yui:autocompleter id="state"
> > name="state"
> > > > href="%{#statesUrl}"
> > containerCssStyle="width:100px" />
> > > >         <s:submit />
> > > >     </s:form>
> > > > </body>
> > > > </html>
> > > >
> > > > <package name="yui" extends="json-default">
> > > >      <action name="autocompleter"
> > class="actions.Autocompleter">
> > > >          <result type="json">
> > > >               <param name="root">options</param>
> > > >          </result>
> > > >      </action>
> > > > </package>
> > > >
> > > > package actions;
> > > > import
> >
> com.googlecode.struts2yuiplugin.json.AutocompleterResult;
> > > > import com.opensymphony.xwork2.ActionSupport;
> > > > import java.util.Date;
> > > > public class Autocompleter extends ActionSupport
> > {
> > > >     public String loadOptions() {
> > > >         return SUCCESS;
> > > >     }
> > > >     public AutocompleterResult getOptions() {
> > > >         AutocompleterResult result = new
> > AutocompleterResult();
> > > >         if (query.equals("A")) {
> > > >             result.add("AL", "Alabama");
> > > >             result.add("AK", "Alaska");
> > > >         }
> > > >         return result;
> > > >     }
> > > >     private String state;
> > > >     public void setState(String value) {
> > > >         state = value;
> > > >     }
> > > >     private String stateKey;
> > > >     public void setStateKey(String value) {
> > > >         stateKey = value;
> > > >     }
> > > >     private String query;
> > > >     public void setQuery(String value) {
> > > >         query = value;
> > > >     }
> > > > }
> > > >
> > > > Any insight would be appreciated!
> > > >
> > > > TIA, Ted.
> > > >
> > > >
> >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > > > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > > --
> > > "Hey you! Would you help me to carry the stone?"
> > Pink Floyd
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > Wesley Wannemacher
> > President, Head Engineer/Consultant
> > WanTii, Inc.
> > http://www.wantii.com
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to