struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty" <mgai...@hotmail.com>
Subject Re: S2: YUI plugin and autocompleter
Date Sat, 07 Oct 2000 00:09:27 GMT
which version webwork?
which version freemarker?
which version ognl?
whcih version xwork?
which version urlrewrite?
struts2-api (2.0.1)?
struts2-core (2.0.1)?

Thanks/
M--
----- Original Message ----- 
From: "Wes Wannemacher" <wesw@wantii.com>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Saturday, October 06, 2007 7:42 PM
Subject: Re: S2: YUI plugin and autocompleter


> (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 <newton.dave@yahoo.com> wrote:
> > %{statesUrl} would try to resolve against the action,
> > not the named object created by <s:url...>, no?
> >
> > --- Wes Wannemacher <wesw@wantii.com> 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 <musachy@gmail.com>
> > > 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 <husted@apache.org> 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:
> > > user-unsubscribe@struts.apache.org
> > > > > For additional commands, e-mail:
> > > user-help@struts.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > "Hey you! Would you help me to carry the stone?"
> > > Pink Floyd
> > > >
> > > >
> > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > user-unsubscribe@struts.apache.org
> > > > For additional commands, e-mail:
> > > user-help@struts.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Wesley Wannemacher
> > > President, Head Engineer/Consultant
> > > WanTii, Inc.
> > > http://www.wantii.com
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail:
> > > user-help@struts.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> 
> 
> -- 
> Wesley Wannemacher
> President, Head Engineer/Consultant
> WanTii, Inc.
> http://www.wantii.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message