Re: struts action related query

2010-04-20 Thread Dale Newfield
Sounds like you want the browser to submit a request without attempting to replace the current page with the results. The way the browser does that is by using javascript and specifically a javascript object called XMLHttpRequest. Use of that has become called AJAX, and there are lots of libr

Re: struts action related query

2010-04-20 Thread jaya krishna
its better to use AJAX Jay On Wed, Apr 21, 2010 at 12:15 PM, Upasana Sharma wrote: > Hi all > > I have a jsp that opens up as a pop up. I want to call a form submit from > this jsp so that it calls some method in action. But I want that the jsp > remains static as pop up and do not redirect or f

struts action related query

2010-04-20 Thread Upasana Sharma
Hi all I have a jsp that opens up as a pop up. I want to call a form submit from this jsp so that it calls some method in action. But I want that the jsp remains static as pop up and do not redirect or forward to some other jsp. In struts.xml we have to specify some for some . Can you help me out

RE: Using json in Struts 2.1.8.1

2010-04-20 Thread Martin Gainty
supply the fully qualified action name to the url also make sure there is a result defined for that action in your declarator /ajax/JSONList.js anyone seen result type='json' ?? as far "not getting there" you should follow dales advice d/l and install firefox ht

Re: no action mapped for namespace

2010-04-20 Thread Bhaarat Sharma
@Luis: I don't think I understand what you are trying to do from that example...how will that help? I am trying to find out that if ActionContext.getInstance().getName() returns an action name say "test" and that is infact the action we want to land on...can it be So if the above line of code retu

RE: no action mapped for namespace

2010-04-20 Thread Martin Gainty
populated by the ActionTag populateParams() protected void populateParams() { super.populateParams(); ActionComponent action = (ActionComponent) component; action.setName(name); action.setNamespace(namespace); so in the case of this declaration ActionContext.

Re: no action mapped for namespace

2010-04-20 Thread Luis Martín Canaval Sánchez
I am not an expert but what I would do for this is create an action with a wildcard that should work like a "default" option in a "switch/select case". something like go.jsp go2.jsp NoActionMappedGO.jsp On Tue, Apr 20, 2010 at 15:19, Bhaarat Sharma wrote: > in struts2 is there a wa

no action mapped for namespace

2010-04-20 Thread Bhaarat Sharma
in struts2 is there a way to detect when "No action mapped for namespace ..." error will come up?? What I mean is that can we write an if condition that checks whether or not the the action name exists in struts.xml? we can get the action name by: ActionContext.getInstance().getName() So if the

Re: Setter in action triggers twice. Bug?

2010-04-20 Thread Lukasz Lenart
2010/4/20 Francisco José Aquino García : > Where are the sources for xwork-core-2.1.6 then? Here you have the latest version svn.apache.org/viewvc/struts/struts2/trunk/ The old can be found here http://svn.opensymphony.com/fisheye/browse/xwork Regards -- Łukasz http://www.lenart.org.pl/ Kapitu

Re: Using json in Struts 2.1.8.1

2010-04-20 Thread Dale Newfield
On 4/20/10 2:11 PM, sharath karnati wrote: but facing same problem... Because your problem doesn't appear to be a server-side one, but rather what's going on inside the browser. In struts.properties file having below line *struts.enable.DynamicMethodInvocation = **true* If that's true, th

Re: Using json in Struts 2.1.8.1

2010-04-20 Thread sharath karnati
Hi Dale,       Tried all the changes which you mentioned like keeping only 'json-default' and removing 'json' from result type but facing same problem...      In struts.properties file having below line        struts.enable.DynamicMethodInvocation = true     I'm using 'struts2-dojo-plugin

Re: Setter in action triggers twice. Bug?

2010-04-20 Thread Francisco José Aquino García
Where are the sources for xwork-core-2.1.6 then? I've downloaded the latest (2.1.8.1) '-src' and '-all' distributions but can't find the sources for xwork-core-2.1.6 The link for the '-src' zip points to struts-2.1.8-src.zip instead of struts-2.1.8.1-src.zip Also, the javadocs for xwork appear twic

Re: Using json in Struts 2.1.8.1

2010-04-20 Thread Dale Newfield
On 4/20/10 11:34 AM, sharath karnati wrote: json-default extends struts-default, so no reason do list both (and I don't even know if that works). json-default defines the result type json, so no reason to redefine it again. json I don't know if action names can

Re: programatically add configuration

2010-04-20 Thread Bhaarat Sharma
Is this not possible to do ? can we not programmaitcally add/load struts.xml into the instance? On Mon, Apr 19, 2010 at 2:48 PM, Bhaarat Sharma wrote: > ConfigurationManager ( > http://struts.apache.org/2.0.11.1/struts2-core/apidocs/com/opensymphony/xwork2/config/ConfigurationManager.html) > AP

Re: Convention Plugin not being picked up.

2010-04-20 Thread jonathan doklovic
Also, you can add: log4j.category.org.apache.struts2.convention=TRACE to your log4j.properties to get exhaustive logging about convention wiring up actions. - Jonathan Miles, Chris wrote: NOT PROTECTIVELY MARKED Hi, Thanks. My config only contains http://struts.apache.org/dtds/struts-

Re: Using json in Struts 2.1.8.1

2010-04-20 Thread Frans Thamura
hi all just want to share can we make Struts2 become like a SOA Middlerware, using JSON, so we can use like mule, the plugins become transfport is it possible? -- Frans Thamura Meruvian. Experiential Tempation of Java and Enterprise OpenSource Meruvian jTechnopreneur Program (S1) telah hadir

Code examples gone from wiki

2010-04-20 Thread jonathan doklovic
I've noticed that in the 2.1.8.1 wiki docs, all the code snippets are blank. They seem to be ok in the 2.1.6 docs. are the 2.1.8.1 docs using a different confluence code plugin or something? - Jonathan - To unsubscribe, e-mail:

Re: Using json in Struts 2.1.8.1

2010-04-20 Thread sharath karnati
Hi All,      Added below lines in struts.xml file              json     Added following lines .jsp file   Search JSON:      even included <%@ taglib prefix="sx" uri="/struts-dojo-tags"%> and   When it builds the page it is showing below lines   djConfig.searchIds.push(

Re: Convention Plugin not being picked up.

2010-04-20 Thread jonathan doklovic
Try setting struts.convention.default.parent.package = checkout The constant is documented under "XWork" in the convention plugin docs: http://struts.apache.org/2.1.8.1/docs/convention-plugin.html#ConventionPlugin-XWorkpackages Also, are your action classes in a package *.action.*? They must be

Re: Using json in Struts 2.1.8.1

2010-04-20 Thread Dale Newfield
On 4/19/10 2:14 PM, sharath karnati wrote: Can you please send me sample example using AJAX in struts 2.1.8, where action method returns json list to a page. Trying to catch up from being out of town all weekend (and Monday), so I'm just going to throw some results of searching google at you:

Re: Counter question

2010-04-20 Thread Dale Newfield
On 4/20/10 5:21 AM, Ganesh wrote: I have a integer value and i have to show that many number of images. Could any one help me how to use the Counter tag. More recent struts2 versions have more useful iterator use cases, so now you can just use begin, end, and step http://struts.apache.org/2.x

RE: Convention Plugin not being picked up.

2010-04-20 Thread Miles, Chris
NOT PROTECTIVELY MARKED Hi, Thanks. My config only contains http://struts.apache.org/dtds/struts-2.0.dtd";> My actions are contained within the WAR file within the EAR. No JARs in place. There is nothing in the setup documentation about setting the package property? Chris -Origi

Re: STRUTS2 + REST + SPRING Problem

2010-04-20 Thread jonathan doklovic
Are you using the struts-spring plugin? If so, I found I had to include: struts.objectFactory.spring.autoWire = name struts.objectFactory.spring.autoWire.alwaysRespect = true to get beans autowired by name. autowiring using auto or type wasn't working in my app so I had to do it by name. - J

Re: Convention Plugin not being picked up.

2010-04-20 Thread jonathan doklovic
I would also look at your struts config for the following: struts.convention.default.parent.package - should be the name of your default package declared in the config struts.convention.action.includeJars - if your actions are in separate jars, you may need to add a pattern here so convention

Re: Custom types and select lists

2010-04-20 Thread Alex Rodriguez Lopez
How I do it with selects is having getter/setter for whatever you write in name="" (in your case "campus") as type Long (should be List if select is multiple). In prepare() you put in campus the campus id of the campus that should be preselected (the one acording to the student id, right?), and

Counter question

2010-04-20 Thread Ganesh
Hello all, I have a integer value and i have to show that many number of images. Could any one help me how to use the Counter tag. Regards Ganesh Send instant messages to your online friends http://in.messenger.yahoo.com - To u