RE: [Struts 2][Sitemesh] s:url in decorator file and html file

2006-09-21 Thread David Friedman
You keep emailing copies to the SiteMesh list as well as Struts. Does this mean when you temporarily remove SiteMesh decorating that you see the proper path and when SiteMesh is enabled you see the incorrect path? Regards, David -Original Message- From: Garner Shawn [mailto:[EMAIL PROTEC

RE: Indexed Properties. Maintaining Order

2006-09-21 Thread Strachan, Paul
Hi Puneet, When I re-read your original mail I notice you use DHTML to add rows, so my approach/thoughts may not be appropriate for you. I use DynaForms with ArrayLists of objects. In the form I use the logic:iterate with indexed=true on the html tags. If I need to "dynamically" add another row

Re: AJAX + Struts, IE Problem

2006-09-21 Thread Daniel Chacón Sánchez
I made it, in fact was a cache problem: <% response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 response.setHeader("Pragma","no-cache"); //HTTP 1.0 response.setDateHeader ("Expires", 0); //prevents caching at the proxy server %> With that my application ran on IExplorer, thanks all for the

Re: [Struts 2] dynamic mapping in struts.xml config file

2006-09-21 Thread Shibing . Chen
I think struts2 can achieve that cos WebWork result type has a parse param. Check out WebWork doc for details. On 9/22/06, Garner Shawn <[EMAIL PROTECTED]> wrote: Is there any wat to map to dynamic results? /product/%{dynamic_product}/default.jsp --

[Struts 2] dynamic mapping in struts.xml config file

2006-09-21 Thread Garner Shawn
Is there any wat to map to dynamic results? /product/%{dynamic_product}/default.jsp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

[Struts 2][Sitemesh] s:url in decorator file and html file

2006-09-21 Thread Garner Shawn
I have a subdirectory with an html file when I click on a link it takes me to the html file. A decorator with navigation links decorates the html page. The navigation links are relative to the current directory instead of the context path. I didn't think it was suppose to du this with It render

Re: AJAX + Struts, IE Problem

2006-09-21 Thread Chris Pratt
Why not do a post? It's not any harder. You just have to add one extra line and move the arguments from the URL to the send: ajax.open("POST","/GetCustomers.aspx",true); ajax.setRequestHeader ("Content-Type","application/x-www-form-urlencoded"); ajax.onreadystatechange = fu

Re: AJAX + Struts, IE Problem

2006-09-21 Thread Daniel Chacón Sánchez
alredy do the url change, I'm reading this: http://www.enja.org/david/?p=25 Click Here function uncache(url,form){ var d = new Date(); var time = d.getTime(); url += '&time='+time; retrieveURL(url,form); } I will keep reading

Re: AJAX + Struts, IE Problem

2006-09-21 Thread Daniel Chacón Sánchez
Frank ist seams like it's a caching problem This is a note for myself but it could be useful for anybody writing some Ajax calls. If you use a GET method to send an asynchronous request to your server side code, if you don't do anything Internet Explorer will cache locally your request, so obvio

Re: RES: html:form problem

2006-09-21 Thread Paul Benedict
Forms submit to the web application, so it requires a web context proceeding your domain. You can't submit to the root of the domain; the root domain is not a web application. Struts is rendering the form action correctly. Roberto C. Lima Jr. wrote: No. I'm not using modules. ---

Re: AJAX + Struts, IE Problem

2006-09-21 Thread Frank W. Zammetti
Gotta give me some time, I have work to do to you know :) Are you asking for a complete AJAX project? If so, take a look at struts.sourceforge.net, where you'll find AjaxChat. Or are you asking for a client-side logging implementation? Frank -- Frank W. Zammetti Founder and Chief Software A

RES: html:form problem

2006-09-21 Thread Roberto C. Lima Jr.
No. I'm not using modules. -- Roberto Costa Lima Jr. e-novar Soluções Tecnológicas www.enovar.com.br +55(85) 4009-5860 +55(85) 9104-6526 -Mensagem original- De: Adam Gordon [mailto:[EMAIL PROTECTED] Enviada em: quinta-feira, 21 de setembro de 2006 17:35

Re: AJAX + Struts, IE Problem

2006-09-21 Thread Chris Pratt
Instead of rolling your own AJAX object (which seems to be all the craze in books and magazines). I'd look at something like Sarissa, it's tried and true and it's whole purpose in life is to bring cross browser support to AJAX. (*Chris*) On 9/21/06, Daniel Chacón Sánchez <[EMAIL PROTECTED]> wro

RES: html:form problem

2006-09-21 Thread Roberto C. Lima Jr.
Yes. It didn't work. :( -- Roberto Costa Lima Jr. e-novar Soluções Tecnológicas www.enovar.com.br +55(85) 4009-5860 +55(85) 9104-6526 -Mensagem original- De: Chris Pratt [mailto:[EMAIL PROTECTED] Enviada em: quinta-feira, 21 de setembro de 2006 17:31 Par

Re: html:form problem

2006-09-21 Thread Adam Gordon
It looks like you might be using modules...are you? -adam Roberto C. Lima Jr. wrote: Hi, everyone. I have an app that will be published at internet with apache + JBoss Server. So, it will be published on the address above: http://sis.enovar.com.br/ B

Re: html:form problem

2006-09-21 Thread Chris Pratt
Have you tried: (*Chris*) On 9/21/06, Roberto C. Lima Jr. <[EMAIL PROTECTED]> wrote: Hi, everyone. I have an app that will be published at internet with apache + JBoss Server. So, it will be published on the address above: http://sis.enovar.com.br/ But t

Re: Multiple Struts Applications

2006-09-21 Thread Chris Pratt
You might want to look into the Module concept introduced into the recent version of Struts. It would probably help out nicely. (*Chris*) On 9/21/06, Hartley, John <[EMAIL PROTECTED]> wrote: (Warning... Almost Newbie) I am responsible for a typical Struts application that uses JSPs, Common C

Re: Can general error/exception page point to a struts action?

2006-09-21 Thread Chris Pratt
What happened when you tried? (*Chris*) On 9/21/06, Mississippi John Hurt <[EMAIL PROTECTED]> wrote: Can the "path" below map to a struts action? That way I can route to an errorAction that logs all the details with a unique key, then display just a simple general message with unique

Re: AJAX + Struts, IE Problem

2006-09-21 Thread Daniel Chacón Sánchez
Frank?? 2006/9/21, Daniel Chacón Sánchez <[EMAIL PROTECTED]>: Thanks Frank, obviously I made test and used alerts and saw lines numbers and I didn´t found the error. Of that 100 implementions that I can quickly find in Google, can you give me two links (more if possible), to make that an appli

html:form problem

2006-09-21 Thread Roberto C. Lima Jr.
Hi, everyone. I have an app that will be published at internet with apache + JBoss Server. So, it will be published on the address above: http://sis.enovar.com.br/ But the problem is that html:form writes more than just the “.do” thing becomes

Re: Losing session object?

2006-09-21 Thread Chris Pratt
By doing a forward (as opposed to a redirect) you actually have access to more data, not less. You have access to the request, session and application scopes with a forward, whereas you only have session and application scope access with a redirect. Notice though that you should always have acce

Re: iterating Vector of HashMap using Logic:iterate

2006-09-21 Thread Chris Pratt
I haven't actually tried this, but would something like this work? ${map['field2']} You might need some 's in there depending on your JSP version, but it's probably a start. (*Chris*) On 9/21/06, Venkata Phani Kumar <[EMAIL PROTECTED]> wrote: Hi, I have a Vector. Each HashMap holds two

Re: Validation on String[]

2006-09-21 Thread Mark Shifman
A few years ago I wrote my own validator which checked whether the listbox had at least one thing selected. Below is the validator (http://javaboutique.internet.com/tutorials/Struts11Val/index-14.html) helped me get going. Also below is a validator-rules-custom.xml that needs to be added to the

Re: response.setContentType("text/html; charset=utf-8")

2006-09-21 Thread Al Eridani
On 9/8/06, Raghuveer <[EMAIL PROTECTED]> wrote: From the source examples jakarta-struts-1.1-src\jakarta-struts-1.1-src\src\upload\org\apache\struts\w ebapp\upload What does the use of response.setContentType("text/html; charset=utf-8"); It tells the browser that what the browser is going to

Multiple Struts Applications

2006-09-21 Thread Hartley, John
(Warning... Almost Newbie) I am responsible for a typical Struts application that uses JSPs, Common Controls, etc., and runs on Websphere and Weblogic. I am now developing a new application that will have basically the same front-end as the first application, (but will have rather different back-e

Can general error/exception page point to a struts action?

2006-09-21 Thread Mississippi John Hurt
Can the "path" below map to a struts action? That way I can route to an errorAction that logs all the details with a unique key, then display just a simple general message with unique key to the user that they can give helpdesk if they call.

Testing, Please ignore

2006-09-21 Thread Hartley, John
John R. Hartley, Jr. Carreker Corp., Charlotte NC [EMAIL PROTECTED]

Re: AJAX + Struts, IE Problem

2006-09-21 Thread Daniel Chacón Sánchez
Thanks Frank, obviously I made test and used alerts and saw lines numbers and I didn´t found the error. Of that 100 implementions that I can quickly find in Google, can you give me two links (more if possible), to make that an application that was made in struts, and it's already finnished, in wh

Re: AJAX + Struts, IE Problem

2006-09-21 Thread Frank W. Zammetti
Have you dont some basic troubleshooting yet? Things as simple as throwing some alerts() in various functions and between various lines and seeing where it fails? If you have Visual Studio installed, you'll have a full debugger, which can help, but without that it's a bit trickier on IE... you ca

Re: AJAX + Struts, IE Problem

2006-09-21 Thread Daniel Chacón Sánchez
Sorry, the problem is the same on IE 7 and IE 6, so is not a version problem. And I don´t receive a javascript error, that was for something else that I alredy fix, someone, any help?? 2006/9/21, Daniel Chacón Sánchez <[EMAIL PROTECTED]>: Hi all, I'm using struts with AJAX I introduced Ajax t

RE: Handling breadcrumbs with Struts

2006-09-21 Thread George.Dinwiddie
Creating a working sample would be quite a bit of work, and I don't have time at the moment. In a nutshell, I would have a bean something like: public class Breadcrumb { public String getName() {...} public String getUrl() {...} } The BreadcrumbTileController would do something

AJAX + Struts, IE Problem

2006-09-21 Thread Daniel Chacón Sánchez
Hi all, I'm using struts with AJAX I introduced Ajax to my struts application based on the article: *"**Sprinkle Some AJAX Magic in Your Struts Web Application" http://today.java.net/pub/a/today/2005/10/27/sprinkle-ajax-magic-into-struts-webapp.html?page=1 * I use the ajax javascript and the fu

Re: Question about warning when pre-loading a form

2006-09-21 Thread Yamir Encarnacion
Thanks to Juanjo Cuadrado and David Friedman. Adding the name tag took care of the warning. Yamir Encarnacion --- Juanjo Cuadrado <[EMAIL PROTECTED]> wrote: > Hi, > > Can you try to to put the attribute "name" in > the tag action (in > struct-config.xml)? > > > attr

Re: Question about warning when pre-loading a form

2006-09-21 Thread Juanjo Cuadrado
Hi, Can you try to to put the attribute "name" in the tag action (in struct-config.xml)? I hope help you 2006/9/21, Yamir Encarnacion <[EMAIL PROTECTED]>: Hello, I am getting the following warning (log4j) when pre-loading a form and was wondering i

RE: Question about warning when pre-loading a form

2006-09-21 Thread David Friedman
Forms are best loaded automatically in struts. Your code suggests you might be better off adding: name="AdminPrescriberForm" to your action mapping declaration for automatic creation of your ActionForm. It will should you time and (lines of) code. Regards, David -

Question about warning when pre-loading a form

2006-09-21 Thread Yamir Encarnacion
Hello, I am getting the following warning (log4j) when pre-loading a form and was wondering if I am pre-loading the form correctly. [2006-09-21 11:12:14,572] - WARN (RequestUtils.java:175) - No FormBeanConfig found under 'null' Any info on whether I am incorrectly pre-loading the form, or whet

Re: put value to an html:hidden field from a java script function

2006-09-21 Thread Puneet Lakhina
On 9/21/06, Heidy Gutiérrez Guzmán <[EMAIL PROTECTED]> wrote: Hi I need to put value to an input hidden field, from a java script function. I call the java script function from an onclick event of html:submit field I have debuged that process and input hidden field does'nt take value. Always ha

RE: Validation on String[]

2006-09-21 Thread Sahil Gupta
Hi, Thanks a lot Can I do put the validation with the help of validation.xml to a String[] Regards, Sahil Gupta -Original Message- From: Strachan, Paul [mailto:[EMAIL PROTECTED] Sent: Thursday, September 21, 2006 6:11 PM To: Struts Users Mailing List Subject: RE: Validation on String

Module Location

2006-09-21 Thread SpirosK
Hello everyone, i am very new to struts and i have the following question about modules (i work at struts 1.2.9): I am trying to make a module named: mod1 ,so i have the following setup: [AT: struts-config.xml] [AT: structs-config-mod1.xml] [AT:

Re: Indexed Properties. Maintaining Order

2006-09-21 Thread Puneet Lakhina
On 9/21/06, Niall Pemberton <[EMAIL PROTECTED]> wrote: As you found out there is no way of knowing the order the browser/client will submit request parameters, so if you want to use indexed properties in this way you need to "grow" the list to accomodate the size of the indexed property being se

Re: Indexed Properties. Maintaining Order

2006-09-21 Thread Puneet Lakhina
On 9/21/06, Strachan, Paul <[EMAIL PROTECTED]> wrote: A List is an ordered collection so it doesnt make sense that the order changes. Also, depending on which Map implementation you use ordering may not be guaranteed. I would basically have the index in case of indexed properties as my key.

RE: Losing session object?

2006-09-21 Thread Darren Hall
I'm thinking my problem might be related to the fact that my mappings in struts-config.xml are using forwards? Does this sound like it could be the problem? For example, from the home page you can link to the FAQ page. Here is the mapping for the FAQ page from my struts-congif.xml file: "". By doin

RE: about pagination

2006-09-21 Thread Givler, Eric
You can find this issue documented inside of the Strut's Survival Guide at: http://www.objectsource.com/ -Original Message- From: yamilka vallejo ramos [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 20, 2006 4:10 PM To: user@struts.apache.org Subject: about pagination hi, does any

Losing session object?

2006-09-21 Thread Darren Hall
Quick question - I have a web application built on Struts 1.2.9. The home page places a "user" object in the current session when it executes using the following code: . //Call common methods userSession = getUserSession(request); request.getSession().setAttribute("userSession", userSession);

Re: form-property value set in dispatch action is lost

2006-09-21 Thread fea jabi
thanks a lot that worked. I never understood what the "redirect" does until now. I know now when to make it true. Thanks a lot again. From: "Michael Jouravlev" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: "Struts Users Mailing List" Subject: Re: form-property value set in d

put value to an html:hidden field from a java script function

2006-09-21 Thread Heidy Gutiérrez Guzmán
Hi I need to put value to an input hidden field, from a java script function. I call the java script function from an onclick event of html:submit field I have debuged that process and input hidden field does'nt take value. Always have the default value. This is my way to do this ***This i

RE: Indexed Properties. Maintaining Order

2006-09-21 Thread Strachan, Paul
A List is an ordered collection so it doesnt make sense that the order changes. Also, depending on which Map implementation you use ordering may not be guaranteed. I frequently use indexed properties with List and have not experienced this problem. You may need to check the generated html sou

RE: Validation on String[]

2006-09-21 Thread Strachan, Paul
in your action class: ArrayList list = new ArrayList(); Location location = new Location(); location.setLocationName("A Location"); list.add(location); dyForm.set("locations", list); I'm not sure how to validate a simple array of strings (eg

Re: Indexed Properties. Maintaining Order

2006-09-21 Thread Niall Pemberton
As you found out there is no way of knowing the order the browser/client will submit request parameters, so if you want to use indexed properties in this way you need to "grow" the list to accomodate the size of the indexed property being set. So you could do something like the following: publi

Re: A struts.apache.org link returns 404

2006-09-21 Thread Ted Husted
http://struts.apache.org/1.x/struts-core/apidocs/org/apache/struts/action/ActionMapping.html The index to all the Struts 1 API docs is here: * http://struts.apache.org/1.x/apidocs/ -Ted. On 9/21/06, Pierre Post <[EMAIL PROTECTED]> wrote: Hi all, I would like to get information on ActionMappi

Re: Validation on String[]

2006-09-21 Thread Li
have you tried java.util.ArrayList, or create an action form that extends ValidatorForm, which declare your List object there On 9/21/06, Sahil Gupta <[EMAIL PROTECTED]> wrote: Hi, How can we use List or ArrayList in DynaValidator Forms? Regards, Sahil Gupta -Original Message-

RE: Validation on String[]

2006-09-21 Thread Sahil Gupta
Hi, How can we use List or ArrayList in DynaValidator Forms? Regards, Sahil Gupta -Original Message- From: Li [mailto:[EMAIL PROTECTED] Sent: Thursday, September 21, 2006 3:57 PM To: Struts Users Mailing List Subject: Re: Validation on String[] hi, there is no such type : java.lan

Re: Validation on String[]

2006-09-21 Thread Li
hi, there is no such type : java.lang.String[], try to use List or ArrayList On 9/21/06, Sahil Gupta <[EMAIL PROTECTED]> wrote: Hi, I have used a dyna form in which I have a property which is a multi-select pick list defined as form-property name="location" type="java.lang.String[] Now I wan

R: Applicationresource.properties

2006-09-21 Thread Marcello Savino
Great: it works fine ! Thank you -Messaggio originale- Da: Venkata Phani Kumar [mailto:[EMAIL PROTECTED] Inviato: giovedì 21 settembre 2006 12.06 A: Struts Users Mailing List Oggetto: Re: Applicationresource.properties Hi savino, you can get message resources instance using MessageRe

Validation on String[]

2006-09-21 Thread Sahil Gupta
Hi, I have used a dyna form in which I have a property which is a multi-select pick list defined as form-property name="location" type="java.lang.String[] Now I want to put validation (required and/or mask) on this. Can anyone please guide me. I want it to show an error if the user clicks on s

Re: Applicationresource.properties

2006-09-21 Thread Venkata Phani Kumar
Hi savino, you can get message resources instance using MessageResources messageResources = getResources(request) ; if you have multiple message resources you can get specific message resource as MessageResources messageResources = getResources(request, "bundleName") ; Now to get correspon

Applicationresource.properties

2006-09-21 Thread Marcello Savino
How can i get any value from ApplicationResource.properties passing a key in an Action object? I mean something like that: Let's say this is my ApplicationResource.properties file: Action.a=Add Action.b=Build In an Action object I need to read the value "Add" by passine the key "Action.a". Any hel

Indexed Properties. Maintaining Order

2006-09-21 Thread Puneet Lakhina
Hi, I have a no. of fields in a form arranged in a table of rows. I am using indexed properties for these fields. The number of these fields isn't known to me at the time of page loading for which I have used some DHTML to properly add the fields. And all the values are getting submitted. Now my p

A struts.apache.org link returns 404

2006-09-21 Thread Pierre Post
Hi all, I would like to get information on ActionMapping from the struts.aoache.org website, but it seems that the link to the relevant web page doesn't work (I get 404 not found). The link is available on the http://struts.apache.org/1.x/userGuide/building_controller.html#config page, and point

Re: about pagination

2006-09-21 Thread Li
Hi Kim, If you page has features that allow to alter the representation of the data on the page, defining a plug-in, a customized component or a tag is a good approach. But for simple paginated data representation, struts tag can handle it. I like display tag as it gives me options to enhance my

Re: about pagination

2006-09-21 Thread Kim Brianne Go
Hi Li, Yeah I agree with you since pagination when done on the presentation layer maybe too costly since data that will not be shown will still be retrieved and processed. But with extreme components for example, they have an implementation to limit the data retrieval only to ones that will be d

Re: about pagination

2006-09-21 Thread Li
the real pagination should not be done at presentation layer but persistent layer, like using hibernate query or direct jdbc resultset On 9/21/06, Kim Brianne Go <[EMAIL PROTECTED]> wrote: Hi Venkata, You may first visit either display tag or extreme component. They have ample documentation

Re: about pagination

2006-09-21 Thread Kim Brianne Go
Hi Venkata, You may first visit either display tag or extreme component. They have ample documentation for you to start with. It's actually quite simple, provide a collection to either request.attribute or session.attribute then create a jsp to display the content of the collection. Brian On

R: iterating Vector of HashMap using Logic:iterate

2006-09-21 Thread Marcello Savino
Hih, Marcello -Messaggio originale- Da: Venkata Phani Kumar [mailto:[EMAIL PROTECTED] Inviato: giovedì 21 settembre 2006 9.18 A: Struts Users Mailing List Oggetto: iterating Vector of HashMap using Logic:iterate Hi, I have a Vector. Each HashMap holds two elements as key 'field1' an

iterating Vector of HashMap using Logic:iterate

2006-09-21 Thread Venkata Phani Kumar
Hi, I have a Vector. Each HashMap holds two elements as key 'field1' and 'filed2'. Now in jsp page i have to iterate over above vector and have to construt one combo box as below field2 could any body help how to display as above using Regards Venkata Phanikumar. G

R: Handling breadcrumbs with Struts

2006-09-21 Thread Marcello Savino
Could you post a little sample ? -Messaggio originale- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Inviato: mercoledì 20 settembre 2006 20.59 A: user@struts.apache.org Oggetto: RE: Handling breadcrumbs with Struts I would use a tile. The tile controller can retrieve information from