Re: Struts 2 going to hang glassfish

2009-05-31 Thread mohsen ahmadian
Hello when i stop domain then GF write this logs in server.log . On Sun, May 31, 2009 at 12:35 PM, Nils-Helge Garli Hegvik wrote: > I'm sure you realize that for anyone to be able to help, you have to > provide some more information... Besides, I'd be surprised if you > can't find any trace of

Re: response.sendRedirect() with Struts2 within a portlet

2009-05-31 Thread Crishantha Nanayakkara
Hi Again, Just wanted to clarify my requirement again. We are building a portal based on Liferay to provide eServices. any eService will be launched as portlets. Hence each portlet will be a window to a single eService. While developing this eService sometimes we need to redirect to a common

Re: response.sendRedirect() with Struts2 within a portlet

2009-05-31 Thread Crishantha Nanayakkara
Hi Nilis-H, Thanks a lot for the update. Yes, I am trying to redirect to an external URL by just clicking a "submit" button within a portlet. As you said for that I am attempting to load the div with Ajax with contents from the external URL specified purely to display it within the portlet wind

Re: customize fielderror

2009-05-31 Thread Dave Newton
O_o I have no idea why you posted that. Martin Gainty wrote: velocity example which references parameters.name index resolution for fieldErrors #*--example from controlheader.vm *# ## Only show message if errors are available. This will be done if ActionSupport is used. #if( $fieldErrors.get(

RE: customize fielderror

2009-05-31 Thread Martin Gainty
velocity example which references parameters.name index resolution for fieldErrors #*--example from controlheader.vm *# ## Only show message if errors are available. This will be done if ActionSupport is used. #if( $fieldErrors.get($parameters.name) ) #OGNL stack finds a fieldError depending on

Re: why doesnt iterator tag provide 'next'

2009-05-31 Thread Musachy Barroso
yeah, they would be useful. On Sun, May 31, 2009 at 10:20 AM, Dave Newton wrote: > Jim Kiley wrote: >> >> I figured. The solution to "I can't solve this problem" is rarely "let's >> add >> a new tag to the framework." > > Wouldn't mind break or continue, though--I might use those sometimes. > > D

Re: customize fielderror

2009-05-31 Thread Dave Newton
Martin Gainty wrote: can we assume fieldErrors is some sort of List ? http://java.sun.com/javase/6/docs/api/java/util/List.html#get(int) No, fieldErrors is a map, the entries of which are a list--as the JSP snippet implied, and as in the docs. (would be easier to follow example if we coul

RE: customize fielderror

2009-05-31 Thread Martin Gainty
can we assume fieldErrors is some sort of List ? http://java.sun.com/javase/6/docs/api/java/util/List.html#get(int) (would be easier to follow example if we could see referenced variables) thanks, Martin Gainty __ Verzicht und Vertraulichkeitanmerkun

Re: response.sendRedirect() with Struts2 within a portlet

2009-05-31 Thread Nils-Helge Garli Hegvik
Unfortunately, you can't make an ajax request to the portlet. The ajax tags are not supported in a portlet, due to limitations in the JSR168 specification. Also, I'm not quite sure what you're trying to do. Are you attempting to load the div with Ajax with contents from a different url? Have you co

Re: response.sendRedirect() with Struts2 within a portlet

2009-05-31 Thread Crishantha Nanayakkara
Hi Nils-H, I got it working by using "ActionResponse aResponse = PortletActionContext.getActionResponse();" within the execute() method of the action event. Actually my main requirement is to redirect to an external URL within my portlet itself. For me to confine the external URL within the port

Re: customize fielderror

2009-05-31 Thread gutostraube
Hi all! I had the same problem here and I wrote the following code to avoid change the default struts template: newton.dave wrote: > > manub wrote: >> Yes. renders also and tag, and I don't need >> them. >> I'm in need of a way to showing only the errors for a specific field >> without >

Re: Struts 2 going to hang glassfish

2009-05-31 Thread Nils-Helge Garli Hegvik
I'm sure you realize that for anyone to be able to help, you have to provide some more information... Besides, I'd be surprised if you can't find any trace of anything in your logs. Nils-H On Sun, May 31, 2009 at 6:05 PM, mohsen ahmadian wrote: > Hello to all >  I have a project with Struts 2 ,D

Re: response.sendRedirect() with Struts2 within a portlet

2009-05-31 Thread Nils-Helge Garli Hegvik
You can use the PortletResponseAware to get the portlet response object. Nnils-H On Sun, May 31, 2009 at 10:20 AM, Crishantha Nanayakkara wrote: > > Hi, > > I have a requirement to use a response.sendRedirect() within my Action > class. Basically this action class is used to manipulate a porltet

RE: [s2] strange (for me) OGNL behavior

2009-05-31 Thread Martin Gainty
i assumed since your name is martin you are the most intelligent engineer in germany? Mit Freundliche Gruben! Martin __ Verzicht und Vertraulichkeitanmerkung Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bi

Re: response.sendRedirect() with Struts2 within a portlet

2009-05-31 Thread Girish Naik
There is no documentation as such, but i read it in the book 'Struts 2 Design and Programming: A Tutorial' by Budi Kurniawan. This result is added to the action mapping in struts.xml file - e.g.: * home.action tiles:showLoginPage

Re: response.sendRedirect() with Struts2 within a portlet

2009-05-31 Thread Dave Newton
Crishantha Nanayakkara wrote: Unlike Struts1, we do not directly have any processAction() method and ActionRequest and ActionResponse objects to do a response.sendRedirect. I just want to know how do we get about executing the response.sendRedirect with Struts2? What should be the interface to

Re: Struts 2 going to hang glassfish

2009-05-31 Thread mohsen ahmadian
Hello glassfish can't write any thing in server.log before going to hang and if i clear the server.log this wil empty! 2009/5/31 Martin Gainty > > please display contents of > $GLASSFISH_HOME\domains\domain1\logs\server.log > > Martin Gainty > __ > Ve

Re: [s2] strange (for me) OGNL behavior

2009-05-31 Thread Martin Kindler
Martin, thanks a lot! Martin Gainty schrieb: WEB-INF/classes/struts-default.xml dojo\..*,^struts\..* add exclude param after ^struts\..* e.g. ^struts\..*,name do

RE: response.sendRedirect() with Struts2 within a portlet

2009-05-31 Thread Martin Gainty
Girish- can you provide the documentation which suggests Result and Result with params for redirect and redirect-action types? Thanks! Martin Gainty I would never join a club which would have me as a member - Groucho Marx __ Verzicht und Vertrauli

RE: Struts 2 going to hang glassfish

2009-05-31 Thread Martin Gainty
please display contents of $GLASSFISH_HOME\domains\domain1\logs\server.log Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein,

Struts 2 going to hang glassfish

2009-05-31 Thread mohsen ahmadian
Hello to all I have a project with Struts 2 ,Dojo , EJB 3 on glassfish 2.1 but when i click more than on one link OR when user switch IE8 to IE7 glassfish going to down! Please help me urgently Thank you

Re: why doesnt iterator tag provide 'next'

2009-05-31 Thread Dave Newton
Dale Newfield wrote: Heeheehee. That makes me feel all warm and fuzzy inside. I love abusing OGNL, although at my current gig I'm banned :/ ... ... That was my pseudo-code solution, but it got shot down :'( Oh, right! I wish I could remember they're there. Dav

Re: why doesnt iterator tag provide 'next'

2009-05-31 Thread Dave Newton
Bhaarat Sharma wrote: > > > > Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: why doesnt iterator tag provide 'next'

2009-05-31 Thread Dale Newfield
Bhaarat Sharma wrote: So I'll have something like this to create my iteratorList int sizeList = dataList.size(); List iterList = new ArrayList(); for (i = 0; i <= sizeList; i=i+2) { iterList.add(i); } So now I have a iterList. I can iterate over it in my struts2 code

Re: why doesnt iterator tag provide 'next'

2009-05-31 Thread Dale Newfield
Dave Newton wrote: Wouldn't mind break or continue, though--I might use those sometimes. Taking a look at org.apache.struts2.components.IteratorComponent makes me think it wouldn't be too tough to add another tag that's only valid somewhere inside an iterator that would enable something like

Re: why doesnt iterator tag provide 'next'

2009-05-31 Thread Bhaarat Sharma
cool, Jim, thats a better solution!! So I'll have something like this to create my iteratorList int sizeList = dataList.size(); List iterList = new ArrayList(); for (i = 0; i <= sizeList; i=i+2) { iterList.add(i); } So now I have a iterList. I can iterate over it in my struts2 code

Re: why doesnt iterator tag provide 'next'

2009-05-31 Thread Dave Newton
Jim Kiley wrote: I figured. The solution to "I can't solve this problem" is rarely "let's add a new tag to the framework." Wouldn't mind break or continue, though--I might use those sometimes. Dave - To unsubscribe, e-mail: u

Re: why doesnt iterator tag provide 'next'

2009-05-31 Thread Jim Kiley
I figured. The solution to "I can't solve this problem" is rarely "let's add a new tag to the framework." jk On Sun, May 31, 2009 at 10:08 AM, Dave Newton wrote: > Jim Kiley wrote: > >> Assuming that you're iterating over a List, why not instead iterate over a >> List of Integers, and use those

Re: why doesnt iterator tag provide 'next'

2009-05-31 Thread Dave Newton
Jim Kiley wrote: Assuming that you're iterating over a List, why not instead iterate over a List of Integers, and use those Integers as the index to your iterator? You can increment the counter inside the iterator. Or if you need to get foo[0] and foo[1] on the first run through, foo[2] and foo

Re: why doesnt iterator tag provide 'next'

2009-05-31 Thread Jim Kiley
Assuming that you're iterating over a List, why not instead iterate over a List of Integers, and use those Integers as the index to your iterator? You can increment the counter inside the iterator. Or if you need to get foo[0] and foo[1] on the first run through, foo[2] and foo[3] on the next run

Re: why doesnt iterator tag provide 'next'

2009-05-31 Thread Dave Newton
Bhaarat Sharma wrote: sadly in my case i need to :( But this takes us back, the pseudocode you are suggesting is not possible using s:iterate, I dont think we have the ability to move the cursor (or current value in top stack) withtin the iterator tag. Neither does jstl provide this. So sadly,

Re: why doesnt iterator tag provide 'next'

2009-05-31 Thread Bhaarat Sharma
sadly in my case i need to :( But this takes us back, the pseudocode you are suggesting is not possible using s:iterate, I dont think we have the ability to move the cursor (or current value in top stack) withtin the iterator tag. Neither does jstl provide this. So sadly, will my code have to si

Re: why doesnt iterator tag provide 'next'

2009-05-31 Thread Dave Newton
Bhaarat Sharma wrote: how would 'if' help with 'next'. can you please give an example? Pseudocode Java; this is something people should be able to figure out for themselves. In JSP I might just use the index. for (Foo curr : foos) { if (alt) { ... } else prev = curr; alt

Re: why doesnt iterator tag provide 'next'

2009-05-31 Thread Bhaarat Sharma
how would 'if' help with 'next'. can you please give an example? On Sun, May 31, 2009 at 12:58 AM, Musachy Barroso wrote: > duh..I sometimes read the whole email, believe me :). I have had a > couple of scenarios where break would be nice, but I always go around > it using "if", same thing for

Re: error validation error

2009-05-31 Thread Dave Newton
coolsayan wrote: From the docs: "Name of the property for which error messages should be displayed. If not specified, all error messages (regardless of property) are displayed." You don't have a property named "error.name.required"--that sounds like the name of a message resource to me.

Re: How to make readonly textfield in Struts 2.0.11.2 datetimepicker

2009-05-31 Thread Girish Naik
I have achieved this by use of JavaScript as follows: //2009-06-05T00:00:00 var validDate = /^([\d]{4})-([\d]{2})-([\d]{2})T([\d]{2})\:([\d]{2})\:([\d]{2})$/i; var elements = document.getElementsByName('dateOfBirth'); for(var i = 0; i < elements.length; i++){ //alert

Re: response.sendRedirect() with Struts2 within a portlet

2009-05-31 Thread Girish Naik
I have used redirect in struts.xml file in two ways as : 1. home.action 2. / home Regards, - Girish Naik Mobile:-+91-09740091638 girish.n...@gmail.com Groucho Marx

response.sendRedirect() with Struts2 within a portlet

2009-05-31 Thread Crishantha Nanayakkara
Hi, I have a requirement to use a response.sendRedirect() within my Action class. Basically this action class is used to manipulate a porltet. Unlike Struts1, we do not directly have any processAction() method and ActionRequest and ActionResponse objects to do a response.sendRedirect. I just