Error on Action, Form and on org.apache.struts names while changing .classpath file

2007-10-06 Thread Arunkumar Balasubramanian
 
Hi
 
 I was updating .classspath file as compatible to source code which I have 
inserted inside workspace. The reason for doing this is to make .classpath file 
compile java files and put in classes folder as specified. I was running in to 
issues like if I update .classpath file, then I am getting errors on Action, 
Form on names like Action, Form, request, response (guess the struts names are 
throwing errors here).
 
 Here is .classpath file which I have changed.
 








 - tried to change this path 
(but automatic compilation of code doesn't 
 occur here 
if I moved src out of WEB-INF



 
 I was trying some thing like not changing the .classpath file, rather arrange 
directories according to the file. But when I have Action or Form inside 
WEB_INF/src, error message appears on 
import org.apache.struts.action.*;
 
and on all other struts names like Action, request, response, etc...
 
  If any one could identify what the problem is and which one would be a 
solution for these kind of problems, that would be great.
 
 Thanks
 
 
 
 
_
Help yourself to FREE treats served up daily at the Messenger Café. Stop by 
today.
http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGLM_OctWLtagline

How to improve dojo performance in Struts 2.0.9

2007-10-06 Thread Jeromy Evans
I thought I'd share the instructions I prepared for creating a dojo 
0.4.2 custom profile for Struts 2.0.9.  The objective is to bundle all 
the required dojo resources into dojo.js to avoid the numerous slow 
sequential requests for resources. This makes a massive performance 
improvement to the default ajax theme.


Instructions for improving the performance of dojo 0.4.2 in Struts 2.0.9:

$resources$ is assumed to be your web resources directory

1. First, configure struts to serve the static files directly from 
$resources$/struts instead of from within struts-core-2.0.9.jar:
  
   a. extract struts2-core-2.0.9.jar/org/apache/struts2/static/* to 
$resources$/struts/

   b. edit struts.properties and set struts.serve.static=false
   c. also extract the javascript and css files from 
struts2-core-2.0.9.jar/templates/* to $resources$/struts/ as this will 
be helpful later

 eg. $resources$/struts/ajax/dojoRequire.js

Confirm that your application still works before proceeding. It's 
essential that resources are loaded from the directory rather than the jar.


2. Download the source of dojo 0.4.2.  You won't need to modify it.  The 
download location doesn't matter.  We assume it's in release-0.4.2/


  > svn export http://svn.dojotoolkit.org/dojo/tags/release-0.4.2

This is almost identical to the version bundled with struts2.0.9.

3. Use an editor to create a dojo custom profile as the file 
release-0.4.2/buildscripts/profiles/struts2.profile.js.  This file 
defines which dojo resources you use directly.  Essentially it specifies 
which code will be included in dojo.js.  An example that includes almost 
everything is provided at the end of this email.


4. Copy the struts widgets into the dojo directory so they can be 
included within dojo.js.  That is, copy $resources$/struts/dojo/struts/* 
to release-0.4.2/struts.
This is the directory that contains the widget and widgets 
subdirectories, css and some images.


5. Build dojo using ant.  This will create a new dojo.js file:

> cd release-0.4.2/buildscripts
> ant -Dprofile=struts2 -Dstrip_and_compress=true clean release 
intern-strings strip-resource-comments


(You may be asked to run it twice).

Pay some attention to the build process.  In particular, note whether it 
finds the struts widgets and 'internalises' the related resources. If 
not, see Step 4.  You'll probably notice a lot of things are included 
that you don't need.  That will be helpful later for optimizations.  
Some errors will occur while stripping the comments but these are ok.


6. When the build process completes the release directory will contain 
all the files you need.  The content of the release directory can be 
copied over the top of $resources$/struts/dojo.  You'll notice it's 
almost exactly the same as the original, although dojo.js is probably 
larger.


It's okay to delete the demo, test and release subfolders before copying 
to your application.  The src subfolder must be distributed with your 
application as it contains images used by dojo.


7. Clear your browser cache and test your application again.  You should 
note the larger dojo.js file being loaded and significantly fewer 
requests for resources by dojo   Hopefully it's also a lot faster.


That's it.  Now you can go back and optimize the profile by removing 
resources you don't need.  There's examples in the profiles directory.  
Repeat the build/test process to find the right balance.
I also recommend editing $resources$/struts/ajax/dojoRequire.js to 
remove the reference to the Editor2 if you don't use this as it's a 
very,very heavy-weight resource.


Hope that helps someone else.  Improvements & comments welcome.  See 
reference [3] below for detailed instructions and rationale.


regards,
Jeromy Evans

Resources
[1] http://struts.apache.org/2.x/docs/performance-tuning.html
[2] 
http://www.nabble.com/-s2--Struts-head-tag-KILLS-%28%3E-10s%29-page-load-time-tf4490390.html#a13047981
[3] 
http://www.dojotoolkit.org/book/dojo-book-0-4/part-6-customizing-dojo-builds-better-performance


The following profile includes almost everything in dojo.js.  It assumes 
the struts widgets have been copied into the directory as mentioned at 
step 4.

struts2.profile.js:

var dependencies = [
  "dojo.lang.*",
   "dojo.html.*",
  "dojo.debug",
   "dojo.html.display",
   "dojo.html.layout",
   "dojo.html.util",
   "dojo.lfx.*",
   "dojo.event.*",
   "dojo.logging.*",
   "dojo.io.*",
   "dojo.io.IframeIO",
   "dojo.date",
   "dojo.string.*",
   "dojo.regex",
   "dojo.rpc.*",
   "dojo.xml.*",
   // "dojo.flash.*",
   // "dojo.storage.*",
   "dojo.undo.*",
   "dojo.crypto.*",
   //"dojo.collections.*",
   "dojo.collections.ArrayList",
   "dojo.collections.Collections",
   "dojo.collections.Queue",
   "dojo.collections.Stack",
   "dojo.dnd.*",
   "dojo.widget.*",
  "dojo.widget.TabContainer",
  "dojo.widget.PageContainer",
  "dojo.widget.LinkPane",
  //"dojo.widget.Editor2",
  //"dojo.widget.RichText",
  //"dojo.widget.Edito

Re: How to improve dojo performance in Struts 2.0.9

2007-10-06 Thread Wes Wannemacher
Jeromy,

I didn't verify that this works (because I am pretty sure it probably
would), but have you thought about putting it in the community wiki?
This topic comes up quite often and it would be helpful to many
people.

-Wes

On 10/6/07, Jeromy Evans <[EMAIL PROTECTED]> wrote:
> I thought I'd share the instructions I prepared for creating a dojo
> 0.4.2 custom profile for Struts 2.0.9.  The objective is to bundle all
> the required dojo resources into dojo.js to avoid the numerous slow
> sequential requests for resources. This makes a massive performance
> improvement to the default ajax theme.
>
> Instructions for improving the performance of dojo 0.4.2 in Struts 2.0.9:
>
> $resources$ is assumed to be your web resources directory
>
> 1. First, configure struts to serve the static files directly from
> $resources$/struts instead of from within struts-core-2.0.9.jar:
>
> a. extract struts2-core-2.0.9.jar/org/apache/struts2/static/* to
> $resources$/struts/
> b. edit struts.properties and set struts.serve.static=false
> c. also extract the javascript and css files from
> struts2-core-2.0.9.jar/templates/* to $resources$/struts/ as this will
> be helpful later
>   eg. $resources$/struts/ajax/dojoRequire.js
>
> Confirm that your application still works before proceeding. It's
> essential that resources are loaded from the directory rather than the jar.
>
> 2. Download the source of dojo 0.4.2.  You won't need to modify it.  The
> download location doesn't matter.  We assume it's in release-0.4.2/
>
>> svn export http://svn.dojotoolkit.org/dojo/tags/release-0.4.2
>
> This is almost identical to the version bundled with struts2.0.9.
>
> 3. Use an editor to create a dojo custom profile as the file
> release-0.4.2/buildscripts/profiles/struts2.profile.js.  This file
> defines which dojo resources you use directly.  Essentially it specifies
> which code will be included in dojo.js.  An example that includes almost
> everything is provided at the end of this email.
>
> 4. Copy the struts widgets into the dojo directory so they can be
> included within dojo.js.  That is, copy $resources$/struts/dojo/struts/*
> to release-0.4.2/struts.
> This is the directory that contains the widget and widgets
> subdirectories, css and some images.
>
> 5. Build dojo using ant.  This will create a new dojo.js file:
>
>  > cd release-0.4.2/buildscripts
>  > ant -Dprofile=struts2 -Dstrip_and_compress=true clean release
> intern-strings strip-resource-comments
>
> (You may be asked to run it twice).
>
> Pay some attention to the build process.  In particular, note whether it
> finds the struts widgets and 'internalises' the related resources. If
> not, see Step 4.  You'll probably notice a lot of things are included
> that you don't need.  That will be helpful later for optimizations.
> Some errors will occur while stripping the comments but these are ok.
>
> 6. When the build process completes the release directory will contain
> all the files you need.  The content of the release directory can be
> copied over the top of $resources$/struts/dojo.  You'll notice it's
> almost exactly the same as the original, although dojo.js is probably
> larger.
>
> It's okay to delete the demo, test and release subfolders before copying
> to your application.  The src subfolder must be distributed with your
> application as it contains images used by dojo.
>
> 7. Clear your browser cache and test your application again.  You should
> note the larger dojo.js file being loaded and significantly fewer
> requests for resources by dojo   Hopefully it's also a lot faster.
>
> That's it.  Now you can go back and optimize the profile by removing
> resources you don't need.  There's examples in the profiles directory.
> Repeat the build/test process to find the right balance.
> I also recommend editing $resources$/struts/ajax/dojoRequire.js to
> remove the reference to the Editor2 if you don't use this as it's a
> very,very heavy-weight resource.
>
> Hope that helps someone else.  Improvements & comments welcome.  See
> reference [3] below for detailed instructions and rationale.
>
> regards,
>  Jeromy Evans
>
> Resources
> [1] http://struts.apache.org/2.x/docs/performance-tuning.html
> [2]
> http://www.nabble.com/-s2--Struts-head-tag-KILLS-%28%3E-10s%29-page-load-time-tf4490390.html#a13047981
> [3]
> http://www.dojotoolkit.org/book/dojo-book-0-4/part-6-customizing-dojo-builds-better-performance
>
> The following profile includes almost everything in dojo.js.  It assumes
> the struts widgets have been copied into the directory as mentioned at
> step 4.
> struts2.profile.js:
>
> var dependencies = [
>"dojo.lang.*",
> "dojo.html.*",
>"dojo.debug",
> "dojo.html.display",
> "dojo.html.layout",
> "dojo.html.util",
> "dojo.lfx.*",
> "dojo.event.*",
> "dojo.logging.*",
> "dojo.io.*",
> "dojo.io.IframeIO",
> "dojo.date",
> "dojo.string.*",
> "dojo.regex",
> "dojo.rpc.*",
> "dojo

[OT] Re: Error on Action, Form and on org.apache.struts names while changing .classpath file

2007-10-06 Thread Dave Newton
--- Arunkumar Balasubramanian wrote:
>  I was updating .classspath file 

If you need to change these settings it's generally
better to do it from within the Eclipse UI by
right-clicking on the project and choosing
"Properties" from the context menu, then selecting
"Java Build Path" and defining what source folders are
to be used and where to put the compiled classes
(which can be set for all source folders or on an
individual basis).

The *best* solution is to ask questions like this on
an Eclipse and / or MyEclipse forum, though.

d.


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



Re: How to improve dojo performance in Struts 2.0.9

2007-10-06 Thread Musachy Barroso
I'm doing this "by hand" on the profile for 2.1 (profile and
instructions on how to build are on the dojo plugin folder), but we
need  to  get it done with maven so it is part of the build process,
if any maven guru would like to help with that, feel free to jump in
:)

regards
musachy

On 10/6/07, Wes Wannemacher <[EMAIL PROTECTED]> wrote:
> Jeromy,
>
> I didn't verify that this works (because I am pretty sure it probably
> would), but have you thought about putting it in the community wiki?
> This topic comes up quite often and it would be helpful to many
> people.
>
> -Wes
>
> On 10/6/07, Jeromy Evans <[EMAIL PROTECTED]> wrote:
> > I thought I'd share the instructions I prepared for creating a dojo
> > 0.4.2 custom profile for Struts 2.0.9.  The objective is to bundle all
> > the required dojo resources into dojo.js to avoid the numerous slow
> > sequential requests for resources. This makes a massive performance
> > improvement to the default ajax theme.
> >
> > Instructions for improving the performance of dojo 0.4.2 in Struts 2.0.9:
> >
> > $resources$ is assumed to be your web resources directory
> >
> > 1. First, configure struts to serve the static files directly from
> > $resources$/struts instead of from within struts-core-2.0.9.jar:
> >
> > a. extract struts2-core-2.0.9.jar/org/apache/struts2/static/* to
> > $resources$/struts/
> > b. edit struts.properties and set struts.serve.static=false
> > c. also extract the javascript and css files from
> > struts2-core-2.0.9.jar/templates/* to $resources$/struts/ as this will
> > be helpful later
> >   eg. $resources$/struts/ajax/dojoRequire.js
> >
> > Confirm that your application still works before proceeding. It's
> > essential that resources are loaded from the directory rather than the jar.
> >
> > 2. Download the source of dojo 0.4.2.  You won't need to modify it.  The
> > download location doesn't matter.  We assume it's in release-0.4.2/
> >
> >> svn export http://svn.dojotoolkit.org/dojo/tags/release-0.4.2
> >
> > This is almost identical to the version bundled with struts2.0.9.
> >
> > 3. Use an editor to create a dojo custom profile as the file
> > release-0.4.2/buildscripts/profiles/struts2.profile.js.  This file
> > defines which dojo resources you use directly.  Essentially it specifies
> > which code will be included in dojo.js.  An example that includes almost
> > everything is provided at the end of this email.
> >
> > 4. Copy the struts widgets into the dojo directory so they can be
> > included within dojo.js.  That is, copy $resources$/struts/dojo/struts/*
> > to release-0.4.2/struts.
> > This is the directory that contains the widget and widgets
> > subdirectories, css and some images.
> >
> > 5. Build dojo using ant.  This will create a new dojo.js file:
> >
> >  > cd release-0.4.2/buildscripts
> >  > ant -Dprofile=struts2 -Dstrip_and_compress=true clean release
> > intern-strings strip-resource-comments
> >
> > (You may be asked to run it twice).
> >
> > Pay some attention to the build process.  In particular, note whether it
> > finds the struts widgets and 'internalises' the related resources. If
> > not, see Step 4.  You'll probably notice a lot of things are included
> > that you don't need.  That will be helpful later for optimizations.
> > Some errors will occur while stripping the comments but these are ok.
> >
> > 6. When the build process completes the release directory will contain
> > all the files you need.  The content of the release directory can be
> > copied over the top of $resources$/struts/dojo.  You'll notice it's
> > almost exactly the same as the original, although dojo.js is probably
> > larger.
> >
> > It's okay to delete the demo, test and release subfolders before copying
> > to your application.  The src subfolder must be distributed with your
> > application as it contains images used by dojo.
> >
> > 7. Clear your browser cache and test your application again.  You should
> > note the larger dojo.js file being loaded and significantly fewer
> > requests for resources by dojo   Hopefully it's also a lot faster.
> >
> > That's it.  Now you can go back and optimize the profile by removing
> > resources you don't need.  There's examples in the profiles directory.
> > Repeat the build/test process to find the right balance.
> > I also recommend editing $resources$/struts/ajax/dojoRequire.js to
> > remove the reference to the Editor2 if you don't use this as it's a
> > very,very heavy-weight resource.
> >
> > Hope that helps someone else.  Improvements & comments welcome.  See
> > reference [3] below for detailed instructions and rationale.
> >
> > regards,
> >  Jeromy Evans
> >
> > Resources
> > [1] http://struts.apache.org/2.x/docs/performance-tuning.html
> > [2]
> > http://www.nabble.com/-s2--Struts-head-tag-KILLS-%28%3E-10s%29-page-load-time-tf4490390.html#a13047981
> > [3]
> > http://www.dojotoolkit.org/book/dojo-book-0-4/part-6-customizing-dojo-builds-better-performance
> >
> > 

Re: why would error-page be *appended* to my jsp?

2007-10-06 Thread Laurie Harper

Chris Pratt wrote:

Most likely the error wasn't detected until the page had been
"committed".  Once the headers and the first part of the page have
been sent to the browser, there's no way to "recall" them to display
the error page, so the best that can be done is adding the error to
the bottom.


> On 10/5/07, josephcjis <[EMAIL PROTECTED]> wrote:
>> response was already committed but I followed the advice at
>> 
(http://scriptlandia.blogspot.com/2006/06/how-to-handle-jsp-error-page.html)
>> to set the <%@ page buffer="1024kb"%> and <%@ page 
autoFlush="false"%> and

>> this made no difference.

Chris is right, that's the most likely cause. The reason your attempt to 
correct for it made no difference is probably because the buffer size 
you set is too small. You need to ensure that the buffer is large enough 
to hold all the page content upto the point of the error.


Try increasing your page buffer and see if that helps.

L.


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



Re: Ajax forms not working - Problem with scriptaculous and dojo

2007-10-06 Thread Marcos Hernandez
I have the head tag first, then prototype and then Script.aculous and they
work perfectly well with Dojo. Had you switched order?

On 10/5/07, Dave Newton <[EMAIL PROTECTED]> wrote:
>
> At one point the JavaScript load order when using
> Prototype was significant; I had to put the
>  tag before loading prototype.
>
> Note that Prototype does not always play well with
> other libraries.
>
> d.
>
> --- Moacir Cardoso <[EMAIL PROTECTED]> wrote:
>
> > Hello people,
> >
> > I was unable to make my ajax s:form submit to work.
> > Then I tried to create a simple application from
> > struts2-blank-2.0.9.war
> > like this:
> >
> > <%@ taglib prefix="s" uri="/struts-tags" %>
> > <%@ page language="java" contentType="text/html;
> > charset=ISO-8859-1"
> > pageEncoding="ISO-8859-1"%>
> >  > Transitional//EN"
> > "http://www.w3.org/TR/html4/loose.dtd";>
> > 
> > 
> > 
> > Hello Jsp
> > 
> > 
> > 
> > 
> > 
> >
> >  > targets="div1">
> >   
> > Div1: 
> > 
> > 
> > 
> >
> > The result was fine, but if I add scriptaculous and
> > prototype.js an
> > error occurs.
> >
> > 
> >  > type="text/javascript">
> >  > type="text/javascript">
> > ...
> >
> > FATAL exception raised: Could not load
> > 'struts.widget.Bind'; last tried
> > '__package__.js'
> >
> > So, probably dojo have some problems with
> > scriptaculous or prototype.js.
> > Note that the tag  > theme="ajax"/> will output some
> > dojo scripts.
> >
> > Becouse that I will not use dojo anymore and  start
> > with scriptaculous
> > and prototype.js.
> >
> > Bye.
> >
> >
> > Dave Newton escreveu:
> > > If you set the debug flag do you get any error
> > > messages?
> > >
> > > --- Moacir Cardoso <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > >> Yes I do.
> > >>
> > >>
> > >>
> > >> Dave Newton wrote:
> > >>
> > >>> Do you have an  tag?
> > >>>
> > >>> --- Moacir Cardoso <[EMAIL PROTECTED]> wrote:
> > >>>
> > >>>
> > >>>
> >  Hi,
> >  I'm unable to make my ajax form work
> > 
> >  
> > 
> >  initial content
> >    >    id="theForm2"
> >  cssStyle="border: 1px solid green;"
> > 
> >  action="cadastro/pessoa_salvarEndereco.action"
> >   method="post"
> >   theme="ajax">
> > 
> >    > value='Struts
> >  User'>
> > 
> >    >  targets="two"/>
> > 
> >   
> > 
> >  
> > 
> > 
> > 
> >  It's making a normal http request and not using
> > 
> > >> ajax
> > >>
> >  calls.
> > 
> > 
> > 
> > 
> > 
> > 
> > >
> >
> -
> > >
> > >>>
> > >>>
> >  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]
> > >>
> > >>>
> > >>>
> > >>>
> > >>
> > >>
> > >
> >
> -
> > >
> > >> 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]
> > >
> > >
> > >
> > >
> >
> >
> >
> -
> > 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]
>
>


-- 
- Marcos H.

You must be the change you wish to see in the world
~ Gandhi


Re: S2: YUI plugin and autocompleter

2007-10-06 Thread Ted Husted
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" %>















 
 
  options
 
 


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]



Re: S2: YUI plugin and autocompleter

2007-10-06 Thread Musachy Barroso
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" %>
> 
> 
> 
> 
>
> 
> 
> 
>  href="%{#statesUrl}" containerCssStyle="width:100px" />
> 
> 
> 
> 
>
> 
>  
>  
>   options
>  
>  
> 
>
> 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]



Re: S2: YUI plugin and autocompleter

2007-10-06 Thread Wes Wannemacher
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" %>
> > 
> > 
> > 
> > 
> >
> > 
> > 
> > 
> >  > href="%{#statesUrl}" containerCssStyle="width:100px" />
> > 
> > 
> > 
> > 
> >
> > 
> >  
> >  
> >   options
> >  
> >  
> > 
> >
> > 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]



Re: S2: YUI plugin and autocompleter

2007-10-06 Thread Dave Newton
%{statesUrl} would try to resolve against the action,
not the named object created by , 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" %>
> > > 
> > > 
> > >  datepicker="true" />
> > > 
> > >
> > > 
> > >  includeParams='none'/>
> > > 
> > >  name="state"
> > > href="%{#statesUrl}"
> containerCssStyle="width:100px" />
> > > 
> > > 
> > > 
> > > 
> > >
> > > 
> > >   class="actions.Autocompleter">
> > >  
> > >   options
> > >  
> > >  
> > > 
> > >
> > > 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]



Re: S2: YUI plugin and autocompleter

2007-10-06 Thread Wes Wannemacher
(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 -


..

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 , 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" %>
> > > > 
> > > > 
> > > >  > datepicker="true" />
> > > > 
> > > >
> > > > 
> > > >  > includeParams='none'/>
> > > > 
> > > >  > name="state"
> > > > href="%{#statesUrl}"
> > containerCssStyle="width:100px" />
> > > > 
> > > > 
> > > > 
> > > > 
> > > >
> > > > 
> > > >   > class="actions.Autocompleter">
> > > >  
> > > >   options
> > > >  
> > > >  
> > > > 
> > > >
> > > > 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 PROTECT

Re: S2: YUI plugin and autocompleter

2007-10-06 Thread Musachy Barroso
that's right

musachy

On 10/6/07, Dave Newton <[EMAIL PROTECTED]> wrote:
> %{statesUrl} would try to resolve against the action,
> not the named object created by , 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" %>
> > > > 
> > > > 
> > > >  > datepicker="true" />
> > > > 
> > > >
> > > > 
> > > >  > includeParams='none'/>
> > > > 
> > > >  > name="state"
> > > > href="%{#statesUrl}"
> > containerCssStyle="width:100px" />
> > > > 
> > > > 
> > > > 
> > > > 
> > > >
> > > > 
> > > >   > class="actions.Autocompleter">
> > > >  
> > > >   options
> > > >  
> > > >  
> > > > 
> > > >
> > > > 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]
>
>


-- 
"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]



Re: S2: YUI plugin and autocompleter

2007-10-06 Thread Martin Gainty
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" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
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 -
> 
> 
> ..
> 
> 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 , 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" %>
> > > > > 
> > > > > 
> > > > >  > > datepicker="true" />
> > > > > 
> > > > >
> > > > > 
> > > > >  > > includeParams='none'/>
> > > > > 
> > > > >  > > name="state"
> > > > > href="%{#statesUrl}"
> > > containerCssStyle="width:100px" />
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >
> > > > > 
> > > > >   > > class="actions.Autocompleter">
> > > > >  
> > > > >   options
> > > > >  
> > > > >  
> > > > > 
> > > > >
> > > > > 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