Author Login
Post Reply
user Digest 5 Feb 2008 18:10:24 -0000 Issue 7848
Topics (messages 182259 through 182273):
Re: Struts and Windows Authentication
182259 by: Arun
Script Error
182260 by: McShiv
182261 by: Musachy Barroso
Re: [OT] Re: Best Tool to develop html pages
182262 by: Al Sutton
182264 by: Dave Newton
182265 by: Al Sutton
Re: AjaxTag 1.3 support?
182263 by: Griffith, Michael *
182268 by: Griffith, Michael *
182271 by: Musachy Barroso
182272 by: Griffith, Michael *
Re: Struts 2.0.11 + DWR 2.0 + ajax validation
182266 by: ravi_eze
182267 by: ravi_eze
182269 by: Filipe David Manana
dispaytag + Struts 2.1.x: encoding parameters into requestURI
182270 by: Giovanni Azua
182273 by: Randy Burgess
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_182259.ezm (zipped)Martin,
I can use ActiveDirectory for authentication directly. I prefer that
because I have less code to worry about. How to do that with tomcat I dont
know.
On 2/2/08, Martin Gainty <mgainty@(protected):
>
> Hi Arun-
>
> following up on Antonio's suggestion-
> did you look at setting the AD properties ?
> http://jcifs.samba.org/src/docs/ntlmhttpauth.html#props
> (and then restart the container)
>
> ?
> Martin
> ----- Original Message -----
> From: "Arun" <arun.george.1981@(protected)>
> To: "Struts Users Mailing List" <user@(protected)>
> Sent: Saturday, February 02, 2008 10:48 AM
> Subject: Re: Struts and Windows Authentication
>
>
> > I am using tomcat. Is it possible implement container managed security
> with
> > this?
> >
> > On Feb 1, 2008 7:42 PM, Cory D. Wiles <kwylez@(protected):
> >
> > > At my job we authenticate our users directly using Active Directory
> using
> > > container managed security.
> > >
> > > What container are you using?
> > >
> > > On Feb 1, 2008 4:48 AM, Antonio Petrelli <antonio.petrelli@(protected)>
> > > wrote:
> > >
> > > > 2008/2/1, Arun <arun.george.1981@(protected)>:
> > > > > Hi,
> > > > >
> > > > > I have a web application in which I need to implement windows
> > > > > authentication.
> > > > > Basically there is a login screen where we can enter username and
> > > > password.
> > > > > These users are the users that are there in OS.
> > > > > The username is like domainname\username and password is the
> password.
> > > > > A basic authentication dialog wil popup asking this. It should
> > > > authenticate
> > > > > against the domain name server.
> > > > > And forward to home page with the login information.
> > > > > Can anybody help me on this.?
> > > >
> > > > This may help you a lot:
> > > > http://jcifs.samba.org/src/docs/ntlmhttpauth.html
> > > >
> > > > Ciao
> > > > Antonio
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > > For additional commands, e-mail: user-help@(protected)
> > > >
> > > >
> > >
> > >
> > > --
> > > Cory Wiles
> > > kwylez@(protected)
> > > http://www.corywiles.com
> > > http://alphaprevails.blogspot.com
> > >
> >
> >
> >
> > --
> > Thanks
> > Arun George
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
Thanks
Arun George

Attachment:
user_182260.ezm (zipped)
Hi All,
I'm using the forllowing javascript and HTML Code for my project. I
need to change the selectedRow text value (from 0 to 1) and other rows to 0
(indicating 1-selected row 0-unselectedrow). Because of using innerText in
the JavaScript, the textbox is changed as label. There is any other keywords
availabe to change the text box value during the onMouseDown operation?
Please send any example code for clarification. Thanks.
JavaScript Code
function selectRow(row)
{
alert('Inside Select Row');
var tbl = document.getElementById('WorkingList');
var cmpStr = '0'
var rows = tbl.getElementsByTagName('TR');
for (var rowNum = 1; rowNum < rows.length; rowNum++)
{
var celTD = rows[rowNum].getElementsByTagName('TD');
if(celTD[0].innerText != cmpStr)
{
celTD[0].innerText = '0';
}
}
var celTDselected = row.getElementsByTagName('TD');
celTDselected[0].innerText = '1';
document.retrieveFormGenInfo.submit();
}
HTML Code
<logic:iterate name="formsForm" property="formsVO" id="formsVO">
<tr onMouseDown = "selectRow(this)">
<td>
<html:text name="formsVO" property="selectedRow" indexed="true"/>
</td>
<td>
<html:text name="formsVO" property="formId" indexed="true"/>
</td>
<td>
./images/lock.png
</td>
<td>
<bean:write name="formsVO" property="formNumber"/>
</td>
<td>
<bean:write name="formsVO" property="formTitle"/>
</td>
<td>
<bean:write name="formsVO" property="editionDate"/>
</td>
</tr>
</logic:iterate>
Thanks,
McShiv.....
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_182261.ezm (zipped)http://www.google.com/search?source=ig&hl=en&rlz=&q=set+textbox+value+javascript&btnG=Google+Search
On Feb 5, 2008 9:22 AM, McShiv <rajesh_sachin10@(protected):
>
> Hi All,
>
> I'm using the forllowing javascript and HTML Code for my project. I
> need to change the selectedRow text value (from 0 to 1) and other rows to 0
> (indicating 1-selected row 0-unselectedrow). Because of using innerText in
> the JavaScript, the textbox is changed as label. There is any other keywords
> availabe to change the text box value during the onMouseDown operation?
> Please send any example code for clarification. Thanks.
>
> JavaScript Code
>
> function selectRow(row)
> {
> alert('Inside Select Row');
> var tbl = document.getElementById('WorkingList');
> var cmpStr = '0'
> var rows = tbl.getElementsByTagName('TR');
> for (var rowNum = 1; rowNum < rows.length; rowNum++)
> {
> var celTD = rows[rowNum].getElementsByTagName('TD');
> if(celTD[0].innerText != cmpStr)
> {
> celTD[0].innerText = '0';
> }
> }
> var celTDselected = row.getElementsByTagName('TD');
> celTDselected[0].innerText = '1';
> document.retrieveFormGenInfo.submit();
> }
>
> HTML Code
>
> <logic:iterate name="formsForm" property="formsVO" id="formsVO">
> <tr onMouseDown = "selectRow(this)">
> <td>
> <html:text name="formsVO" property="selectedRow" indexed="true"/>
> </td>
> <td>
> <html:text name="formsVO" property="formId" indexed="true"/>
> </td>
> <td>
> ./images/lock.png
> </td>
> <td>
> <bean:write name="formsVO" property="formNumber"/>
> </td>
> <td>
> <bean:write name="formsVO" property="formTitle"/>
> </td>
> <td>
> <bean:write name="formsVO" property="editionDate"/>
> </td>
> </tr>
> </logic:iterate>
>
>
> Thanks,
> McShiv.....
>
> --
> View this message in context: http://www.nabble.com/Script-Error-tp15291018p15291018.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment:
user_182262.ezm (zipped)I'm the one with the 9 inch fingers that bend in 6 places so I can do key
sequences with one hand :).
----- Original Message -----
From: "Dave Newton" <newton.dave@(protected)>
To: "Struts Users Mailing List" <user@(protected)>
Sent: Tuesday, February 05, 2008 12:39 PM
Subject: Re: [OT] Re: Best Tool to develop html pages
> --- Al Sutton <al.sutton@(protected):
>> My vote is for vi
>
> I don't even know you, man.
>
> d.
>
>>
>> Al.
>>
>> ----- Original Message -----
>> From: "Dave Newton" <newton.dave@(protected)>
>> To: "Struts Users Mailing List" <user@(protected)>
>> Sent: Tuesday, February 05, 2008 11:58 AM
>> Subject: [OT] Re: Best Tool to develop html pages
>>
>>
>> > --- mohammed hussain <muzaffar.struts@(protected):
>> >> Hi anybody knowing the best tools to develop to html page,pls let me
>> know
>> >
>> > Emacs, hands down.
>> >
>> > Dave
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-unsubscribe@(protected)
>> > For additional commands, e-mail: user-help@(protected)
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>

Attachment:
user_182264.ezm (zipped)--- Al Sutton <al.sutton@(protected):
> I'm the one with the 9 inch fingers that bend in 6 places so I can do key
> sequences with one hand :).
Ah, so you DO use Emacs.
>
> ----- Original Message -----
> From: "Dave Newton" <newton.dave@(protected)>
> To: "Struts Users Mailing List" <user@(protected)>
> Sent: Tuesday, February 05, 2008 12:39 PM
> Subject: Re: [OT] Re: Best Tool to develop html pages
>
>
> > --- Al Sutton <al.sutton@(protected):
> >> My vote is for vi
> >
> > I don't even know you, man.
> >
> > d.
> >
> >>
> >> Al.
> >>
> >> ----- Original Message -----
> >> From: "Dave Newton" <newton.dave@(protected)>
> >> To: "Struts Users Mailing List" <user@(protected)>
> >> Sent: Tuesday, February 05, 2008 11:58 AM
> >> Subject: [OT] Re: Best Tool to develop html pages
> >>
> >>
> >> > --- mohammed hussain <muzaffar.struts@(protected):
> >> >> Hi anybody knowing the best tools to develop to html page,pls let me
> >> know
> >> >
> >> > Emacs, hands down.
> >> >
> >> > Dave
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> >> > For additional commands, e-mail: user-help@(protected)
> >> >
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >> For additional commands, e-mail: user-help@(protected)
> >>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_182265.ezm (zipped)Hmmmm... Butterflies you say..... where's my big net...... :)
----- Original Message -----
From: "Antonio Petrelli" <antonio.petrelli@(protected)>
To: "Struts Users Mailing List" <user@(protected)>
Sent: Tuesday, February 05, 2008 1:03 PM
Subject: Re: [OT] Re: Best Tool to develop html pages
> 2008/2/5, Al Sutton <al.sutton@(protected)>:
>> My vote is for vi
>
> http://xkcd.com/378/
>
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>

Attachment:
user_182263.ezm (zipped)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, can I return it from the JSON plug in
without the plug in doing anything further to it?
In other words, does the plug in look at what it is trying to serialize
and say, "Hey this is already valid JSON, I don't need to do anything to
it..." or will it try to add additional info to the string returned?
I'm guessing the shortest path for me is to just create the string in my
own serialization loop, but I don't want to confuse the plug in -- if
that makes any sense.
MG
-----Original Message-----
From: Musachy Barroso [mailto:musachy@(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 *
<Michael.Griffith@(protected):
> Dave,
>
> I think the bigger problem is the JSON that is returned, while it may
be
> valid, it not in the right structure expected. I should be generating
> JSON like this:
>
> {"questions":{"420":"Is your Java Application a ME, SE or EE
> application?","440":"If your Java Application is an SE application
does
> it use Java Web Start?"}}
>
> The [] brackets seem to be ignored by the parser.
>
> -----Original Message-----
> From: Dave Newton [mailto:newton.dave@(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, Michael *" <Michael.Griffith@(protected):
> > Yea, I think so -- I copied and pasted this from the log
> file/console...
> >
> > From: Dave Newton [mailto:newton.dave@(protected)]
> >
> > Is it generating those brackets around your JSON?
> >
> > --- "Griffith, Michael *" <Michael.Griffith@(protected):
> >
> > > Musachy,
> > >
> > > Thanks for your many replies... Does this JSON look like the right
> > > format? As far as I can tell, it matches your snippet below -- but
I
> > get
> > > the same dojo parting error.
> > >
> > > [{"questions":{"420":"Is your Java Application a ME, SE or EE
> > > application?"}},{"questions":{"440":"If your Java Application is
an
> SE
> > > application does it use Java Web Start?"}},{"questions":{"450":"If
> > your
> > > Java Application is a Java Web Application, list the application
> > server
> > > used for production"}}]
> > >
> > > -----Original Message-----
> > > From: Musachy Barroso [mailto:musachy@(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 with a map
> field
> > > that matches the name of "dataFieldName" in the autocompleter tag:
> > >
> > > class QuestionJson {
> > > private Map questions;
> > > ....
> > > }
> > >
> > > public QuestionJson getQuestionJson() {
> > > Question q= ... [from my list]
> > > Map m = new HaswhMap();
> > > m.put("Key1", q.getQuestion1());
> > > m.put("Key2", q.getQuestion2());
> > > return new QuestionJson(m);
> > > }
> > >
> > > <s:autocompleter ... dataFieldName="questions" ../>
> > >
> > > that will generate something like:
> > >
> > > {
> > > "questions": {
> > > "Key1" : "Question 1",
> > > "Key2" : "Question 2",
> > > }
> > > }
> > >
> > > //that's the idea, but I typed out of what I remember which is
often
> > not
> > > good :)
> > >
> > > musachy
> > >
> > > On Feb 4, 2008 4:34 PM, Griffith, Michael *
> > > <Michael.Griffith@(protected):
> > > > Musachy,
> > > >
> > > > I'm still not getting it...
> > > > I am now serializing a list of maps with the entity id and text
I
> > > > want...
> > > >
> > > > Map<String,String> m= new HashMap<String,String>();
> > > > Question q= ... [from my list]
> > > > m.put("id", q.getId().toString());
> > > > m.put("text", q.getText());
> > > > newList.add(m);
> > > >
> > > > And my JSON result looks:
> > > >
> > > > [JSON][{"text":"Is your Java Application a ME, SE or EE
> > > > application?","id":"420"},{"text":"If your Java Application is
an
> SE
> > > > application does it use Java Web Start?","id":"440"},{"text":"If
> > your
> > > > Java Application is a Java Web Application, list the application
> > > server
> > > > used for production","id":"450"},{"text":"List any Java Web
> Services
> > > > Technologies Used","id":"490"},{"text":"List any Java Web
> > Application
> > > > Technologies Used for presentation","id":"500"},{"text":"List
any
> > Java
> > > > EE Technologies used in your application","id":"510"}]
> > > >
> > > > I added the @JSON annotation as such:
> > > >
> > > > @JSON(name="question")
> > > > public List<Map<String,String>> getNewList(){
> > > > return newList;
> > > > }
> > > >
> > > > But it appears to be ignored.
> > > >
> > > > MG
> > > >
> > > > -----Original Message-----
> > > > From: Musachy Barroso [mailto:musachy@(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 *
> > > > <Michael.Griffith@(protected):
> > > > > So, if you have an array of Entity objects, in my case
question:
> > > > >
> > > > > How can I produce?
> > > > > {
> > > > > "question" : [
> > > > > ["1","question 1 text..."],
> > > > > ["2","question 2 text..."]
> > > > >
> > > > > ]
> > > > > }
> > > > >
> > > > > -----Original Message-----
> > > > > From: Musachy Barroso [mailto:musachy@(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.
> > > > >
> > > > > musachy
> > > > >
> > > > > On Feb 4, 2008 3:20 PM, Griffith, Michael *
> > > > > <Michael.Griffith@(protected):
> > > > > > Musachy,
> > > > > >
> > > > > > I must have missed your point. Isn't the idea of using the
> JSON
> > > > > plug-in
> > > > > > so you don't have to iterate and create the list? If I have
an
> > > array
> > > > > 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:musachy@(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 this link:
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
http://cwiki.apache.org/WW/ajax-and-javascript-recipes.html#AjaxandJavaS
> > > > > > criptRecipes-Autocompleter
> > > > > >
> > > > > > otherwise just an array of arrays should do:
> > > > > >
> > > > > > [
> > > > > > ["Alabama", "AL"],
> > > > > > ["Alaska", "AK"]
> > > > > > ]
> > > > > >
> > > > > > musachy
> > > > > >
> > > > > > On Feb 4, 2008 2:46 PM, Griffith, Michael *
> > > > > > <Michael.Griffith@(protected):
> > > > > > > Musachy
> > > > > > >
> > > > > > > Here is the autocompleter tag and the JSON returned...
> > > > > > >
> >
> === message truncated ===
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_182268.ezm (zipped)Well, to answer my own question -- the answer is no. The JSON result
serialization process escapes quotation marks, so my response that
looked like this before serialization:
{"questions":{"420":"Is your Java Application a ME, SE or EE
application?","440":"If your Java Application is an SE application does
it use Java Web Start?","450":"If your Java Application is a Java Web
Application, list the application server used for
production","490":"List any Java Web Services Technologies
Used","500":"List any Java Web Application Technologies Used for
presentation","510":"List any Java EE Technologies used in your
application"}}
Looks like this after serialization:
"{\"questions\":{\"420\":\"Is your Java Application a ME, SE or EE
application?\",\"440\":\"If your Java Application is an SE application
does it use Java Web Start?\",\"450\":\"If your Java Application is a
Java Web Application, list the application server used for
production\",\"490\":\"List any Java Web Services Technologies
Used\",\"500\":\"List any Java Web Application Technologies Used for
presentation\",\"510\":\"List any Java EE Technologies used in your
application\"}}"
Making it unrecognizable to the autocompleter. This is pretty
frustrating to me. Maybe I am expecting this to do something that it was
never designed to do. My end goal was to be able to evaluate the ID of
the question that the user selected from the autocompleter.
I'm giving up this path and looking elsewhere. Thanks to everyone that
replied to my question and tried to help me.
MG
-----Original Message-----
From: Griffith, Michael * [mailto:Michael.Griffith@(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, can I return it from the JSON plug in
without the plug in doing anything further to it?
In other words, does the plug in look at what it is trying to serialize
and say, "Hey this is already valid JSON, I don't need to do anything to
it..." or will it try to add additional info to the string returned?
I'm guessing the shortest path for me is to just create the string in my
own serialization loop, but I don't want to confuse the plug in -- if
that makes any sense.
MG
-----Original Message-----
From: Musachy Barroso [mailto:musachy@(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 *
<Michael.Griffith@(protected):
> Dave,
>
> I think the bigger problem is the JSON that is returned, while it may
be
> valid, it not in the right structure expected. I should be generating
> JSON like this:
>
> {"questions":{"420":"Is your Java Application a ME, SE or EE
> application?","440":"If your Java Application is an SE application
does
> it use Java Web Start?"}}
>
> The [] brackets seem to be ignored by the parser.
>
> -----Original Message-----
> From: Dave Newton [mailto:newton.dave@(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, Michael *" <Michael.Griffith@(protected):
> > Yea, I think so -- I copied and pasted this from the log
> file/console...
> >
> > From: Dave Newton [mailto:newton.dave@(protected)]
> >
> > Is it generating those brackets around your JSON?
> >
> > --- "Griffith, Michael *" <Michael.Griffith@(protected):
> >
> > > Musachy,
> > >
> > > Thanks for your many replies... Does this JSON look like the right
> > > format? As far as I can tell, it matches your snippet below -- but
I
> > get
> > > the same dojo parting error.
> > >
> > > [{"questions":{"420":"Is your Java Application a ME, SE or EE
> > > application?"}},{"questions":{"440":"If your Java Application is
an
> SE
> > > application does it use Java Web Start?"}},{"questions":{"450":"If
> > your
> > > Java Application is a Java Web Application, list the application
> > server
> > > used for production"}}]
> > >
> > > -----Original Message-----
> > > From: Musachy Barroso [mailto:musachy@(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 with a map
> field
> > > that matches the name of "dataFieldName" in the autocompleter tag:
> > >
> > > class QuestionJson {
> > > private Map questions;
> > > ....
> > > }
> > >
> > > public QuestionJson getQuestionJson() {
> > > Question q= ... [from my list]
> > > Map m = new HaswhMap();
> > > m.put("Key1", q.getQuestion1());
> > > m.put("Key2", q.getQuestion2());
> > > return new QuestionJson(m);
> > > }
> > >
> > > <s:autocompleter ... dataFieldName="questions" ../>
> > >
> > > that will generate something like:
> > >
> > > {
> > > "questions": {
> > > "Key1" : "Question 1",
> > > "Key2" : "Question 2",
> > > }
> > > }
> > >
> > > //that's the idea, but I typed out of what I remember which is
often
> > not
> > > good :)
> > >
> > > musachy
> > >
> > > On Feb 4, 2008 4:34 PM, Griffith, Michael *
> > > <Michael.Griffith@(protected):
> > > > Musachy,
> > > >
> > > > I'm still not getting it...
> > > > I am now serializing a list of maps with the entity id and text
I
> > > > want...
> > > >
> > > > Map<String,String> m= new HashMap<String,String>();
> > > > Question q= ... [from my list]
> > > > m.put("id", q.getId().toString());
> > > > m.put("text", q.getText());
> > > > newList.add(m);
> > > >
> > > > And my JSON result looks:
> > > >
> > > > [JSON][{"text":"Is your Java Application a ME, SE or EE
> > > > application?","id":"420"},{"text":"If your Java Application is
an
> SE
> > > > application does it use Java Web Start?","id":"440"},{"text":"If
> > your
> > > > Java Application is a Java Web Application, list the application
> > > server
> > > > used for production","id":"450"},{"text":"List any Java Web
> Services
> > > > Technologies Used","id":"490"},{"text":"List any Java Web
> > Application
> > > > Technologies Used for presentation","id":"500"},{"text":"List
any
> > Java
> > > > EE Technologies used in your application","id":"510"}]
> > > >
> > > > I added the @JSON annotation as such:
> > > >
> > > > @JSON(name="question")
> > > > public List<Map<String,String>> getNewList(){
> > > > return newList;
> > > > }
> > > >
> > > > But it appears to be ignored.
> > > >
> > > > MG
> > > >
> > > > -----Original Message-----
> > > > From: Musachy Barroso [mailto:musachy@(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 *
> > > > <Michael.Griffith@(protected):
> > > > > So, if you have an array of Entity objects, in my case
question:
> > > > >
> > > > > How can I produce?
> > > > > {
> > > > > "question" : [
> > > > > ["1","question 1 text..."],
> > > > > ["2","question 2 text..."]
> > > > >
> > > > > ]
> > > > > }
> > > > >
> > > > > -----Original Message-----
> > > > > From: Musachy Barroso [mailto:musachy@(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.
> > > > >
> > > > > musachy
> > > > >
> > > > > On Feb 4, 2008 3:20 PM, Griffith, Michael *
> > > > > <Michael.Griffith@(protected):
> > > > > > Musachy,
> > > > > >
> > > > > > I must have missed your point. Isn't the idea of using the
> JSON
> > > > > plug-in
> > > > > > so you don't have to iterate and create the list? If I have
an
> > > array
> > > > > 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:musachy@(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 this link:
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
http://cwiki.apache.org/WW/ajax-and-javascript-recipes.html#AjaxandJavaS
> > > > > > criptRecipes-Autocompleter
> > > > > >
> > > > > > otherwise just an array of arrays should do:
> > > > > >
> > > > > > [
> > > > > > ["Alabama", "AL"],
> > > > > > ["Alaska", "AK"]
> > > > > > ]
> > > > > >
> > > > > > musachy
> > > > > >
> > > > > > On Feb 4, 2008 2:46 PM, Griffith, Michael *
> > > > > > <Michael.Griffith@(protected):
> > > > > > > Musachy
> > > > > > >
> > > > > > > Here is the autocompleter tag and the JSON returned...
> > > > > > >
> >
> === message truncated ===
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_182271.ezm (zipped)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 *
<Michael.Griffith@(protected):
> Well, to answer my own question -- the answer is no. The JSON result
> serialization process escapes quotation marks, so my response that
> looked like this before serialization:
>
> {"questions":{"420":"Is your Java Application a ME, SE or EE
> application?","440":"If your Java Application is an SE application does
> it use Java Web Start?","450":"If your Java Application is a Java Web
> Application, list the application server used for
> production","490":"List any Java Web Services Technologies
> Used","500":"List any Java Web Application Technologies Used for
> presentation","510":"List any Java EE Technologies used in your
> application"}}
>
> Looks like this after serialization:
>
> "{\"questions\":{\"420\":\"Is your Java Application a ME, SE or EE
> application?\",\"440\":\"If your Java Application is an SE application
> does it use Java Web Start?\",\"450\":\"If your Java Application is a
> Java Web Application, list the application server used for
> production\",\"490\":\"List any Java Web Services Technologies
> Used\",\"500\":\"List any Java Web Application Technologies Used for
> presentation\",\"510\":\"List any Java EE Technologies used in your
> application\"}}"
>
> Making it unrecognizable to the autocompleter. This is pretty
> frustrating to me. Maybe I am expecting this to do something that it was
> never designed to do. My end goal was to be able to evaluate the ID of
> the question that the user selected from the autocompleter.
>
> I'm giving up this path and looking elsewhere. Thanks to everyone that
> replied to my question and tried to help me.
>
> MG
>
>
> -----Original Message-----
> From: Griffith, Michael * [mailto:Michael.Griffith@(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, can I return it from the JSON plug in
> without the plug in doing anything further to it?
>
> In other words, does the plug in look at what it is trying to serialize
> and say, "Hey this is already valid JSON, I don't need to do anything to
> it..." or will it try to add additional info to the string returned?
>
> I'm guessing the shortest path for me is to just create the string in my
> own serialization loop, but I don't want to confuse the plug in -- if
> that makes any sense.
>
> MG
>
> -----Original Message-----
> From: Musachy Barroso [mailto:musachy@(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 *
> <Michael.Griffith@(protected):
> > Dave,
> >
> > I think the bigger problem is the JSON that is returned, while it may
> be
> > valid, it not in the right structure expected. I should be generating
> > JSON like this:
> >
> > {"questions":{"420":"Is your Java Application a ME, SE or EE
> > application?","440":"If your Java Application is an SE application
> does
> > it use Java Web Start?"}}
> >
> > The [] brackets seem to be ignored by the parser.
> >
> > -----Original Message-----
> > From: Dave Newton [mailto:newton.dave@(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, Michael *" <Michael.Griffith@(protected):
> > > Yea, I think so -- I copied and pasted this from the log
> > file/console...
> > >
> > > From: Dave Newton [mailto:newton.dave@(protected)]
> > >
> > > Is it generating those brackets around your JSON?
> > >
> > > --- "Griffith, Michael *" <Michael.Griffith@(protected):
> > >
> > > > Musachy,
> > > >
> > > > Thanks for your many replies... Does this JSON look like the right
> > > > format? As far as I can tell, it matches your snippet below -- but
> I
> > > get
> > > > the same dojo parting error.
> > > >
> > > > [{"questions":{"420":"Is your Java Application a ME, SE or EE
> > > > application?"}},{"questions":{"440":"If your Java Application is
> an
> > SE
> > > > application does it use Java Web Start?"}},{"questions":{"450":"If
> > > your
> > > > Java Application is a Java Web Application, list the application
> > > server
> > > > used for production"}}]
> > > >
> > > > -----Original Message-----
> > > > From: Musachy Barroso [mailto:musachy@(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 with a map
> > field
> > > > that matches the name of "dataFieldName" in the autocompleter tag:
> > > >
> > > > class QuestionJson {
> > > > private Map questions;
> > > > ....
> > > > }
> > > >
> > > > public QuestionJson getQuestionJson() {
> > > > Question q= ... [from my list]
> > > > Map m = new HaswhMap();
> > > > m.put("Key1", q.getQuestion1());
> > > > m.put("Key2", q.getQuestion2());
> > > > return new QuestionJson(m);
> > > > }
> > > >
> > > > <s:autocompleter ... dataFieldName="questions" ../>
> > > >
> > > > that will generate something like:
> > > >
> > > > {
> > > > "questions": {
> > > > "Key1" : "Question 1",
> > > > "Key2" : "Question 2",
> > > > }
> > > > }
> > > >
> > > > //that's the idea, but I typed out of what I remember which is
> often
> > > not
> > > > good :)
> > > >
> > > > musachy
> > > >
> > > > On Feb 4, 2008 4:34 PM, Griffith, Michael *
> > > > <Michael.Griffith@(protected):
> > > > > Musachy,
> > > > >
> > > > > I'm still not getting it...
> > > > > I am now serializing a list of maps with the entity id and text
> I
> > > > > want...
> > > > >
> > > > > Map<String,String> m= new HashMap<String,String>();
> > > > > Question q= ... [from my list]
> > > > > m.put("id", q.getId().toString());
> > > > > m.put("text", q.getText());
> > > > > newList.add(m);
> > > > >
> > > > > And my JSON result looks:
> > > > >
> > > > > [JSON][{"text":"Is your Java Application a ME, SE or EE
> > > > > application?","id":"420"},{"text":"If your Java Application is
> an
> > SE
> > > > > application does it use Java Web Start?","id":"440"},{"text":"If
> > > your
> > > > > Java Application is a Java Web Application, list the application
> > > > server
> > > > > used for production","id":"450"},{"text":"List any Java Web
> > Services
> > > > > Technologies Used","id":"490"},{"text":"List any Java Web
> > > Application
> > > > > Technologies Used for presentation","id":"500"},{"text":"List
> any
> > > Java
> > > > > EE Technologies used in your application","id":"510"}]
> > > > >
> > > > > I added the @JSON annotation as such:
> > > > >
> > > > > @JSON(name="question")
> > > > > public List<Map<String,String>> getNewList(){
> > > > > return newList;
> > > > > }
> > > > >
> > > > > But it appears to be ignored.
> > > > >
> > > > > MG
> > > > >
> > > > > -----Original Message-----
> > > > > From: Musachy Barroso [mailto:musachy@(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 *
> > > > > <Michael.Griffith@(protected):
> > > > > > So, if you have an array of Entity objects, in my case
> question:
> > > > > >
> > > > > > How can I produce?
> > > > > > {
> > > > > > "question" : [
> > > > > > ["1","question 1 text..."],
> > > > > > ["2","question 2 text..."]
> > > > > >
> > > > > > ]
> > > > > > }
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: Musachy Barroso [mailto:musachy@(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.
> > > > > >
> > > > > > musachy
> > > > > >
> > > > > > On Feb 4, 2008 3:20 PM, Griffith, Michael *
> > > > > > <Michael.Griffith@(protected):
> > > > > > > Musachy,
> > > > > > >
> > > > > > > I must have missed your point. Isn't the idea of using the
> > JSON
> > > > > > plug-in
> > > > > > > so you don't have to iterate and create the list? If I have
> an
> > > > array
> > > > > > 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:musachy@(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 this link:
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://cwiki.apache.org/WW/ajax-and-javascript-recipes.html#AjaxandJavaS
> > > > > > > criptRecipes-Autocompleter
> > > > > > >
> > > > > > > otherwise just an array of arrays should do:
> > > > > > >
> > > > > > > [
> > > > > > > ["Alabama", "AL"],
> > > > > > > ["Alaska", "AK"]
> > > > > > > ]
> > > > > > >
> > > > > > > musachy
> > > > > > >
> > > > > > > On Feb 4, 2008 2:46 PM, Griffith, Michael *
> > > > > > > <Michael.Griffith@(protected):
> > > > > > > > Musachy
> > > > > > > >
> > > > > > > > Here is the autocompleter tag and the JSON returned...
> > > > > > > >
> > >
> > === message truncated ===
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment:
user_182272.ezm (zipped)Musachy,
I've looked over the documentation, and looked 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:musachy@(protected)]
Sent: Tuesday, February 05, 2008 11:23 AM
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 *
<Michael.Griffith@(protected):
> Well, to answer my own question -- the answer is no. The JSON result
> serialization process escapes quotation marks, so my response that
> looked like this before serialization:
>
> {"questions":{"420":"Is your Java Application a ME, SE or EE
> application?","440":"If your Java Application is an SE application
does
> it use Java Web Start?","450":"If your Java Application is a Java Web
> Application, list the application server used for
> production","490":"List any Java Web Services Technologies
> Used","500":"List any Java Web Application Technologies Used for
> presentation","510":"List any Java EE Technologies used in your
> application"}}
>
> Looks like this after serialization:
>
> "{\"questions\":{\"420\":\"Is your Java Application a ME, SE or EE
> application?\",\"440\":\"If your Java Application is an SE application
> does it use Java Web Start?\",\"450\":\"If your Java Application is a
> Java Web Application, list the application server used for
> production\",\"490\":\"List any Java Web Services Technologies
> Used\",\"500\":\"List any Java Web Application Technologies Used for
> presentation\",\"510\":\"List any Java EE Technologies used in your
> application\"}}"
>
> Making it unrecognizable to the autocompleter. This is pretty
> frustrating to me. Maybe I am expecting this to do something that it
was
> never designed to do. My end goal was to be able to evaluate the ID of
> the question that the user selected from the autocompleter.
>
> I'm giving up this path and looking elsewhere. Thanks to everyone
that
> replied to my question and tried to help me.
>
> MG
>
>
> -----Original Message-----
> From: Griffith, Michael * [mailto:Michael.Griffith@(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, can I return it from the JSON plug in
> without the plug in doing anything further to it?
>
> In other words, does the plug in look at what it is trying to
serialize
> and say, "Hey this is already valid JSON, I don't need to do anything
to
> it..." or will it try to add additional info to the string returned?
>
> I'm guessing the shortest path for me is to just create the string in
my
> own serialization loop, but I don't want to confuse the plug in -- if
> that makes any sense.
>
> MG
>
> -----Original Message-----
> From: Musachy Barroso [mailto:musachy@(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 *
> <Michael.Griffith@(protected):
> > Dave,
> >
> > I think the bigger problem is the JSON that is returned, while it
may
> be
> > valid, it not in the right structure expected. I should be
generating
> > JSON like this:
> >
> > {"questions":{"420":"Is your Java Application a ME, SE or EE
> > application?","440":"If your Java Application is an SE application
> does
> > it use Java Web Start?"}}
> >
> > The [] brackets seem to be ignored by the parser.
> >
> > -----Original Message-----
> > From: Dave Newton [mailto:newton.dave@(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, Michael *" <Michael.Griffith@(protected):
> > > Yea, I think so -- I copied and pasted this from the log
> > file/console...
> > >
> > > From: Dave Newton [mailto:newton.dave@(protected)]
> > >
> > > Is it generating those brackets around your JSON?
> > >
> > > --- "Griffith, Michael *" <Michael.Griffith@(protected):
> > >
> > > > Musachy,
> > > >
> > > > Thanks for your many replies... Does this JSON look like the
right
> > > > format? As far as I can tell, it matches your snippet below --
but
> I
> > > get
> > > > the same dojo parting error.
> > > >
> > > > [{"questions":{"420":"Is your Java Application a ME, SE or EE
> > > > application?"}},{"questions":{"440":"If your Java Application is
> an
> > SE
> > > > application does it use Java Web
Start?"}},{"questions":{"450":"If
> > > your
> > > > Java Application is a Java Web Application, list the application
> > > server
> > > > used for production"}}]
> > > >
> > > > -----Original Message-----
> > > > From: Musachy Barroso [mailto:musachy@(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 with a map
> > field
> > > > that matches the name of "dataFieldName" in the autocompleter
tag:
> > > >
> > > > class QuestionJson {
> > > > private Map questions;
> > > > ....
> > > > }
> > > >
> > > > public QuestionJson getQuestionJson() {
> > > > Question q= ... [from my list]
> > > > Map m = new HaswhMap();
> > > > m.put("Key1", q.getQuestion1());
> > > > m.put("Key2", q.getQuestion2());
> > > > return new QuestionJson(m);
> > > > }
> > > >
> > > > <s:autocompleter ... dataFieldName="questions" ../>
> > > >
> > > > that will generate something like:
> > > >
> > > > {
> > > > "questions": {
> > > > "Key1" : "Question 1",
> > > > "Key2" : "Question 2",
> > > > }
> > > > }
> > > >
> > > > //that's the idea, but I typed out of what I remember which is
> often
> > > not
> > > > good :)
> > > >
> > > > musachy
> > > >
> > > > On Feb 4, 2008 4:34 PM, Griffith, Michael *
> > > > <Michael.Griffith@(protected):
> > > > > Musachy,
> > > > >
> > > > > I'm still not getting it...
> > > > > I am now serializing a list of maps with the entity id and
text
> I
> > > > > want...
> > > > >
> > > > > Map<String,String> m= new HashMap<String,String>();
> > > > > Question q= ... [from my list]
> > > > > m.put("id", q.getId().toString());
> > > > > m.put("text", q.getText());
> > > > > newList.add(m);
> > > > >
> > > > > And my JSON result looks:
> > > > >
> > > > > [JSON][{"text":"Is your Java Application a ME, SE or EE
> > > > > application?","id":"420"},{"text":"If your Java Application is
> an
> > SE
> > > > > application does it use Java Web
Start?","id":"440"},{"text":"If
> > > your
> > > > > Java Application is a Java Web Application, list the
application
> > > > server
> > > > > used for production","id":"450"},{"text":"List any Java Web
> > Services
> > > > > Technologies Used","id":"490"},{"text":"List any Java Web
> > > Application
> > > > > Technologies Used for presentation","id":"500"},{"text":"List
> any
> > > Java
> > > > > EE Technologies used in your application","id":"510"}]
> > > > >
> > > > > I added the @JSON annotation as such:
> > > > >
> > > > > @JSON(name="question")
> > > > > public List<Map<String,String>> getNewList(){
> > > > > return newList;
> > > > > }
> > > > >
> > > > > But it appears to be ignored.
> > > > >
> > > > > MG
> > > > >
> > > > > -----Original Message-----
> > > > > From: Musachy Barroso [mailto:musachy@(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 *
> > > > > <Michael.Griffith@(protected):
> > > > > > So, if you have an array of Entity objects, in my case
> question:
> > > > > >
> > > > > > How can I produce?
> > > > > > {
> > > > > > "question" : [
> > > > > > ["1","question 1 text..."],
> > > > > > ["2","question 2 text..."]
> > > > > >
> > > > > > ]
> > > > > > }
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: Musachy Barroso [mailto:musachy@(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.
> > > > > >
> > > > > > musachy
> > > > > >
> > > > > > On Feb 4, 2008 3:20 PM, Griffith, Michael *
> > > > > > <Michael.Griffith@(protected):
> > > > > > > Musachy,
> > > > > > >
> > > > > > > I must have missed your point. Isn't the idea of using the
> > JSON
> > > > > > plug-in
> > > > > > > so you don't have to iterate and create the list? If I
have
> an
> > > > array
> > > > > > 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:musachy@(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 this link:
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
http://cwiki.apache.org/WW/ajax-and-javascript-recipes.html#AjaxandJavaS
> > > > > > > criptRecipes-Autocompleter
> > > > > > >
> > > > > > > otherwise just an array of arrays should do:
> > > > > > >
> > > > > > > [
> > > > > > > ["Alabama", "AL"],
> > > > > > > ["Alaska", "AK"]
> > > > > > > ]
> > > > > > >
> > > > > > > musachy
> > > > > > >
> > > > > > > On Feb 4, 2008 2:46 PM, Griffith, Michael *
> > > > > > > <Michael.Griffith@(protected):
> > > > > > > > Musachy
> > > > > > > >
> > > > > > > > Here is the autocompleter tag and the JSON returned...
> > > > > > > >
> > >
> > === message truncated ===
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_182266.ezm (zipped)
yaa,
in struts shwocase check the web.xml and dwr.xml.
wou would require dwrxxx.jar for this in web-inf/lib and struts theme="ajax"
in the jsps.
hope this helps.
Filipe David Manana-2 wrote:
>
> Hi,
>
> Has anyone been able to put dwr 2.0 working with struts 2.0.11 ajax
> validation?
>
>
>
> --
> Filipe David Manana,
> fdmanana@(protected)
>
> Obvious facts are like secrets to those not trained to see them.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_182267.ezm (zipped)
yaa,
in struts shwocase check the web.xml and dwr.xml.
wou would require dwrxxx.jar for this in web-inf/lib and struts theme="ajax"
in the jsps.
A detailed explanation is given @:
http://java-x.blogspot.com/2007/03/reverse-ajax-with-direct-web-remoting.html
even i learnt it from there.
hope this helps.
Filipe David Manana-2 wrote:
>
> Hi,
>
> Has anyone been able to put dwr 2.0 working with struts 2.0.11 ajax
> validation?
>
>
>
> --
> Filipe David Manana,
> fdmanana@(protected)
>
> Obvious facts are like secrets to those not trained to see them.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_182269.ezm (zipped)Well, thanks for the reply
My problem is not setting up DWR.
I have DWR 1.1.3 working with struts 2.0.11 ajax form validation.
I just want to migrate to dwr 2.0. But if I replace dwr 1.1.3 with dwr
2.0, my form ajax validation no longer works. Whenever one required
form field looses focus, I get a javascript alert dialog with the
message "null".
I suppose this is not working because of struts2's generated javascript calls.
Any one tried?
On Feb 5, 2008 4:47 PM, ravi_eze <ravichandrac@(protected):
>
> yaa,
>
> in struts shwocase check the web.xml and dwr.xml.
>
> wou would require dwrxxx.jar for this in web-inf/lib and struts theme="ajax"
> in the jsps.
>
> A detailed explanation is given @:
> http://java-x.blogspot.com/2007/03/reverse-ajax-with-direct-web-remoting.html
> even i learnt it from there.
>
>
> hope this helps.
>
>
>
> Filipe David Manana-2 wrote:
> >
> > Hi,
> >
> > Has anyone been able to put dwr 2.0 working with struts 2.0.11 ajax
> > validation?
> >
> >
> >
> > --
> > Filipe David Manana,
> > fdmanana@(protected)
> >
> > Obvious facts are like secrets to those not trained to see them.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Struts-2.0.11-%2B-DWR-2.0-%2B-ajax-validation-tp15287347p15291439.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
Filipe David Manana,
fdmanana@(protected)
Obvious facts are like secrets to those not trained to see them.

Attachment:
user_182270.ezm (zipped)hi,
I require encoding get parameters into the requestURI field but I can't
find the way e.g.
<%@(protected)"%>
<%@(protected)"%>
<%@(protected)" %>
<display:table name="statistics" id="statistics" defaultorder="descending"
requestURI="/SimulationReport.action?simulationKey=&"
export="false" sort="list"
decorator="com.sag.optimizer.ui.web.displaytag.decorator.StatisticDecorator">
<display:column property="name" title="Statistic" />
<display:column property="value" title="Value"
format="{0,number,0.00}" sortable="true" style="text-align: right;"
headerClass="sortable" />
<display:caption style="font-weight: bold; font-size:
120%;">Statistics</display:caption>
</display:table>
Assuming I make available a parameter "simulationKey":
<% String mySimulationKey =
request.getAttribute("simulationKey").toString(); %>
<display:table name="statistics" id="statistics" defaultorder="descending"
requestURI="/SimulationReport.action?simulationKey=<%=mySimulationKey%>&"
...
or
<s:url var="simulationReport" includeParams="get"
value="/SimulationReport.action" >
<s:param name="simulationKey" value="%{simulationKey}" />
</s:url>
<display:table name="statistics" id="statistics" defaultorder="descending"
requestURI="%{#simulationReport}"
...
I have also tried calling a javascript function and encoding it there
but does not work either :(
Any advice?
regards,
Giovanni

Attachment:
user_182273.ezm (zipped)All you should need is a getter in your action for simulationKey and then
> <display:table name="statistics" id="statistics" defaultorder="descending"
> requestURI="/SimulationReport.action?simulationKey=${simulationKey}"
Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications
> From: Giovanni Azua <giaz@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Tue, 05 Feb 2008 18:17:35 +0100
> To: Struts Users Mailing List <user@(protected)>
> Subject: dispaytag + Struts 2.1.x: encoding parameters into requestURI
>
> hi,
>
> I require encoding get parameters into the requestURI field but I can't
> find the way e.g.
>
> <%@(protected)"%>
> <%@(protected)"%>
> <%@(protected)" %>
>
> <display:table name="statistics" id="statistics" defaultorder="descending"
> requestURI="/SimulationReport.action?simulationKey=&"
> export="false" sort="list"
> decorator="com.sag.optimizer.ui.web.displaytag.decorator.StatisticDecorator">
> <display:column property="name" title="Statistic" />
> <display:column property="value" title="Value"
> format="{0,number,0.00}" sortable="true" style="text-align: right;"
> headerClass="sortable" />
> <display:caption style="font-weight: bold; font-size:
> 120%;">Statistics</display:caption>
> </display:table>
>
> Assuming I make available a parameter "simulationKey":
>
> <% String mySimulationKey =
> request.getAttribute("simulationKey").toString(); %>
>
> <display:table name="statistics" id="statistics" defaultorder="descending"
> requestURI="/SimulationReport.action?simulationKey=<%=mySimulationKey%>&"
> ...
>
> or
>
> <s:url var="simulationReport" includeParams="get"
> value="/SimulationReport.action" >
> <s:param name="simulationKey" value="%{simulationKey}" />
> </s:url>
>
> <display:table name="statistics" id="statistics" defaultorder="descending"
> requestURI="%{#simulationReport}"
> ...
>
> I have also tried calling a javascript function and encoding it there
> but does not work either :(
>
> Any advice?
>
> regards,
> Giovanni
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.