Re: RESTful Crud clean url:s, advanced howto anybody?

2008-10-24 Thread Ryan Wong
hello, will u try the new feature NamedVariablePatternMatcher http://www.nabble.com/Some-Idea-On-REST-mapping-td19263471.html#a19263471 Leonard Broman wrote: > > Hey! > > I've been looking around quite some time for a solution how to build a > neat REST driven web application. What I basical

Re: Formating in Struts 2

2008-10-24 Thread Ryan Wong
for date u can use and more common usage can be refer at http://struts.apache.org/2.1.2/docs/formatting-dates-and-numbers.html if u are using freemarker, it will be more flexible with ftl syntax. nestorjb wrote: > > Hi > > > > Isn’t there a way to apply formatting of number and dates in S

Re: sitemesh decorator problem with struts action

2008-10-24 Thread Ryan Wong
I'm sorry for that I haven't notice u r using struts 1... here is an article which sample code contains an example using struts1 and site mesh. http://www.onjava.com/pub/a/onjava/2004/09/22/sitemesh.html?page=3 regards. sa10 wrote: > > Thanks Ryan. > > Here is my web.xml could you please adv

Re: Remove [EMAIL PROTECTED]

2008-10-24 Thread Wendy Smoak
I've forwarded it to [EMAIL PROTECTED] which should reach one of the moderators. If it's still a problem in a couple of days, please ping again and I'll find someone in infrastructure to do it. -Wendy On Wed, Oct 22, 2008 at 5:45 PM, <[EMAIL PROTECTED]> wrote: > PLEASE BAG THIS USER!!! > > On T

Re: Formating in Struts 2

2008-10-24 Thread dusty
if you are using jsp why not use the jstl tag? The valueStack values are accessible in JSTL. nestorjb wrote: > > Hi > > > > Isn’t there a way to apply formatting of number and dates in Struts 2 at > the > JSP level?. I need to conditionally format a number depending on a > condition. Isn’t

Formating in Struts 2

2008-10-24 Thread Néstor Boscán
Hi Isn’t there a way to apply formatting of number and dates in Struts 2 at the JSP level?. I need to conditionally format a number depending on a condition. Isn’t there an equivalent in Struts 2 for JSTLs ??? Regards, Néstor Boscán

ExecuteAndWaitInterceptor test too fragile?

2008-10-24 Thread Gabriel Belingueres
Hi, Compiling S2 v2.1.3 I find that sometimes the ExecuteAndWaitInterceptorTest.testOneWaitWithDelay() test fails on "delay should be ca. 200 millis" assertion, and other times it passes OK. I'm currently not very familiarized with the ExecuteAndWaitInterceptor to modify it myself, but is the any

Re: disable a button if not selected any value

2008-10-24 Thread Jim Kiley
This is a pure Javascript activity -- it isn't something that Struts can directly help you with. On Fri, Oct 24, 2008 at 11:46 AM, Dravid <[EMAIL PROTECTED]> wrote: > > Hi, > > I have a dropdown box and and delete button on my jsp page. > > I have a requirement where user selects a value from dro

disable a button if not selected any value

2008-10-24 Thread Dravid
Hi, I have a dropdown box and and delete button on my jsp page. I have a requirement where user selects a value from dropdown box to delete it. If nothing is selected from the dropdown box then the delete button should be disabled. on selected it should be enabled. please help me how to do thi

RE: Struts Project Planning

2008-10-24 Thread Kawczynski, David
First, ask yourself what does the site need to do. This should answer your first set of questions. At this stage in your project I suggest paper prototyping. Make drawings that mock-up pages that do what your webapp needs to Accomplish and use them. Don't waste time trying to do this on a co

Re: Struts2 Portlet - pre/post render, pre/post action hooks?

2008-10-24 Thread Nils-Helge Garli Hegvik
Why do you need to remove it? If you have to remove it, can the servlet remove it after it has been used? I'm not sure a safe way exists to synchronize the rendering of the portlet and the servlet. I guess in most cases you could probably assume that the rendering is complete when the result has be

RE: Struts Project Planning

2008-10-24 Thread Casinova
thanks for answer, ok let me start with designing the UI. like how many web pages will be there? how they looks like and all, for that which tool i go for like i can easily drag and drop and make a prototype of web pages? Do u have any Idea? Thanks Kawczynski, David wrote: > > 1) How many cla

Re: sitemesh decorator problem with struts action

2008-10-24 Thread sa10
Thanks Ryan. Here is my web.xml could you please advise what I need to change? Thanks http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/n

RE: Struts Project Planning

2008-10-24 Thread Martin Gainty
responses with Re> > > > Hi all, > I am creating struts web application. i need suggestion from u all. how can > i planning my application . my application using database . > 1) how to decide how many classes and which are those required? Re>Easiest to implement a one-to-one mapping between An

RE: Struts Project Planning

2008-10-24 Thread Kawczynski, David
1) How many classes? It depends on what your webapp does. You're the Only one who can answer that. 2) Which and how many POJOS? See number one above. 3) I find it easiest to start with a prototype of the web application and go backwards from there. Note data-driven fields. Note all forms.

Struts Project Planning

2008-10-24 Thread Casinova
Hi all, I am creating struts web application. i need suggestion from u all. how can i planning my application . my application using database . 1) how to decide how many classes and which are those required? 2) what about POJOs ? how many and which are they required? 3) should i create classes ac

Re: Re: The Struts dispatcher cannot be found

2008-10-24 Thread Wes Wannemacher
You know, I wondered the same thing when it happened to me... I'm guessing to make it worse, the behavior probably changes if you change containers. Another thing to consider is that if your "exceptionLogger" result is to be available in any action in your app, global-results are only configured at

Re: struts2 select onchange to trigger ajax call

2008-10-24 Thread Sudheendra.N.Singh
Hi, I have a dropdown on the page and display a button. Now depending on which value I select in the dropdown I want to change the name of the button. Any idea how can I do it? Following is the code and it is in the same form.

RE: Re: The Struts dispatcher cannot be found

2008-10-24 Thread stanlick
Hey Wes -- Good catch bro! I do have oops.jsp configured in my web.xml, however, I don't see how an exception could bubble up to the container with this configuration in my struts.xml Scott Wes Wannemacher wrote: > > Scott, are yo

Re: Unit Testing Action Classes that are "Aware"

2008-10-24 Thread stanlick
Then perhaps you are reading the wrong book yo! If it's the session you wish, then implement SessionAware. These POJOish interfaces make testing a cake walk. On Fri, Oct 24, 2008 at 7:25 AM, Nick Maunder | Oathouse <[EMAIL PROTECTED]>wrote: > Ah ... my book doesn't mention RequestAware at all..

RE: Unit Testing Action Classes that are "Aware"

2008-10-24 Thread Nick Maunder | Oathouse
Ah ... my book doesn't mention RequestAware at all... useless!! lol Preseumably the objects I want to get at (the session data primarily) are then accessible as plain old java, and can be tested using JUnit? could you give me a pointer to find out more? Nick -Original Message- From: [

Re: Unit Testing Action Classes that are "Aware"

2008-10-24 Thread stanlick
Unless you really *need* to bind your actions to Http* types, you should use RequestAware. This allows the same end goal indirectly through a Map. Scott On Fri, Oct 24, 2008 at 7:10 AM, Nick Maunder | Oathouse <[EMAIL PROTECTED]>wrote: > Hi > > > > I'm fairly new to Struts 2 > > > > I'm looking

Unit Testing Action Classes that are "Aware"

2008-10-24 Thread Nick Maunder | Oathouse
Hi I'm fairly new to Struts 2 I'm looking for a way of unit testing Struts 2 action classes which are (for example) ServletRequestAware. Cactus (the old way I did it) does not appear suitable (or is it and I'm missing something?) and HttpUnit does not seem to do the job either. I can t

Re: Struts2 Portlet - pre/post render, pre/post action hooks?

2008-10-24 Thread Torsten Krah
Some more questions here. I need to know when "rendering" is done, because i want to remove some session attribute. I can't do this in my action, because a servlet is used to render some content based on this session attribute. After rendering i can remove it safely, but how to know this? Spring

Correct implementation of parameterInterceptor??

2008-10-24 Thread Burton Rhodes
I have a simple page the has 2 parts... Part 1) Information at the top about a contact that the user is viewing. Part 2) A form where a user can edit the information of a transaction that relates to the contact. When the user enters a invalid entry for a number field (in this example xaction.list

Re: Authentication from Apache -> tomcat

2008-10-24 Thread Paweł Wielgus
Hi Kavita, cookies are only valid inside one domain and scheme. So instant solution is to provide some kind of token passed along with this to tomcat. Then in tomcat ask RoR by webservice or something else if this token is valid and automaticly create session for incoming user. Or use same domain

Re: Portlet, DirectRenderFromEventAction - how to change the interceptor stack?

2008-10-24 Thread Nils-Helge Garli Hegvik
> However, PRG does allow transfering objects in the session (ActionErrors, > Messages and FieldErrors for example have to be put there to show them on the > next action - have to be "handwritten" interceptor or something). > The default portlet interceptor stack already handles this. It pushes th

Authentication from Apache -> tomcat

2008-10-24 Thread Kavita Mehta
Hi, I have a struts application on Tomcat which is linked by a Ruby on Rails application on Apache through tag . My problem is that -- when the user logs in to Rails application (on Apache server), he gets authenticated and a cookie is stored . -- The user clicks on the link to struts applicat

Re: Portlet, DirectRenderFromEventAction - how to change the interceptor stack?

2008-10-24 Thread Torsten Krah
Nvm, forget what i said - there it is: getRequest() instead of using getActionRequest ... thanks Nils pointing this to me, i think this should work. -- Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge. Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html Really, I'm not out

Re: Portlet, DirectRenderFromEventAction - how to change the interceptor stack?

2008-10-24 Thread Torsten Krah
Am Freitag, 24. Oktober 2008 11:09:43 schrieb Torsten Krah: > PortletActionContext.getActionRequest().getPortletSession() Some more thoughts about this. I think this is a design error in struts2. public static ActionRequest getActionRequest() { if (!isEvent()) { throw new

Re: Portlet, DirectRenderFromEventAction - how to change the interceptor stack?

2008-10-24 Thread Nils-Helge Garli Hegvik
> But the "redirectAction" is used in renderPhase and there i can't get the > ActionRequest. > > ActionRequest cannot be obtained in render phase Correct, but why do you need it in the render phase? Maybe you can decouple your action so that it completely separates the state change logic from the

Re: Portlet, DirectRenderFromEventAction - how to change the interceptor stack?

2008-10-24 Thread Torsten Krah
Am Freitag, 24. Oktober 2008 09:57:18 schrieben Sie: > If you can, I would suggest that > you re-organize your application so that every event (usually a post) > is followed by a redirect (using the redirect action result type). I still can but i don't see how it would work. If i use "redirectActi

Re: Portlet, DirectRenderFromEventAction - how to change the interceptor stack?

2008-10-24 Thread Nils-Helge Garli Hegvik
Ah, I get the problem. The "RenderDirect" action is really a "hack" to make it simple to port web applications that doesn't use the post-redirect-get pattern, which is basically how the event and render phase separation works in a portlet. If you can, I would suggest that you re-organize your appli

Re: Portlet, DirectRenderFromEventAction - how to change the interceptor stack?

2008-10-24 Thread Torsten Krah
Am Freitag, 24. Oktober 2008 07:35:18 schrieben Sie: > Is this what you're looking for? > > http://struts.apache.org/2.0.12/docs/interceptors.html#Interceptors-Interce >ptorParameterOverriding > > Nils-H That won't work. I need to overwrite the "defaultStack" in the defaultPortlet Interceptor Sta