Author Login
Post Reply
user Digest 4 Mar 2010 14:48:10 -0000 Issue 9018
Topics (messages 205211 through 205227):
Re: horizontal scroll in <s:select>
205211 by: Kawczynski, David
205215 by: adam pinder
All the Struts JSs could not be foundâ (e.g. optiontransferselect.js and others)
205212 by: on2
REST Plugin
205213 by: Jorge Sousa
struts-spring integration question
205214 by: Barry Kern
Locale and custom variables
205216 by: abhishek jain
205217 by: adam pinder
205221 by: Alex Rodriguez Lopez
205225 by: abhishek jain
205226 by: Alex Rodriguez Lopez
Struts2 JQuery select box
205218 by: nani2ratna
205219 by: adam pinder
205220 by: nani2ratna
205223 by: adam pinder
205224 by: nani2ratna
205227 by: Johannes Geppert
Values saving with brackets when setting values inside of lists of lists?
205222 by: Donald Abrams
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_205211.ezm (zipped)This sounds more like a usability issue or an html
layout issue rather then a Struts issue.
I'd consider doing something to address the usability
rather then trying to use a horizontal scroll.
If the data in the select list can't be condensed,
maybe it shouldn't be in a select.
> -----Original Message-----
> From: lucas owen [mailto:sr.ilustre@(protected)]
> Sent: Wednesday, March 03, 2010 7:29 AM
> To: Struts Users Mailing List
> Subject: horizontal scroll in <s:select>
>
> Hi struts users,
>
> I have a select with options too large (don't fit on the
> screen) so I need a
> horizontal scroll.
> By the way, it has to work on Firefox and IExplorer.
>
> anybody knows a possible solution for this problem?
>
> Thanks in advance,
> Sr. Ilustre
>
Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates Direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.

Attachment:
user_205215.ezm (zipped)
use a smaller font for the dropdown content or abbreviate the text or can the option value be the long text and the displayed value be much shorter ?
----------------------------------------
> Subject: RE: horizontal scroll in
> Date: Wed, 3 Mar 2010 09:22:46 -0500
> From: david_kawczynski@(protected)
> To: user@(protected)
>
> This sounds more like a usability issue or an html
> layout issue rather then a Struts issue.
> I'd consider doing something to address the usability
> rather then trying to use a horizontal scroll.
> If the data in the select list can't be condensed,
> maybe it shouldn't be in a select.
>
>
>
>> -----Original Message-----
>> From: lucas owen [mailto:sr.ilustre@(protected)]
>> Sent: Wednesday, March 03, 2010 7:29 AM
>> To: Struts Users Mailing List
>> Subject: horizontal scroll in
>>
>> Hi struts users,
>>
>> I have a select with options too large (don't fit on the
>> screen) so I need a
>> horizontal scroll.
>> By the way, it has to work on Firefox and IExplorer.
>>
>> anybody knows a possible solution for this problem?
>>
>> Thanks in advance,
>> Sr. Ilustre
>>
> Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates Direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
_________________________________________________________________
Tell us your greatest, weirdest and funniest Hotmail stories
http://clk.atdmt.com/UKM/go/195013117/direct/01/

Attachment:
user_205212.ezm (zipped)
Hello Struts Users,
We have an application using Struts 2.1.6, Tile and run on WebSphere. We
have issue with <s:optiontransferselect>. All the buttons in the middle are
not working. The <script type="text/javascript"
src="/PC/struts/optiontransferselect.js"></script> is inserted by the
Struts2 when view source on the IE7.0.5. We use FF3 to debug it, we found
the link to the JS and able to view the content of that JS but at the bottom
of the source it says
Error 404: SRVE0190E: File not found: /struts/optiontransferselect.js
We use Tile to create the standar layout.jsp. The layout.jsp is very simple,
it has 3 sections: head, body, and footer.The second JSP is the Welcome.jsp
page with contains something like the following:
<head>
<sx:head />
</head>
<body>
<sx:tabbedpanel cssStyle="width: 1024px; height: 600px;" doLayout="true"
id="tabContainer">
<sx:div id="homeTab" label="Home">
Welcome......
</sx:div>
<sx:div id="SearchTab" label="Search">
<li> <s:url action= ">Advanced Query </li></sx:div>
</sx:tabbedpanel>
The third JSP is the Advanced Query search page which contains the
optiontransferselect tag.
<head><sx:head /></head>
<body>
<s:optiontransferselect
leftTitle="Available Columns"
rightTitle="Selected Columns"
name="firstList"
list="columnList"
headerKey="headerKey"
doubleName="selColList"
doubleList="orderedList"
doubleHeaderKey="doubleHeaderKey"
allowUpDownOnRight="false"
allowUpDownOnLeft="false"
allowAddToRight="true"
allowAddToLeft="true" />
And when viewing the source from the IE7, seeing
<head>
<title>AdvancedQuery</title>
<link href="/PC/css/style.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" type="text/css" href="/PC/css/syshqw-main.css"/>
<script language="JavaScript" type="text/javascript">
// Dojo configuration
djConfig = {
isDebug: true,
bindEncoding: "UTF-8"
,baseRelativePath: "/PC/struts/dojo/"
,baseScriptUri: "/PC/struts/dojo/"
,parseWidgets : false
};
</script>
<script language="JavaScript" type="text/javascript"
src="/PC/struts/dojo/struts_dojo.js"></script>
<script language="JavaScript" type="text/javascript"
src="/PC/struts/ajax/dojoRequire.js"></script>
<script language="JavaScript" type="text/javascript">
dojo.hostenv.writeIncludes(true);
</script>
<link rel="stylesheet" href="/PC/struts/xhtml/styles.css" type="text/css"/>
<script language="JavaScript" src="/PC/struts/utils.js"
type="text/javascript"></script>
<script language="JavaScript" src="/PC/struts/xhtml/validation.js"
type="text/javascript"></script>
<script language="JavaScript" src="/PC/struts/css_xhtml/validation.js"
type="text/javascript"></script>
</head>
<body>
..................Some other stuff here
<script type="text/javascript"
src="/PC/struts/optiontransferselect.js"></script>
......................... some other stuff here
</body>
We did search online for this issue and follow those but still not working.
Also all the JS are inserted by Struts2could not be found by the application
(e.g. /struts/dojoRequire.js, /struts/utils.js ...)
Does anyone have a similar issue or find any solution for this? Thanks in
advance.
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_205213.ezm (zipped)Hi,
I'm facing some problems using this plugin, i want to handle multiple
parameters,something like the example:
http://localhost:6970/transferCredit?fromMSISDN=123456789&fromMSISDNType=coiso&toMSISDN=123456789&EuroCentsAmount=10
I checked the available examples ( available in
org.apache.struts2.rest.example) and all of them only owns a id that
fetches the parameter.
Below are the code of the example that i mencioned.
Any of you faced the same problem?
*
One more question:*
I used the name OrdersController in the class that implements my methods
and everything works fine, why did this stoped working when i changed
the name to OrdersHandlingController? I keeped the Controller at the
end, i think this should have worked.
Thanks in advance,
Jorge Sousa from Portugal
//======================================================================
Code Example:
public class OrdersController extends BaseAction implements
ModelDriven<Object>, Validateable{
private Order model = new Order();
private String id;
private Collection<Order> list;
private OrdersService ordersService = new OrdersService();
// GET /orders/1
public HttpHeaders show() {
return new DefaultHttpHeaders("show");
}
// GET /orders
public HttpHeaders index() {
list = ordersService.getAll();
return new DefaultHttpHeaders("index")
.disableCaching();
}
// GET /orders/1/edit
public String edit() {
return "edit";
}
// GET /orders/new
public String editNew() {
model = new Order();
return "editNew";
}
// GET /orders/1/deleteConfirm
public String deleteConfirm() {
return "deleteConfirm";
}
// DELETE /orders/1
public String destroy() {
ordersService.remove(id);
addActionMessage("Order removed successfully");
return "success";
}
// POST /orders
public HttpHeaders create() {
ordersService.save(model);
addActionMessage("New order created successfully");
return new DefaultHttpHeaders("success")
.setLocationId(model.getId());
}
// PUT /orders/1
public String update() {
ordersService.save(model);
addActionMessage("Order updated successfully");
return "success";
}
public void validate() {
if (model.getClientName() == null ||
model.getClientName().length() ==0) {
addFieldError("clientName", "The client name is empty");
}
}
public void setId(String id) {
if (id != null) {
this.model = ordersService.get(id);
}
this.id = id;
}
public Object getModel() {
return (list != null ? list : model);
}
}

Attachment:
user_205214.ezm (zipped)Hi,
I have been trying to implement some checks into my application during
startup by ensuring that my dependencies are checked. I tried putting
@Required on the setter in my action and I get this message during startup:
INFO XmlConfigurationProvider:380 - Unable to verify action class [xxx]
exists at initialization
Has anyone else experienced this or has advice on how to proceed?
thanks,
Barry

Attachment:
user_205216.ezm (zipped)Hi friends,
I have a few variables who have diff values depending on the locale /
country.
I do want to use a message-resources for storing the values of those
varaibles,
I do not know how to get these variables in my Action (I want them in action
and not jsp),
Can any one help,
I have tried System.out.println(getResources(request,"id2")); after setting
a locale and it do not work.
Pl. help,
--
Thanks and kind Regards,
Abhishek jain

Attachment:
user_205217.ezm (zipped)
i think you can name the resource bundle files appropriately for the locale and put them in the same package as the action classes.
look at the I18n Interceptor
adam
----------------------------------------
> Date: Thu, 4 Mar 2010 11:19:53 +0530
> Subject: Locale and custom variables
> From: abhishek.netjain@(protected)
> To: user@(protected)
>
> Hi friends,
>
> I have a few variables who have diff values depending on the locale /
> country.
> I do want to use a message-resources for storing the values of those
> varaibles,
> I do not know how to get these variables in my Action (I want them in action
> and not jsp),
> Can any one help,
> I have tried System.out.println(getResources(request,"id2")); after setting
> a locale and it do not work.
>
> Pl. help,
> --
> Thanks and kind Regards,
> Abhishek jain
_________________________________________________________________
Tell us your greatest, weirdest and funniest Hotmail stories
http://clk.atdmt.com/UKM/go/195013117/direct/01/

Attachment:
user_205221.ezm (zipped)Em 04-03-2010 05:49, abhishek jain escreveu:
> Hi friends,
>
> I have a few variables who have diff values depending on the locale /
> country.
> I do want to use a message-resources for storing the values of those
> varaibles,
> I do not know how to get these variables in my Action (I want them in action
> and not jsp),
> Can any one help,
> I have tried System.out.println(getResources(request,"id2")); after setting
> a locale and it do not work.
>
> Pl. help,
> --
> Thanks and kind Regards,
> Abhishek jain
>
Hi Abhishek,
if your Action extends ActionSupport, you can use one of the getText()
methods to do preciselly this, check
http://struts.apache.org/2.1.8.1/struts2-core/apidocs/com/opensymphony/xwork2/ActionSupport.html
.
We use it this way around here and it works fine (the resource
properties files being in the same package).
Regards,
Alex

Attachment:
user_205225.ezm (zipped)On Thu, Mar 4, 2010 at 7:30 PM, Alex Rodriguez Lopez <alopez@(protected)
> wrote:
> Em 04-03-2010 05:49, abhishek jain escreveu:
>
> Hi friends,
>>
>> I have a few variables who have diff values depending on the locale /
>> country.
>> I do want to use a message-resources for storing the values of those
>> varaibles,
>> I do not know how to get these variables in my Action (I want them in
>> action
>> and not jsp),
>> Can any one help,
>> I have tried System.out.println(getResources(request,"id2")); after
>> setting
>> a locale and it do not work.
>>
>> Pl. help,
>> --
>> Thanks and kind Regards,
>> Abhishek jain
>>
>>
> Hi Abhishek,
>
> if your Action extends ActionSupport, you can use one of the getText()
> methods to do preciselly this, check
> http://struts.apache.org/2.1.8.1/struts2-core/apidocs/com/opensymphony/xwork2/ActionSupport.html.
>
> We use it this way around here and it works fine (the resource properties
> files being in the same package).
>
> Regards,
>
> Alex
Dear Alex,
Thanks will check that
PS: Will it work for Struts 1.2 as well?
--
Thanks and kind Regards,
Abhishek jain

Attachment:
user_205226.ezm (zipped)Em 04-03-2010 14:15, abhishek jain escreveu:
> On Thu, Mar 4, 2010 at 7:30 PM, Alex Rodriguez Lopez<alopez@(protected)
>> wrote:
>
>> Em 04-03-2010 05:49, abhishek jain escreveu:
>>
>> Hi friends,
>>>
>>> I have a few variables who have diff values depending on the locale /
>>> country.
>>> I do want to use a message-resources for storing the values of those
>>> varaibles,
>>> I do not know how to get these variables in my Action (I want them in
>>> action
>>> and not jsp),
>>> Can any one help,
>>> I have tried System.out.println(getResources(request,"id2")); after
>>> setting
>>> a locale and it do not work.
>>>
>>> Pl. help,
>>> --
>>> Thanks and kind Regards,
>>> Abhishek jain
>>>
>>>
>> Hi Abhishek,
>>
>> if your Action extends ActionSupport, you can use one of the getText()
>> methods to do preciselly this, check
>> http://struts.apache.org/2.1.8.1/struts2-core/apidocs/com/opensymphony/xwork2/ActionSupport.html.
>>
>> We use it this way around here and it works fine (the resource properties
>> files being in the same package).
>>
>> Regards,
>>
>> Alex
>
>
> Dear Alex,
> Thanks will check that
> PS: Will it work for Struts 1.2 as well?
sorry I didn't get that you where using struts 1
struts 1 actions don't extend the same kind of class, you where already
doing right with getResources, I think it should work

Attachment:
user_205218.ezm (zipped)Hi,
I am trying to use http://code.google.com/p/struts2-jquery/ for loading
select box.
I just followed this link
http://www.weinfreund.de/struts2-jquery-showcase/index.action#.
Every thing is executing fine.
But the list not loading properly.
I am new to JSON.
I changed below jsp page which was working fine with normal select box.
my code is
JSP
<%@(protected)" %>
<%@(protected)"%>
<html>
<head>
<sj:head jqueryui="true" locale="za" jquerytheme="smoothness"/>
</head>
<body>
<div class="loginmodules">
<s:form action="updatePMDetails" id="updatePMDetails" namespace="/secure"
theme="simple" cssClass="form1">
<fieldset class="form1bg">
<legend>Product Master Description Details</legend>
<dl>
<dt><s:actionerror cssClass="error"/> </dt>
<dd><s:fielderror cssClass="error"/> </dd>
</dl>
<dl>
<dt><s:label id="label_skuid" key="pminfo.skuid"/></dt>
<dd><s:textfield title="SKUID tooltip" id="skuid" name="prodmDatPm.skuid"
readonly="true"/></dd>
</dl>
<dl>
<dt><s:label id="label_prodcat" key="pminfo.prodcat"/></dt>
<dd><s:textfield id="prodcat" name="prodmDatPm.prodcat"
readonly="true"/></dd>
</dl>
<dl>
<dt><s:label id="label_websitecate" key="pminfo.website_category"/></dt>
<dd>
<s:url id="remoteurl" action="JsonAction"/>
<sj:select href="%{remoteurl}" cssClass="category" list="prodCatList"
listKey="prodcat" listValue="prodcat_desc"
key="prodmDatPm.website_category"
value="prodmDatPm.website_category"></sj:select>
</dd>
</dl>
<s:form>
</body>
</html>
Above jsp got almost 100 fields. I just trancated it.
Action:
import
java.util.ArrayList;
import
java.util.List;
import
org.apache.struts2.convention.annotation.Action;
import
org.apache.struts2.convention.annotation.Actions;
import
org.apache.struts2.convention.annotation.ParentPackage;
import
org.apache.struts2.convention.annotation.Result;
import co.za.xxx.ecm.actions.EcmAction;
import co.za.xxx.ecm.business.vo.masterFile.PmProdCat;
import co.za.xxx.ecm.service.productmaster.ProdmDatPmService;
@ParentPackage(value = "pm-json")
public class JsonAction extends EcmAction {
/**
*
*/
private static final long serialVersionUID = -3858830120549401006L;
private List<PmProdCat> prodCatList;
private ProdmDatPmService prodmDatPmService;
public List<PmProdCat> getProdCatList() {
return prodCatList;
}
public void setProdCatList(List<PmProdCat> prodCatList) {
this.prodCatList = prodCatList;
}
public ProdmDatPmService getProdmDatPmService() {
return prodmDatPmService;
}
public void setProdmDatPmService(ProdmDatPmService prodmDatPmService) {
this.prodmDatPmService = prodmDatPmService;
}
@Actions( {
@Action(value = "/JsonAction", results = {
@Result(name = "success", type = "json")
})
})
public String execute(){
System.out.println("This is execute method in json action calss");
prodCatList = new ArrayList<PmProdCat>();
prodCatList = prodmDatPmService.getProdCatList();
System.out.println(prodCatList);
return SUCCESS;
}
public String getJSON()
{
System.out.println("This is getJSon method in json action calss");
return execute();
}
}
Struts.xml
<package name="pm-json" extends="json-default">
</package>
When jsp loading, its calling my action class.
Action class calling service class and loading list into prodcatList.
But its not getting into list box.
Can anybody please explain whats the problem is.
Thanks in advance
RS
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_205219.ezm (zipped) why did you choose to use jquery rather than just normal struts select and let the action class create an array of objects (i use an object that has a key/value pair)
i haven't used jquery but not sure what extra it adds.
adam
----------------------------------------
> Date: Thu, 4 Mar 2010 04:29:15 -0800
> From: nani2ratna@(protected)
> To: user@(protected)
> Subject: Struts2 JQuery select box
>
>
> Hi,
>
> I am trying to use http://code.google.com/p/struts2-jquery/ for loading
> select box.
> I just followed this link
> http://www.weinfreund.de/struts2-jquery-showcase/index.action#.
>
> Every thing is executing fine.
> But the list not loading properly.
> I am new to JSON.
>
> I changed below jsp page which was working fine with normal select box.
>
> my code is
>
> JSP
>
>
>
>
>
>
>
>
>> theme="simple" cssClass="form1">
>
> Product Master Description Details
>
>
>
>
>
>
>
> readonly="true"/>
>
>
>
>
> readonly="true"/>
>
>
>
>
>
>> listKey="prodcat" listValue="prodcat_desc"
> key="prodmDatPm.website_category"
> value="prodmDatPm.website_category">
>
>
>
>
>
>
>
> Above jsp got almost 100 fields. I just trancated it.
>
>
> Action:
>
>
> import
java.util.ArrayList;
> import
java.util.List;
>
> import
org.apache.struts2.convention.annotation.Action;
> import
org.apache.struts2.convention.annotation.Actions;
> import
org.apache.struts2.convention.annotation.ParentPackage;
> import
org.apache.struts2.convention.annotation.Result;
>
> import co.za.xxx.ecm.actions.EcmAction;
> import co.za.xxx.ecm.business.vo.masterFile.PmProdCat;
> import co.za.xxx.ecm.service.productmaster.ProdmDatPmService;
>
> @ParentPackage(value = "pm-json")
> public class JsonAction extends EcmAction {
>
> /**
> *
> */
> private static final long serialVersionUID = -3858830120549401006L;
>
> private List prodCatList;
> private ProdmDatPmService prodmDatPmService;
>
> public List getProdCatList() {
> return prodCatList;
> }
> public void setProdCatList(List prodCatList) {
> this.prodCatList = prodCatList;
> }
> public ProdmDatPmService getProdmDatPmService() {
> return prodmDatPmService;
> }
> public void setProdmDatPmService(ProdmDatPmService prodmDatPmService) {
> this.prodmDatPmService = prodmDatPmService;
> }
>
> @Actions( {
> @Action(value = "/JsonAction", results = {
> @Result(name = "success", type = "json")
> })
> })
> public String execute(){
> System.out.println("This is execute method in json action calss");
> prodCatList = new ArrayList();
> prodCatList = prodmDatPmService.getProdCatList();
> System.out.println(prodCatList);
> return SUCCESS;
> }
>
> public String getJSON()
> {
> System.out.println("This is getJSon method in json action calss");
> return execute();
> }
> }
>
> Struts.xml
>
>
>
>
>
>
>
> When jsp loading, its calling my action class.
> Action class calling service class and loading list into prodcatList.
> But its not getting into list box.
>
> Can anybody please explain whats the problem is.
>
> Thanks in advance
> RS
> --
> View this message in context: http://old.nabble.com/Struts2-JQuery-select-box-tp27780125p27780125.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)
>
_________________________________________________________________
Do you have a story that started on Hotmail? Tell us now
http://clk.atdmt.com/UKM/go/195013117/direct/01/

Attachment:
user_205220.ezm (zipped)I was using normal select only.
But now i need to do ajax stuff when user change the select box.
So jquery is doing this stuff.First i tried with two select boxes.
Then i tried to do atleast on select box.
Even one select box also not working.
Now I have to use this jquery select box to complete this task fast.
or else i need to write so much code to do this task.
Thanks
RS
adam pinder wrote:
>
>
>
> why did you choose to use jquery rather than just normal struts select and
> let the action class create an array of objects (i use an object that has
> a key/value pair)
>
> i haven't used jquery but not sure what extra it adds.
>
> adam
>
>
> ----------------------------------------
>> Date: Thu, 4 Mar 2010 04:29:15 -0800
>> From: nani2ratna@(protected)
>> To: user@(protected)
>> Subject: Struts2 JQuery select box
>>
>>
>> Hi,
>>
>> I am trying to use http://code.google.com/p/struts2-jquery/ for loading
>> select box.
>> I just followed this link
>> http://www.weinfreund.de/struts2-jquery-showcase/index.action#.
>>
>> Every thing is executing fine.
>> But the list not loading properly.
>> I am new to JSON.
>>
>> I changed below jsp page which was working fine with normal select box.
>>
>> my code is
>>
>> JSP
>>
>>
>>
>>
>>
>>
>>
>>
>
>>> theme="simple" cssClass="form1">
>>
>
>> Product Master Description Details
>>
>
>
>>
>
>
>>
>
>
>>
>
>>
>
>
>>
>
>
>>
>
>> readonly="true"/>
>
>>
>
>>
>
>
>>
>
>
>>
>
>> readonly="true"/>
>
>>
>
>>
>
>
>>
>
>
>>
>
>
>>
>>> listKey="prodcat" listValue="prodcat_desc"
>> key="prodmDatPm.website_category"
>> value="prodmDatPm.website_category">
>>
>
>>
>
>>
>>
>>
>>
>>
>> Above jsp got almost 100 fields. I just trancated it.
>>
>>
>> Action:
>>
>>
>> import
java.util.ArrayList;
>> import
java.util.List;
>>
>> import
org.apache.struts2.convention.annotation.Action;
>> import
org.apache.struts2.convention.annotation.Actions;
>> import
org.apache.struts2.convention.annotation.ParentPackage;
>> import
org.apache.struts2.convention.annotation.Result;
>>
>> import co.za.xxx.ecm.actions.EcmAction;
>> import co.za.xxx.ecm.business.vo.masterFile.PmProdCat;
>> import co.za.xxx.ecm.service.productmaster.ProdmDatPmService;
>>
>> @ParentPackage(value = "pm-json")
>> public class JsonAction extends EcmAction {
>>
>> /**
>> *
>> */
>> private static final long serialVersionUID = -3858830120549401006L;
>>
>> private List prodCatList;
>> private ProdmDatPmService prodmDatPmService;
>>
>> public List getProdCatList() {
>> return prodCatList;
>> }
>> public void setProdCatList(List prodCatList) {
>> this.prodCatList = prodCatList;
>> }
>> public ProdmDatPmService getProdmDatPmService() {
>> return prodmDatPmService;
>> }
>> public void setProdmDatPmService(ProdmDatPmService prodmDatPmService) {
>> this.prodmDatPmService = prodmDatPmService;
>> }
>>
>> @Actions( {
>> @Action(value = "/JsonAction", results = {
>> @Result(name = "success", type = "json")
>> })
>> })
>> public String execute(){
>> System.out.println("This is execute method in json action calss");
>> prodCatList = new ArrayList();
>> prodCatList = prodmDatPmService.getProdCatList();
>> System.out.println(prodCatList);
>> return SUCCESS;
>> }
>>
>> public String getJSON()
>> {
>> System.out.println("This is getJSon method in json action calss");
>> return execute();
>> }
>> }
>>
>> Struts.xml
>>
>>
>>
>>
>>
>>
>>
>> When jsp loading, its calling my action class.
>> Action class calling service class and loading list into prodcatList.
>> But its not getting into list box.
>>
>> Can anybody please explain whats the problem is.
>>
>> Thanks in advance
>> RS
>> --
>> View this message in context:
>> http://old.nabble.com/Struts2-JQuery-select-box-tp27780125p27780125.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)
>>
> _________________________________________________________________
> Do you have a story that started on Hotmail? Tell us now
> http://clk.atdmt.com/UKM/go/195013117/direct/01/
> ---------------------------------------------------------------------
> 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_205223.ezm (zipped) can you not call javascript with an onchange and do ajax call in javascript to action class ... i guess it depends on what ajax stuff you're doing but i have done it that way.
good luck
adam
> Date: Thu, 4 Mar 2010 05:18:09 -0800
> From: nani2ratna@(protected)
> To: user@(protected)
> Subject: RE: Struts2 JQuery select box
>
>
> I was using normal select only.
> But now i need to do ajax stuff when user change the select box.
> So jquery is doing this stuff.First i tried with two select boxes.
> Then i tried to do atleast on select box.
> Even one select box also not working.
> Now I have to use this jquery select box to complete this task fast.
> or else i need to write so much code to do this task.
>
> Thanks
> RS
>
>
> adam pinder wrote:
> >
> >
> >
> > why did you choose to use jquery rather than just normal struts select and
> > let the action class create an array of objects (i use an object that has
> > a key/value pair)
> >
> > i haven't used jquery but not sure what extra it adds.
> >
> > adam
> >
> >
> > ----------------------------------------
> >> Date: Thu, 4 Mar 2010 04:29:15 -0800
> >> From: nani2ratna@(protected)
> >> To: user@(protected)
> >> Subject: Struts2 JQuery select box
> >>
> >>
> >> Hi,
> >>
> >> I am trying to use http://code.google.com/p/struts2-jquery/ for loading
> >> select box.
> >> I just followed this link
> >> http://www.weinfreund.de/struts2-jquery-showcase/index.action#.
> >>
> >> Every thing is executing fine.
> >> But the list not loading properly.
> >> I am new to JSON.
> >>
> >> I changed below jsp page which was working fine with normal select box.
> >>
> >> my code is
> >>
> >> JSP
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >>> theme="simple" cssClass="form1">
> >>
> >
> >> Product Master Description Details
> >>
> >
> >
> >>
> >
> >
> >>
> >
> >
> >>
> >
> >>
> >
> >
> >>
> >
> >
> >>
> >
> >> readonly="true"/>
> >
> >>
> >
> >>
> >
> >
> >>
> >
> >
> >>
> >
> >> readonly="true"/>
> >
> >>
> >
> >>
> >
> >
> >>
> >
> >
> >>
> >
> >
> >>
> >>> listKey="prodcat" listValue="prodcat_desc"
> >> key="prodmDatPm.website_category"
> >> value="prodmDatPm.website_category">
> >>
> >
> >>
> >
> >>
> >>
> >>
> >>
> >>
> >> Above jsp got almost 100 fields. I just trancated it.
> >>
> >>
> >> Action:
> >>
> >>
> >> import
java.util.ArrayList;
> >> import
java.util.List;
> >>
> >> import
org.apache.struts2.convention.annotation.Action;
> >> import
org.apache.struts2.convention.annotation.Actions;
> >> import
org.apache.struts2.convention.annotation.ParentPackage;
> >> import
org.apache.struts2.convention.annotation.Result;
> >>
> >> import co.za.xxx.ecm.actions.EcmAction;
> >> import co.za.xxx.ecm.business.vo.masterFile.PmProdCat;
> >> import co.za.xxx.ecm.service.productmaster.ProdmDatPmService;
> >>
> >> @ParentPackage(value = "pm-json")
> >> public class JsonAction extends EcmAction {
> >>
> >> /**
> >> *
> >> */
> >> private static final long serialVersionUID = -3858830120549401006L;
> >>
> >> private List prodCatList;
> >> private ProdmDatPmService prodmDatPmService;
> >>
> >> public List getProdCatList() {
> >> return prodCatList;
> >> }
> >> public void setProdCatList(List prodCatList) {
> >> this.prodCatList = prodCatList;
> >> }
> >> public ProdmDatPmService getProdmDatPmService() {
> >> return prodmDatPmService;
> >> }
> >> public void setProdmDatPmService(ProdmDatPmService prodmDatPmService) {
> >> this.prodmDatPmService = prodmDatPmService;
> >> }
> >>
> >> @Actions( {
> >> @Action(value = "/JsonAction", results = {
> >> @Result(name = "success", type = "json")
> >> })
> >> })
> >> public String execute(){
> >> System.out.println("This is execute method in json action calss");
> >> prodCatList = new ArrayList();
> >> prodCatList = prodmDatPmService.getProdCatList();
> >> System.out.println(prodCatList);
> >> return SUCCESS;
> >> }
> >>
> >> public String getJSON()
> >> {
> >> System.out.println("This is getJSon method in json action calss");
> >> return execute();
> >> }
> >> }
> >>
> >> Struts.xml
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> When jsp loading, its calling my action class.
> >> Action class calling service class and loading list into prodcatList.
> >> But its not getting into list box.
> >>
> >> Can anybody please explain whats the problem is.
> >>
> >> Thanks in advance
> >> RS
> >> --
> >> View this message in context:
> >> http://old.nabble.com/Struts2-JQuery-select-box-tp27780125p27780125.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)
> >>
> > _________________________________________________________________
> > Do you have a story that started on Hotmail? Tell us now
> > http://clk.atdmt.com/UKM/go/195013117/direct/01/
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
> >
>
> --
> View this message in context: http://old.nabble.com/Struts2-JQuery-select-box-tp27780125p27780606.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)
>
_________________________________________________________________
Got a cool Hotmail story? Tell us now
http://clk.atdmt.com/UKM/go/195013117/direct/01/

Attachment:
user_205224.ezm (zipped)I can do that very easily.
I already got experience doing that stuff.
But I am the only one person in this project.
It is growing day by day.
If i get jquery up and running then code will look neat and for future i can
use the same.
Thanks and regards
RS
adam pinder wrote:
>
>
>
>
> can you not call javascript with an onchange and do ajax call in
> javascript to action class ... i guess it depends on what ajax stuff
> you're doing but i have done it that way.
>
>
>
> good luck
>
>
>
> adam
>
>
>
>> Date: Thu, 4 Mar 2010 05:18:09 -0800
>> From: nani2ratna@(protected)
>> To: user@(protected)
>> Subject: RE: Struts2 JQuery select box
>>
>>
>> I was using normal select only.
>> But now i need to do ajax stuff when user change the select box.
>> So jquery is doing this stuff.First i tried with two select boxes.
>> Then i tried to do atleast on select box.
>> Even one select box also not working.
>> Now I have to use this jquery select box to complete this task fast.
>> or else i need to write so much code to do this task.
>>
>> Thanks
>> RS
>>
>>
>> adam pinder wrote:
>> >
>> >
>> >
>> > why did you choose to use jquery rather than just normal struts select
>> and
>> > let the action class create an array of objects (i use an object that
>> has
>> > a key/value pair)
>> >
>> > i haven't used jquery but not sure what extra it adds.
>> >
>> > adam
>> >
>> >
>> > ----------------------------------------
>> >> Date: Thu, 4 Mar 2010 04:29:15 -0800
>> >> From: nani2ratna@(protected)
>> >> To: user@(protected)
>> >> Subject: Struts2 JQuery select box
>> >>
>> >>
>> >> Hi,
>> >>
>> >> I am trying to use http://code.google.com/p/struts2-jquery/ for
>> loading
>> >> select box.
>> >> I just followed this link
>> >> http://www.weinfreund.de/struts2-jquery-showcase/index.action#.
>> >>
>> >> Every thing is executing fine.
>> >> But the list not loading properly.
>> >> I am new to JSON.
>> >>
>> >> I changed below jsp page which was working fine with normal select
>> box.
>> >>
>> >> my code is
>> >>
>> >> JSP
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >
>> >>> theme="simple" cssClass="form1">
>> >>
>> >
>> >> Product Master Description Details
>> >>
>> >
>> >
>> >>
>> >
>> >
>> >>
>> >
>> >
>> >>
>> >
>> >>
>> >
>> >
>> >>
>> >
>> >
>> >>
>> >
>> >> readonly="true"/>
>> >
>> >>
>> >
>> >>
>> >
>> >
>> >>
>> >
>> >
>> >>
>> >
>> >> readonly="true"/>
>> >
>> >>
>> >
>> >>
>> >
>> >
>> >>
>> >
>> >
>> >>
>> >
>> >
>> >>
>> >>> listKey="prodcat" listValue="prodcat_desc"
>> >> key="prodmDatPm.website_category"
>> >> value="prodmDatPm.website_category">
>> >>
>> >
>> >>
>> >
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> Above jsp got almost 100 fields. I just trancated it.
>> >>
>> >>
>> >> Action:
>> >>
>> >>
>> >> import
java.util.ArrayList;
>> >> import
java.util.List;
>> >>
>> >> import
org.apache.struts2.convention.annotation.Action;
>> >> import
org.apache.struts2.convention.annotation.Actions;
>> >> import
org.apache.struts2.convention.annotation.ParentPackage;
>> >> import
org.apache.struts2.convention.annotation.Result;
>> >>
>> >> import co.za.xxx.ecm.actions.EcmAction;
>> >> import co.za.xxx.ecm.business.vo.masterFile.PmProdCat;
>> >> import co.za.xxx.ecm.service.productmaster.ProdmDatPmService;
>> >>
>> >> @ParentPackage(value = "pm-json")
>> >> public class JsonAction extends EcmAction {
>> >>
>> >> /**
>> >> *
>> >> */
>> >> private static final long serialVersionUID = -3858830120549401006L;
>> >>
>> >> private List prodCatList;
>> >> private ProdmDatPmService prodmDatPmService;
>> >>
>> >> public List getProdCatList() {
>> >> return prodCatList;
>> >> }
>> >> public void setProdCatList(List prodCatList) {
>> >> this.prodCatList = prodCatList;
>> >> }
>> >> public ProdmDatPmService getProdmDatPmService() {
>> >> return prodmDatPmService;
>> >> }
>> >> public void setProdmDatPmService(ProdmDatPmService prodmDatPmService)
>> {
>> >> this.prodmDatPmService = prodmDatPmService;
>> >> }
>> >>
>> >> @Actions( {
>> >> @Action(value = "/JsonAction", results = {
>> >> @Result(name = "success", type = "json")
>> >> })
>> >> })
>> >> public String execute(){
>> >> System.out.println("This is execute method in json action calss");
>> >> prodCatList = new ArrayList();
>> >> prodCatList = prodmDatPmService.getProdCatList();
>> >> System.out.println(prodCatList);
>> >> return SUCCESS;
>> >> }
>> >>
>> >> public String getJSON()
>> >> {
>> >> System.out.println("This is getJSon method in json action calss");
>> >> return execute();
>> >> }
>> >> }
>> >>
>> >> Struts.xml
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> When jsp loading, its calling my action class.
>> >> Action class calling service class and loading list into prodcatList.
>> >> But its not getting into list box.
>> >>
>> >> Can anybody please explain whats the problem is.
>> >>
>> >> Thanks in advance
>> >> RS
>> >> --
>> >> View this message in context:
>> >>
>> http://old.nabble.com/Struts2-JQuery-select-box-tp27780125p27780125.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)
>> >>
>> > _________________________________________________________________
>> > Do you have a story that started on Hotmail? Tell us now
>> > http://clk.atdmt.com/UKM/go/195013117/direct/01/
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-unsubscribe@(protected)
>> > For additional commands, e-mail: user-help@(protected)
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Struts2-JQuery-select-box-tp27780125p27780606.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)
>>
>
> _________________________________________________________________
> Got a cool Hotmail story? Tell us now
> http://clk.atdmt.com/UKM/go/195013117/direct/01/
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_205227.ezm (zipped)
Hello,
did your JSON Actions works fine?
Check if you really get an JSON response and the
variables inside the result have the same name.
Can you please POST your result with sample data?
Best Regards
Johannes Geppert
nani2ratna wrote:
>
> Hi,
>
> I am trying to use http://code.google.com/p/struts2-jquery/ for loading
> select box.
> I just followed this link
> http://www.weinfreund.de/struts2-jquery-showcase/index.action#.
>
> Every thing is executing fine.
> But the list not loading properly.
> I am new to JSON.
>
> I changed below jsp page which was working fine with normal select box.
>
> my code is
>
-----
---
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_205222.ezm (zipped)So I'm trying to save tables in struts.
I'm hitting a strange error when setting values of Lists of Lists, which
causes any value saved to be contained in brackets. The params interceptor
doesn't log these brackets so its probably an error in the setting function
(OGNL?). I couldn't find this behavior documented anywhere. I know
Multi-dimensional arrays work fine (String[][] instead of
List<List<String>>). Anyone know a workaround for lists of lists (example
below)?
Also, I couldn't find a way to make struts form tags work inside iterators.
Does anyone know of a plugin or extension that supports this? I have a
workaround, but its slower to duplicate the struts checkbox and multiselect
functionality by hand.
Thanks,
Don
#table.jsp
<form action="someAction">
<table>
<s:iterator value="listOfLists" status="rowStatus">
<tr>
<s:iterator status="columnStatus">
<td>
<input type="text" name="listOfLists[<s:property
value="#rowStatus.index"/>][<s:property value="#columnStatus.index"/>]"
value="<s:property/>">
</td>
</s:iterator>
</tr>
</s:iterator>
</table>
</form>
#action
public class SomeAction {
private List<List<String>> listOfLists;
public List<List<String>> getListOfLists() {
return table;
}
public SomeAction() {
if (listOfLists == null) {
listOfLists = new ArrayList<List<String>>();
for (int i = 0;i<10;i++) {
listOfLists.add(new ArrayList<String>());
for (int j = 0;j<10;j++)
listOfLists.get(i).add("(" + i + "," + j + ")");
}
}
}
}
#spring
<bean id="someAction" class="SomeAction" scope="singleton"/>
#struts
<action name="someAction" class="someAction">
<result>table.jsp</result>
</action>