Re: Xml based form validation not working

2010-04-20 Thread Lukasz Lenart
2010/4/19 Kartik Kumar krishnan.1...@gmail.com:    action name=action_item_search class=gov.nasa.spacebook.ActionItemTrackingAction method=fetchByCriteria XML file must have exactly the same name as action Class and method name, so ActionItemTrackingAction-fetchByCriteria-validation.xml 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

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 ListLong 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?),

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

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. -

RE: Convention Plugin not being picked up.

2010-04-20 Thread Miles, Chris
NOT PROTECTIVELY MARKED Hi, Thanks. My config only contains ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd; struts package name=checkout

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

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: 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 sharath karnati
Hi All,      Added below lines in struts.xml file     package name=admin extends=struts-default,json-default  result-types    result-type name=json class=org.apache.struts2.json.JSONResult / /result-types   action name=Autocomplete!* class=gov.admin.action.ManageAction method={1}  

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,

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

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 ?xml version=1.0 encoding=UTF-8 ?

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 bhaara...@gmail.com wrote: ConfigurationManager (

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: package name=admin extends=struts-default,json-default result-types result-type name=json class=org.apache.struts2.json.JSONResult / /result-types json-default extends struts-default, so no reason do list both (and I don't even know if that

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

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,

Re: Setter in action triggers twice. Bug?

2010-04-20 Thread Lukasz Lenart
2010/4/20 Francisco José Aquino García fj.aqu...@gmail.com: 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

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: 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 action name=first class=go resultgo.jsp/result /action action name=second class=go2 resultgo2.jsp/result /action !-- several

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 package

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

RE: Using json in Struts 2.1.8.1

2010-04-20 Thread Martin Gainty
supply the fully qualified action name to the url s:url var=url value=/admin/Autocomplete!getNames.action/ also make sure there is a result defined for that action in your declarator action name=JSONList result/ajax/JSONList.js/result /action anyone seen result