I have read this discussion and I would like to know whether there is a
struts 2 way of doing the same that with ajax-tags-1.3 ajax:updateField tag.
http://ajaxtags.sourceforge.net/usage.html
Note: I have a selector and when I select one item I would like to set
the value for 2 input text.
: AjaxTag 1.3 support?
I completely agree with Dave so I'll take a different tact.
Based on this example:
http://struts.apache.org/2.0.11/docs/ajax-tags.html#AjaxTags-autocomplet
erTag,
I would also take the approach of returning a JSON Result via the JSON
Plugin. Only the configuration changes
want to confuse the plug in -- if
that makes any sense.
MG
-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED]
Sent: Monday, February 04, 2008 6:30 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
Right on.
On Feb 4, 2008 6:45 PM, Griffith, Michael *
[EMAIL
-Original Message-
From: Griffith, Michael * [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 05, 2008 8:32 AM
To: Struts Users Mailing List
Subject: RE: AjaxTag 1.3 support?
Musachy,
I can't seem to create the right blend of Entity objects/list/maps to
allow the JSON plug in to serialize
PROTECTED]
Sent: Tuesday, February 05, 2008 8:32 AM
To: Struts Users Mailing List
Subject: RE: AjaxTag 1.3 support?
Musachy,
I can't seem to create the right blend of Entity objects/list/maps to
allow the JSON plug in to serialize this response for me. If I create
the string below using a loop
in the JSONWriter class
-- and it is not obvious to me how to configure this plugin setting.
How is it done?
MG
-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 05, 2008 11:23 AM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
Don't give up so easily :). That is just a setting on the json plugin
to prevent cross site scripting, and can be disabled.
musachy
On Feb 5, 2008 11:27 AM, Griffith, Michael *
[EMAIL PROTECTED] wrote:
Well, to answer my own question
in your
application}}
-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 05, 2008 1:20 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
Oh I am sorry about that! (doh) Do you see the quoutes escaped in
firebug or something? As far
.
MG
-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 05, 2008 12:14 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
add:
param name=wrapWithCommentsfalse/param
to the result. See the section Wrap with Comments here:
http
. This seems like a bug.
MG
-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 05, 2008 12:14 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
add:
param name=wrapWithCommentsfalse/param
to the result. See the section Wrap
did nothing to my result. This seems like a bug.
MG
-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 05, 2008 12:14 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
add:
param name=wrapWithCommentsfalse
Showcase didn't work in IE6(the last one):
http://www.planetstruts.org/struts2-showcase/ajax/autocompleter/
Grant
From: Jeromy Evans [mailto:[EMAIL PROTECTED]
Sent: Fri 2/1/2008 4:35 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
My 2c:
I
) is not object.
MG
-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED]
Sent: Monday, February 04, 2008 11:06 AM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
I think that error is coming from your jsp, not the JSON generation.
Do you have this.data[x][0
Subject: Re: AjaxTag 1.3 support?
I think that error is coming from your jsp, not the JSON generation.
Do you have this.data[x][0].toLowerCase somewhere?
musachy
On Feb 4, 2008 11:57 AM, Griffith, Michael *
[EMAIL PROTECTED] wrote:
Jeromy,
Again, thanks for the reply. I appreciate your help
Question[] getList(){
return list;
}
}
Cheers!
mg
-Original Message-
From: Jeromy Evans [mailto:[EMAIL PROTECTED]
Sent: Saturday, February 02, 2008 6:15 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
I completely agree with Dave so I'll take
: Re: AjaxTag 1.3 support?
funny thing is that now I remember the code(duh!), it is in the struts
widget. It seems like the json is empty. Paste the section of your jsp
with the autocompleter and the json that your action is returning.
regards
musachy
On Feb 4, 2008 2:16 PM, Griffith, Michael
didn't work in IE6(the last one):
http://www.planetstruts.org/struts2-showcase/ajax/autocompleter/
Grant
From: Jeromy Evans [mailto:[EMAIL PROTECTED]
Sent: Fri 2/1/2008 4:35 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
My 2c:
I think
application}]
-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED]
Sent: Monday, February 04, 2008 1:22 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
funny thing is that now I remember the code(duh!), it is in the struts
widget. It seems like the json
: RE: AjaxTag 1.3 support?
Thanks for the insight Jeremy.
I totally agree that writing to the response is not an elegant solution.
But sometimes we choose quick solutions that work when a project
deadline looms.
The reason I initially chose AjaxTags was that the example for the
autocompleter
...],
[2,question 2 text...]
]
}
-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED]
Sent: Monday, February 04, 2008 2:37 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
yes, but the output will depend on what you feed the JSON result
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
yes, but the output will depend on what you feed the JSON result.
musachy
On Feb 4, 2008 3:20 PM, Griffith, Michael *
[EMAIL PROTECTED] wrote:
Musachy,
I must have missed your point. Isn't the idea of using the JSON
plug-in
so
Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED]
Sent: Monday, February 04, 2008 2:53 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
Take a look here:
http://cwiki.apache.org/S2PLUGINS/json-plugin.html
musachy
On Feb 4, 2008 3:43 PM, Griffith, Michael
text...],
[2,question 2 text...]
]
}
-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED]
Sent: Monday, February 04, 2008 2:37 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
yes, but the output will depend on what you feed the JSON
Barroso [mailto:[EMAIL PROTECTED]
Sent: Monday, February 04, 2008 1:56 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
to use the dataFIeldName, you have to return something like:
{
state : [
[Alabama,AL],
[Alaska,AK]
]
}
if you are using 2.1 check
Yea, I think so -- I copied and pasted this from the log file/console...
-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: Monday, February 04, 2008 5:02 PM
To: Struts Users Mailing List
Subject: RE: AjaxTag 1.3 support?
Is it generating those brackets around your
Mailing List
Subject: Re: AjaxTag 1.3 support?
The rule to use a map (simplest one) was added on 2.1, on 2.0.x the
easiest way to generate the json is to have an object with a map field
that matches the name of dataFieldName in the autocompleter tag:
class QuestionJson {
private Map questions
or
Entity objects or maps, isn't there a way that the plug-in will create
the JSON specified below?
MG
-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED]
Sent: Monday, February 04, 2008 1:56 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support
Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED]
Sent: Monday, February 04, 2008 3:52 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
The rule to use a map (simplest one) was added on 2.1, on 2.0.x the
easiest way to generate the json is to have an object
(){
return newList;
}
But it appears to be ignored.
MG
-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED]
Sent: Monday, February 04, 2008 2:53 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
Take a look here:
http
, February 04, 2008 3:52 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
The rule to use a map (simplest one) was added on 2.1, on 2.0.x the
easiest way to generate the json is to have an object with a map field
that matches the name of dataFieldName
Java Web Start?}}
The [] brackets seem to be ignored by the parser.
-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: Monday, February 04, 2008 5:34 PM
To: Struts Users Mailing List
Subject: RE: AjaxTag 1.3 support?
...
That's probably an issue.
--- Griffith
]
Sent: Monday, February 04, 2008 3:52 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
The rule to use a map (simplest one) was added on 2.1, on 2.0.x the
easiest way to generate the json is to have an object with a map
field
that matches the name of dataFieldName
List
Subject: RE: AjaxTag 1.3 support?
...
That's probably an issue.
--- Griffith, Michael * [EMAIL PROTECTED] wrote:
Yea, I think so -- I copied and pasted this from the log
file/console...
From: Dave Newton [mailto:[EMAIL PROTECTED]
Is it generating those brackets around your JSON
.
Grant
From: Griffith, Michael * [mailto:[EMAIL PROTECTED]
Sent: Fri 2/1/2008 3:48 PM
To: Struts Users Mailing List
Subject: RE: AjaxTag 1.3 support?
Dave,
Thanks for the reply. I guess I should have said freemarker instead of
sitemesh...? At any
--- Griffith, Michael * [EMAIL PROTECTED] wrote:
Thanks for the comprehensive reply. Looking at the documentation and the
example app, I am still not sure how to configure my action/response. I
am using tiles 2.
As previously stated if you are writing directly to the response you need to
I completely agree with Dave so I'll take a different tact.
Based on this example:
http://struts.apache.org/2.0.11/docs/ajax-tags.html#AjaxTags-autocompleterTag,
I would also take the approach of returning a JSON Result via the JSON
Plugin. Only the configuration changes for an XML result.
-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: Friday, February 01, 2008 5:42 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
--- Griffith, Michael * [EMAIL PROTECTED] wrote:
public class QuestionAction extends BaseAction implements
ModelDrivenQuestion
--- Griffith, Michael * [EMAIL PROTECTED] wrote:
I guess I should have said freemarker instead of sitemesh...?
Most (all?) of the HTML-oriented tags are dependent on FreeMarker, not just
the Ajax tags. That's how themes and templates are implemented.
At any rate, when the docs don't match the
--- Griffith, Michael * [EMAIL PROTECTED] wrote:
public class QuestionAction extends BaseAction implements
ModelDrivenQuestion, Preparable, ServletRequestAware,
ServletResponseAware {
public String getSearchTerm() throws Exception {
System.out.println( Question Search
-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: Friday, February 01, 2008 5:42 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?
--- Griffith, Michael * [EMAIL PROTECTED] wrote:
public class QuestionAction extends BaseAction implements
--- Jeromy Evans [EMAIL PROTECTED] wrote:
For Ajax/JS libraries that use JSON, the JSON Plugin (JSON ResultType)
[2] will serialize your action into JSON automatically
The XSL ResultType will serialize your action into XML if you provide a
stylesheet [3]
The REST plugin includes code to
From: Griffith, Michael * [mailto:[EMAIL PROTECTED]
Sent: Fri 2/1/2008 3:48 PM
To: Struts Users Mailing List
Subject: RE: AjaxTag 1.3 support?
Dave,
Thanks for the reply. I guess I should have said freemarker instead of
sitemesh...? At any rate, when
42 matches
Mail list logo