Struts Token help

2007-12-20 Thread Indresh Chadha
Hi, I need to stop: 1. multiple post to an action 2. refresh of a page using Struts. What i tried was using the Struts Token. I have a common BaseAction class that extends Action class. All the other action classes extend the BaseAction class. In my BaseAction class I did the following:

Re: JSON and ExtJS

2007-12-20 Thread joey
struts2 json plugin for extjs works good for most time. but extjs 's grid json structure is a little special, you could extend json plugin's classes to support it. ps:In some situations,you could try freemarker type result. Like global exception,validation errors... --

Meilleurs voeux / Best wishes greetings

2007-12-20 Thread Martin Provost
Bonjour à tous, Je profite de l'occasion pour vous offrir mes voeux de noël et une bonne année 2008, a vous et votre famille. To all, Merry Christmas and a truely wonderful year 2008 to you and your family. Cheers! Martin Provost Keops Technologies Inc.

Re: i18n and variable tiles definitions

2007-12-20 Thread Alberto A. Flores
yes Peter Rumstle wrote: So I've found a method that works. Perhaps it s what you were trying to explain in the first place. Rather than use an EL expression in the tiles definition to say which object should be used in the page title key parameter, I just define a parameter called titleKeyPa

RE: Action call not calling action method

2007-12-20 Thread Henry Park
Sorry for the late response. I had to work on something else. I am still having an issue with this. I did not change any attributes in my struts-default.xml. Here is a part of my struts.xml file: /jsp/include/menu.jsp ... Henry -Original Mes

RE: i18n and variable tiles definitions

2007-12-20 Thread Peter Rumstle
So I've found a method that works. Perhaps it s what you were trying to explain in the first place. Rather than use an EL expression in the tiles definition to say which object should be used in the page title key parameter, I just define a parameter called titleKeyParam1 that the controller

Struts2 redirect action result type and URI query string

2007-12-20 Thread Filipe David Manana
Hi, I want to do a redirection to an action based on the result name of some other action. The problem is that I want to pass a number of parameters that I don't know in advance how many they are (neither their values). I have only a query string available (like ?p1=v1&p2=v2&ord=1 ...). I have the

Re: REST and JSON

2007-12-20 Thread Jeromy Evans
Adam Hardy wrote: I have a couple of questions on this subject too, if it's OK to join in here: I was trying to find the low-down on 2.1 on the wiki or the jira, so i could get an impression of what and how much is implemented. I couldn't work out exactly what's what: there are 170 open jira

Re: REST and JSON

2007-12-20 Thread Jeromy Evans
Frans Thamura wrote: hi all i am using JSON Plugins and RSS plugin in my S2Project and we know there will be REST in S2 2.1 anyone can give me the glue The JSON plugin can be used as a ContentTypeHandler with the REST plugin. Presumably the RSS plugin can also be used as a ContentTypeHandl

RE: i18n and variable tiles definitions

2007-12-20 Thread Peter Rumstle
btw, I've also tried this slight variation: tiles.xml name="titleKey" value="record.detail.title" type="string"/> name="titleKeyParam1" value="${recordId}" type="string"/> Which gives me the page title: "Record Detail: ${recordId}". Also giving me the problem that it is no

Re: SEVERE: Error filterStart

2007-12-20 Thread Dave Newton
--- Xibin Liu <[EMAIL PROTECTED]> wrote: > By playing with the filters in web.xml, I identified that the following > filter causes the error. > > struts2 > > org.apache.struts2.dispatcher.FilterDispatcher > > >

RE: i18n and variable tiles definitions

2007-12-20 Thread Peter Rumstle
This idea seems really promising, but I have been unable to implement it. Here is what I have tried: resource_en.properties record.detail.title=Record Detail:{0} tiles.xml jsp template page My controller passes to the jsp view a parameter called "recordId". I know that i

Re: JSON and ExtJS

2007-12-20 Thread Peter Bliznak
ok...you made my day!!! now I can get rid of all streaming stuff from my action and struts.xml ok...I admit it pays off to read docs :-) THANKS!!! - Original Message From: Musachy Barroso <[EMAIL PROTECTED]> To: Struts Users Mailing List Sent: Thursday, December 20, 2007 4:27:24

Re: JSON and ExtJS

2007-12-20 Thread Musachy Barroso
yes indeed. http://cwiki.apache.org/S2PLUGINS/json-plugin.html musachy On Dec 20, 2007 4:23 PM, Peter Bliznak <[EMAIL PROTECTED]> wrote: > hm..so you are saying > > putting things into MAP like this: > > MAP entry 1 : success true > entry 2 : rotalCount 2 > entry

Re: JSON and ExtJS

2007-12-20 Thread Peter Bliznak
hm..so you are saying putting things into MAP like this: MAP entry 1 : success true entry 2 : rotalCount 2 entry 3 : rootList is going to create this: { 'success': true, 'totalCount':'2', 'root':[{'description':'desc0','id':0,'name':'name0','val

SEVERE: Error filterStart

2007-12-20 Thread Xibin Liu
I am deploying a struts2 application over tomcat 5.5 and get the following error: Dec 20, 2007 4:10:06 PM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Dec 20, 2007 4:10:06 PM org.apache.catalina.core.StandardContext start SEVERE: Context

[ANN] FreeMarker template tool for Struts2 developers

2007-12-20 Thread Jeromy Evans
Modifying Struts 2 themes can be a frustrating task for people unfamiliar with FreeMarker templates, especially fiddling around with those pesky little <#lt>,<#t> and <#rt> tags and built-in variables. Mainly to reduce my own frustration, I've created a little tool to help preview the FreeMark

Re: JSON and ExtJS

2007-12-20 Thread Musachy Barroso
just add fields to your action with those names and values, or return a map with all those value as the root object to be serialized. musachy On Dec 20, 2007 3:49 PM, Peter Bliznak <[EMAIL PROTECTED]> wrote: > We are using EXTJS and Struts2 + Hibernate Search and JPA and here are no > problems.

Re: JSON and ExtJS

2007-12-20 Thread Peter Bliznak
We are using EXTJS and Struts2 + Hibernate Search and JPA and here are no problems. As for JSON plugin mentioned below. I was using it for old dojo before we gave up on it and switched to beatifull EXTJS. But I dont think I can use this JSON plugin since there is no way - or let me put it thi

Re: JSON and ExtJS

2007-12-20 Thread Musachy Barroso
You might also want to take a look at the JSON plugin, to decouple your action from JSON at all. musachy On Dec 20, 2007 12:28 PM, Gary Affonso <[EMAIL PROTECTED]> wrote: > Rick Reumann wrote: > > On Dec 20, 2007 10:54 AM, Martin Gainty <[EMAIL PROTECTED]> wrote: > > > >> JavaDoc mentions that sh

Re: JSON and ExtJS

2007-12-20 Thread Gary Affonso
Rick Reumann wrote: On Dec 20, 2007 10:54 AM, Martin Gainty <[EMAIL PROTECTED]> wrote: JavaDoc mentions that shallow serialization will take place with the include being arbiter of which collection classes may be serialized.. hibernate has a similar situation where lazy_init="true" but I can re

Re: i18n and variable tiles definitions

2007-12-20 Thread Alberto A. Flores
you can do the same thing passing the strings keys in the tiles, then play with the jsp pages using JSTL ... //repeat process I'm pretty sure you should be able to also put tags within tags (nested), but I've never tried it. Peter Rumstle wrote: Thats an excellent solutio

RE: i18n and variable tiles definitions

2007-12-20 Thread Peter Rumstle
Thats an excellent solution for the i18n part. I will change my code to use this method. I still don't know what the best way to add variables to the title tho. I know i can have variable placeholders in my resource file ex. resource_en.properties record.detail.title=Record Detail:{0} use

Re: i18n and variable tiles definitions

2007-12-20 Thread Antonio Petrelli
2007/12/20, Alberto A. Flores <[EMAIL PROTECTED]>: > Just a last note: you can use: And your "titleKey" attribute value will be imported as a page-scoped "titleKey" bean. Ciao Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED

Re: i18n and variable tiles definitions

2007-12-20 Thread Alberto A. Flores
May I suggest to instead of using the "title" value in the tiles, use the keys (e.g. "titleKey"), then fetched it using whatever approach you want to: Example: resource_en.properties application.title=Hello World Application tiles.xml jsp page (of course this uses unnecessary co

i18n and variable tiles definitions

2007-12-20 Thread Peter Rumstle
Hi everyone, I am running into what appears to be a limitation in tiles. I hope someone has encountered this problem before and knows of a workaround. I have a tiles based layout that accepts a "title" in the tiles definition. My problem is that I need the titl

Re: action namespace

2007-12-20 Thread Filipe David Manana
It works! :) Thank you. On 12/20/07, Omkar patil <[EMAIL PROTECTED]> wrote: > > Filipe, > > Try this in the intercept method - ai.getProxy().getNamespace() > (where ai is the ActionInvocation instance being passed in into the > intercept method) > > - Omkar > > Filipe David Manana wrote: > > Hi, >

Re: JSON and ExtJS

2007-12-20 Thread Pius Macha
Yes, What was your question? Frans Thamura <[EMAIL PROTECTED]> wrote: anyone work with JSON @ Struts2 and ExtJS integration F - Never miss a thing. Make Yahoo your homepage.

Re: JSON and ExtJS

2007-12-20 Thread Rick Reumann
On Dec 20, 2007 10:54 AM, Martin Gainty <[EMAIL PROTECTED]> wrote: > > JavaDoc mentions that shallow serialization will take place with the > include > being arbiter of which collection classes > may be serialized.. > hibernate has a similar situation where lazy_init="true" but I can request > hib

Re: action namespace

2007-12-20 Thread Omkar patil
Filipe, Try this in the intercept method - ai.getProxy().getNamespace() (where ai is the ActionInvocation instance being passed in into the intercept method) - Omkar Filipe David Manana wrote: Hi, In an Interceptors intercept method I am able to get the associated action's name, through th

Re: accessing url parameters in jsp.

2007-12-20 Thread j alex
Thanks guys..yeah, i hit upon s:url few hrs after i had posted this :-) On Dec 19, 2007 1:59 PM, Maxx <[EMAIL PROTECTED]> wrote: > On Dec 19, 2007 6:45 AM, j alex <[EMAIL PROTECTED]> wrote: > > Ideally, i would want the entire incoming query string be passed on to > the > > iframe- but didn't fin

Re: JSON and ExtJS

2007-12-20 Thread James Carr
I am... it works pretty sweet and with minimal hassle I'm currently revising a tutorial on using Struts 2 + JSON plugin + ExtJS to make a pageable data grid. I'll let everyone know when I post it. On a side note, it was insanely easy to use. I put it all together in about 10 minutes or so. Th

Re: JSON and ExtJS

2007-12-20 Thread Martin Gainty
Thanks for the great link! a few questions on JSONSerializer will thread synchronization ever be accomodated? user1 goes in and requests JSON object for Charlie Rose DB update goes into place correcting birthplace of Big Sky, Montanna to Big Sky, Montana user2 goes in and requests JSON object for

accessing struts package names in view

2007-12-20 Thread Michael Bauland
Hello, in Struts2 it's possible to group several actions into a common package. Those packages must have a unique name. Is there an easy way to access this name in, say, freemarker? Any help would be appreciated. Thanks, Michael --

Re: Taglib not seen, no text fields?

2007-12-20 Thread Alberto A. Flores
No such luck. The error message is gone in Eclipse, but the input boxes and submit button are still gone in Tomcat. you mean the generated HTML code, right? Strangely enough, the taglib was not in web.xml, but in a jsp. uhm? web.xml supports entries for taglibs, the URI in the JSP only says

Re: ActionErrors.validate()

2007-12-20 Thread Dave Newton
Are you using Struts 1 or Struts 2? You need to slow down and stop implementing random code and get a handle on what exactly it is you're using as compared to what you think you're using. It will make answering your questions much, much easier if we're all on the same page. d. --- AbelMacAdam <

Re: Taglib not seen, no text fields?

2007-12-20 Thread Dave Newton
--- AbelMacAdam <[EMAIL PROTECTED]> wrote: > Strangely enough, the taglib was not in web.xml, but in a jsp. The taglib *directive* is in a JSP; the taglib's TLD is in the struts-core library. From your initial posting it looked like you were mixing up S1 tags with S2 tags. The URI of a taglib i

ActionErrors.validate()

2007-12-20 Thread AbelMacAdam
Hi all, I just started reading a book about Struts, and are now learning about Error Handling. To validate the input of the user in the forum, you need to write your own implementation of org.apache.struts.action.ActionErrors. The class ActionErrors has its own method validate. This method I ca

Re: Taglib not seen, no text fields?

2007-12-20 Thread AbelMacAdam
PS. I do not know if my answering the questions in the way I do it breaks it for the readers of the mailinglist. I read and respond on the Nabble mailinglist archive. If my way of answering breaks it for the readers of the mailinglist, say so. I will stop this at once. Abel AbelMacAdam wrote: >

Re: Taglib not seen, no text fields?

2007-12-20 Thread AbelMacAdam
Hi Alberto, Thanks for taking the time for this extensive answer. I will try to answer the questions you pose Alberto A. Flores wrote: > > How are you building your application? It sounds like you are not using > maven (I highly recommend it so you avoid many problem). Now, a couple > of thin

action namespace

2007-12-20 Thread Filipe David Manana
Hi, In an Interceptors intercept method I am able to get the associated action's name, through the ApplicationContext: public String intercept(ActionInvocation ai) throws Exception { com.opensymphony.xwork2.ActionContext ac = ai.getInvocationContext(); log.info("CheckLoginIntercep

Re: JSON and ExtJS

2007-12-20 Thread Rick Reumann
Oops:) I just realized I replied to someone replying to the OP. Sorry Marcin:) On Dec 20, 2007 10:04 AM, Rick Reumann <[EMAIL PROTECTED]> wrote: > On Dec 20, 2007 9:57 AM, Marcin Zduniak <[EMAIL PROTECTED]> wrote: > > Could you be more precise ? I am working on project that employs all > > of ment

Re: JSON and ExtJS

2007-12-20 Thread Rick Reumann
On Dec 20, 2007 9:57 AM, Marcin Zduniak <[EMAIL PROTECTED]> wrote: > Could you be more precise ? I am working on project that employs all > of mentioned technologies. Well by precise, I mean I use Struts, I return JSON from my Actions and then use that JSON form y Extjs components. Once your JSON

Re: JSON and ExtJS

2007-12-20 Thread Marcin Zduniak
Could you be more precise ? I am working on project that employs all of mentioned technologies. Regards. Marcin Zduniak On Dec 20, 2007 3:54 PM, Frans Thamura <[EMAIL PROTECTED]> wrote: > anyone work with JSON @ Struts2 and ExtJS integration > ---

Re: JSON and ExtJS

2007-12-20 Thread Rick Reumann
I use it with Struts1.. not sure why it would be that much different. On Dec 20, 2007 9:54 AM, Frans Thamura <[EMAIL PROTECTED]> wrote: > anyone work with JSON @ Struts2 and ExtJS integration > > F > -- Rick - To unsubscribe,

JSON and ExtJS

2007-12-20 Thread Frans Thamura
anyone work with JSON @ Struts2 and ExtJS integration F

Re: REST and JSON

2007-12-20 Thread Frans Thamura
On 12/20/07, Adam Hardy <[EMAIL PROTECTED]> wrote: > > I have a couple of questions on this subject too, if it's OK to join in > here: i think the REST idea is cool i try to make my project also have REST implementation, and try to make a REST to PDF, the idea to make resume builder, like linke

Re: Taglib not seen, no text fields?

2007-12-20 Thread Alberto A. Flores
How are you building your application? It sounds like you are not using maven (I highly recommend it so you avoid many problem). Now, a couple of things about this post: - The error you are referring, is it an error in Eclipse or during deployment? Two BIG different things. - If Eclipse does

Re: Taglib not seen, no text fields?

2007-12-20 Thread Dave Newton
--- AbelMacAdam <[EMAIL PROTECTED]> wrote: > I (Dave) said (I think; your mail is quoted funny) >> What version of Struts 1 are you using? > None. I actually use 2.0.11. Then why are you trying to use S1 tags? > Struts.jar contains struts-html.tld There is no "struts.jar" in S2.0.11. There's str

Re: Taglib not seen, no text fields?

2007-12-20 Thread AbelMacAdam
AbelMacAdam wrote: > > Hi, > > I'm learning to work with Struts. (FWIW, I use Eclipse Europa, and > Apache/Tomcat). Now I have my first example with a tld-file. First of all, > I noticed the following error in Eclipse on a jsp: > Cannot find the tag library descriptor for /tags/struts-html >

Re: REST and JSON

2007-12-20 Thread Adam Hardy
I have a couple of questions on this subject too, if it's OK to join in here: I was trying to find the low-down on 2.1 on the wiki or the jira, so i could get an impression of what and how much is implemented. I couldn't work out exactly what's what: there are 170 open jira against 2.1.0 - 2.1.

RE: Exception Handling keeping user input

2007-12-20 Thread Jeremy JGR. Grumbach
It's working with an interceptor :-) All my actions are implementing ActionSupport and I use the ActionSupport class in my interceptor. This is maybe not the final version, and every comments are welcome, but it's working with this code. My goal is to catch only the exception of type MyException

Re: Taglib not seen, no text fields?

2007-12-20 Thread Alberto A. Flores
Easy way to check: unpack the jar and see if the META-INF directory contains the tld. It could very well be an incorrectly built jar. (it happens) :) Dave Newton wrote: --- AbelMacAdam <[EMAIL PROTECTED]> wrote: I'm learning to work with Struts. Struts 1, apparently? (I'd skip it if you can

Re: Taglib not seen, no text fields?

2007-12-20 Thread Dave Newton
--- AbelMacAdam <[EMAIL PROTECTED]> wrote: > I'm learning to work with Struts. Struts 1, apparently? (I'd skip it if you can and use Struts 2.) > Cannot find the tag library descriptor for /tags/struts-html > > The first line of the jsp with the error is: > <%@ taglib uri="/tags/struts-html" pr

Re: Struts 2.0.9 server side validation problem

2007-12-20 Thread Arpan Debroy
Actually what I have noticed that, if you make any mistake(may a single spelling) in validation xml file, it will not catch any validation error. On Dec 19, 2007 9:19 PM, TuomoS <[EMAIL PROTECTED]> wrote: > > How can I confirm that the XML validator file is read? It seems that the > actionName-va

Re: Struts 2 Multi Level Type Conversion

2007-12-20 Thread ravi_eze
hi, i had the same problem (http://forums.opensymphony.com/thread.jspa?threadID=184150&tstart=0) try creating a file: Calender-conversion.properties at location: /java/util/ (i.e. assuming location of calendar @: java.util.calender and assuming calendar is the object type of the field variable in

Re: Struts 2.0.9 server side validation problem

2007-12-20 Thread TuomoS
newton.dave wrote: > > >> Is it mandatory to define doctype in the validation xml file? > > That I don't know, but I don't know why you wouldn't put it in there; it > can > be pretty helpful. > > This was the case. Now that I added the doctype everything works. newton.dave wrote: > > >>

Re: S2: Struts2 @SkipValidation does not work

2007-12-20 Thread Joachim Ansorg
Hi, I think an interceptor is getting in between, as you mentioned further down the thread. I found out on my project that if the workflow interceptor finds error messages for the page the default result INPUT is returned. You can change that with this in your own interceptor stack:

RE: Question about validation mechanism

2007-12-20 Thread Jeremy JGR. Grumbach
Yes sorry, it was an interceptor stack. I had removed all the interceptors except the new one that I had created, and I did not now that the "mapping" between the request parameters and my action properties was done by an interceptor. I have re-added the default stack, and it's working perfectly n

ApplicationResources configuration wrong?

2007-12-20 Thread Sebastian Göttschkes
Hi, I'm experiencing strange behaviours with the application resources and I'm not sure about where to find the problem. I defined the Application Resource which should be used in the struts-config.xml: In the folder named in the xml, I created the following files: ApplicationResources.prope

Taglib not seen, no text fields?

2007-12-20 Thread AbelMacAdam
Hi, I'm learning to work with Struts. (FWIW, I use Eclipse Europa, and Apache/Tomcat). Now I have my first example with a tld-file. First of all, I noticed the following error in Eclipse on a jsp: Cannot find the tag library descriptor for /tags/struts-html The first line of the jsp with the er