Ajax query

2006-07-31 Thread Patil, Sheetal
hello friends, i have one query with Ajax. in struts we separate model-view-controller, even that's struts purpose. but now a days i am using Ajax, and i seen most of the examples are producing html code or data to display and sending it to client. but i think this is violating M-V-C pattern as

Re: Ajax query

2006-07-31 Thread Thomas Joseph
Hi, I am not that very experienced in Ajax, but what I feel that It is up to you how you produce the HTML code that you are or are not violating the MVC. If your action class produces html, it voilates, but if it can forward to a JSP that generates the bare HTML all that is required for that

Re: Tiles validation and struts config input

2006-07-31 Thread Antonio Petrelli
Justin Chin ha scritto: I am using Tiles ... Lets say I have two sets of users. UsersA, and UsersB. The data gather for both users are the same. The look and feel is different. So I want to point to the same action mapping for the two sets. Probably you are interested in Dimensions:

Session tracking correct approach

2006-07-31 Thread prerna.sawhney
Hi All, I would like to know which is the best approach for session tracking in struts among the following 1) Writing your own ActionServlet class which will have the following code public class MyActionServlet extends ActionServlet{ /* (non-Javadoc) *

Re: Session tracking correct approach

2006-07-31 Thread purushottam hegde
Hi Prerna, If i am not wrong , this is not session tracking. it is session validation. 1) this has a problem, It unnecessarily creates a session. 2)think it works but using browser back button might fail 3) think it works but using browser back button might fail 4)Using filters (Cookies) -

Problem with message property files in russian language

2006-07-31 Thread Dmitry Sivachenko
Hello! I use tomcat 5.5 and struts 1.2.9. I do all development under Windows OS. I am developing an application which outputs data in Russian language (windows-1251 encoding). Consider the following JSP excerpt: [EMAIL PROTECTED] contentType=text/html; charset=windows-1251% %@ taglib

AW: Problem with message property files in russian language

2006-07-31 Thread Martin Kindler
Hi Dmitry as far as I know the Java properties files must be in ASCII code. (so much to the Unicode support in Java :-)). I had the same problem (well I tried to use UTF-8 in the properties file). After changing to the \uxxx codes it worked. Martin -Ursprüngliche Nachricht- Von:

Proper Struts Tags

2006-07-31 Thread Thomas Joseph
Hi All, I am using indexed properties for form beans and want something like: % int count = 0; % %=employeeHashMap.get(name+count)% html:select name=employeeHashMap property=string(designation+%=count%+) in proper struts tags. The select tage, I am getting when rendered as select

RE: Proper Struts Tags

2006-07-31 Thread Patil, Sheetal
I also suffered from this problem so I write code like %String str=designation+count;% html:select name=employeeHashMap property=%=str% So it wroks fine -Original Message- From: Thomas Joseph [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 6:34 PM To: Struts Users Mailing List

RE: [OT]design help

2006-07-31 Thread fea jabi
can someone help me with this please? Thanks. From: fea jabi [EMAIL PROTECTED] Reply-To: Struts Users Mailing List user@struts.apache.org To: user@struts.apache.org Subject: [OT]design help Date: Fri, 28 Jul 2006 13:09:46 -0400 have String array's which have values in them. dbValues[]

Re: Proper Struts Tags

2006-07-31 Thread Thomas Joseph
Thanks Sheetal, but I could not get the values autoselected for the select - Original Message - From: Patil, Sheetal I also suffered from this problem so I write code like %String str=designation+count;% html:select name=employeeHashMap property=%=str% So it wroks fine

RE: Proper Struts Tags

2006-07-31 Thread Patil, Sheetal
I wont get what u want to get? Can u clear it -Original Message- From: Thomas Joseph [mailto:[EMAIL PROTECTED] Sent: Monday, July 31, 2006 7:05 PM To: Struts Users Mailing List Subject: Re: Proper Struts Tags Thanks Sheetal, but I could not get the values autoselected for the select

RE: Question regarding getRequestURI()

2006-07-31 Thread Adam Gordon
The File object also gives it to you and you don't have to mess with substrings and the / character. I believe it's File.getName() - it returns everything after the last / character. Of course, you do have to construct a new File object so I've no idea if it's more or less efficient than what

Re: Question regarding getRequestURI()

2006-07-31 Thread Puneet Lakhina
String requestUri = request.getRequestURI(); String resourceName = requestUri.substring(requestUri.lastIndexOf(/), requestURI.length-1); String resourceName = requestUri.substring(requestUri.lastIndexOf(/), requestURI.length()-1); just in case you din notice -- Puneet

Re: Question regarding getRequestURI()

2006-07-31 Thread mosho
Thanks for your replies. This solution works for me, mapping.getpath(). -- View this message in context: http://www.nabble.com/Question-regarding-getRequestURI%28%29-tf2016924.html#a5576221 Sent from the Struts - User forum at Nabble.com.

Re: Proper Struts Tags

2006-07-31 Thread Thomas Joseph
Basically, when we use the html:select , we assume that when rendering, if the value of the select matches one of the options, then that value would be pre-selected in the select dropdown. But with your solution applied, I could get the html:select rendered, but not have the pre-selection

Struts2 JSF integration question

2006-07-31 Thread Chris Waring
I'm trying out the Struts2 JSF integration using the first snapshot build that was out last week. What I can't seem to figure out is how the showcase example is forwarding to the correct jsp? The action result does not have any jsp listed and I don't see a faces-config.xml anywhere? Can

Re: Proper Struts Tags

2006-07-31 Thread Gareth Evans
Try, html:select name=employeeHashMap property=%= string(designation + count + ) % That should write the correct property name Gareth Thomas Joseph wrote: Basically, when we use the html:select , we assume that when rendering, if the value of the select matches one of the options, then

Re: Struts2 JSF integration question

2006-07-31 Thread Chris Waring
Ok, I did some debugging and I think I figured out what it is doing. It looks like it is using the namespace from the package definition plus the name from the action definition plus the file suffix (jsp). To come up with /jsf/employee/list.jsp. I'm not sure that this is going to be flexible

Re: Struts2 JSF integration question

2006-07-31 Thread Don Brown
Sure...first, the JSF interceptors trigger if there is a JSF result. The result code from the action, even if it is a JSF action, is treated like a normal Struts 2 result code, and therefore, subject to the Struts 2 navigation. When the page is rendered, the Action instance is injected into the

Re: Struts2 JSF integration question

2006-07-31 Thread Don Brown
Yeah, the JSP location could be made more flexible. I originally coded it that way to match how JSF would expect to find and handle the JSP. I don't remember, off hand, if other parts of the JSF controller expects the JSP to be located as such. If you patch the code and find it works fine,

Re: Struts2 JSF integration question

2006-07-31 Thread Chris Waring
Thanks Don. That clears things up for me some. I'm going to take a little closer look and see if it is possible to make the page lookup more flexible. If JSF is expecting the page to look this way, then it makes sense that it may have to be this way. I'll let you know if I find a way to make

RE: Conditional Validation

2006-07-31 Thread Givler, Eric
Can you override the validate() method in your form that extends ValidatorForm, and then inside that do something like this? public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = null; if ( request.getParameter(closeButton) == null ) {

RE: Reset Button

2006-07-31 Thread Lance
I had this issue too. form.reset() resets fields in the form back to their original state when the page loaded. Chances are the form's original state was populated. You may want your reset button to call a method that sets all your fields to blank instead of using form.reset() -Original

two form one jsp

2006-07-31 Thread Parvat Singh Ranawat
Hi all, I'm attempting to create a JSP that is made up of two forms. Each form needs a same form bean and is processed by a same action. The catch is that the one form comes from Header (This will be there for all the pages as part of left panel ) and second is coming from my jsp and

Re: Question regarding getRequestURI()

2006-07-31 Thread Monkeyden
One could say that operating on File objects, directly, infringes on the concept of a container, depending on how draconian you are. On 7/31/06, Adam Gordon [EMAIL PROTECTED] wrote: The File object also gives it to you and you don't have to mess with substrings and the / character. I believe

Re: two form one jsp

2006-07-31 Thread Monkeyden
Your example WILL always point to the first form, since you use the index of 0 (zero). You need to use 1 to point to the second form. This works fine for me: html head /head script language=JavaScript type=text/javascript function tellMe(){ alert(Form 1: +

Re: Ajax query

2006-07-31 Thread mcmoisei
I use Ajax transparently with Struts using AjaxAnywhere. You app doesn't change and you don't violate the MVC pattern. http://sourceforge.net/projects/ajaxanywhere I don't remember if the examples provide a Struts example. Check it out, MC -- Original message

how to call other tiles from baselayout

2006-07-31 Thread mosho
I have a problem. I am using tiles for my layout. I have a baselayout.jsp where I am inserting all my header, body and footer tags. I want to insert another attribute called breadcrumbs which have some insert statements. for example, my tile definition is: definition name=baseLayout

Struts form design question

2006-07-31 Thread Adam Gordon
Hi folks. The more I think of this problem, the more I think that we will be unable to use only Struts for this particular situation. We have a table which we populate with a user's choice of custom registration fields (name, email, phone, company, etc...). Each row in this table is essentially

RE: Question regarding getRequestURI()

2006-07-31 Thread Adam Gordon
Very true. Though, we use logging profusely throughout our application which, albeit, indirectly, writes stuff to the disk (most certainly using File objects) - I guess we must be draconian. :-) -Adam PS- I just peeked at File.getName(), It does the same thing: --- SNIP --- public

how to read

2006-07-31 Thread temp temp
How to read the following code ? boolean vIsForm = vWorkTypeId.equals(IFormflowWorkTypeIds.FORM); String vWorkForwardName = MessageFormat.format(work={0}, new Object[] {vWorkAlias}); String vForwardName = (aActionMapping.findForward(vWorkForwardName) == null)

Re: how to read

2006-07-31 Thread Michael Jouravlev
On 7/31/06, temp temp [EMAIL PROTECTED] wrote: How to read the following code ? boolean vIsForm = vWorkTypeId.equals(IFormflowWorkTypeIds.FORM); String vWorkForwardName = MessageFormat.format(work={0}, new Object[] {vWorkAlias}); String vForwardName =

DHTML and Struts

2006-07-31 Thread Puneet Lakhina
I have a set of text fields on a form. but the number of the text fields il need is soemthing that depends on the user using the application. So i have used DHTML to dynamically add a text field to the form. ofcourse i have used normal html tags for the dynamically added text field. But the

Re: DHTML and Struts

2006-07-31 Thread Frank W. Zammetti
Hi, Have a look here: http://struts.apache.org/1.x/userGuide/building_controller.html Specifically, section 4.3.3 Map-backed ActionForms. Frank Puneet Lakhina wrote: I have a set of text fields on a form. but the number of the text fields il need is soemthing that depends on the user using

RE: Proper Struts Tags

2006-07-31 Thread Patil, Sheetal
The stuffs I get is like you want multiple combobox If it is so then u can codce like %String str=des+count;% html:select property=%=str% html:option value=1Traineehtml:option html:option value=2S/W engghtml:option html:option value=3Managerhtml:option html:option value=4Directorhtml:option

Struts ComboBox Validation

2006-07-31 Thread Chetan Pandey
I have the following Combobox in my Struts Application: tdbean:message key=attendee.holidexCode/*/td td html:select property=attendeeVO.holidexCode html:option value=Choose Holidex /html:option html:options name=holidexCodeVector / /html:select /td Where holidexCodeVector is a

Re: Struts ComboBox Validation

2006-07-31 Thread Irwan Nurwandi
But the thing is, since the default value is Choose Holidex it considers it a String and doesn't validate. it's should be html:option value=Choose Holidex/html:option not this one ... html:option value=Choose Holidex /html:option Regards IN

RE: Struts ComboBox Validation

2006-07-31 Thread Chetan Pandey
Hi Irwan: Thanks for the reply. It did solve my problem but not for the Combo-box which takes ints. Consider the following: td html:select property=attendeeVO.role html:option value=Choose Role/html:option html:options collection=roleVector labelProperty=description property=roleId/