RE: Issue with registering/lookup of converters in ConvertUtils

2007-02-01 Thread uni
Hi, > I am not able to see the ConvertUtilsBean in the commons-beanutils-1-0.jar > that I am using. Has this class been added in later versions of Struts? It's part of beanutils since version 1.7: http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanutils/ConvertUtilsBean.html >

RE: Issue with registering/lookup of converters in ConvertUtils

2007-02-01 Thread uni
Nitin, I just took another look into the beanutils classes: there are not only the static classes (e.g., ConvertUtils), but also corresponding non-static classes (e.g., ConvertUtilsBean). You could create a Hashmap with Locale as its key and the ConvertUtilsBean configured with the locale specific

[S1] No inheritance of validation properites?

2007-01-24 Thread uni
I have a hierarchy of DynaValidatorForm beans. There is a form "Something" and subtypes "SpecialSomething1" and "SpecialSomething2". If I use validation and refer to the bean "Something" (to specify which general purpose properties should be validated), the validation does not work. I have to copy

Re: Form population and locale

2007-01-17 Thread uni
Hi, > I use Struts 1.2.9 and I would like to know if there is any > way to link the user locale (available with > RequestUtils.getUserLocale(HttRequest)) with the form > population process. > > In fact, I have many forms which have date field (with the > java.util.Date type). I would format these

BigDecimal in DynaActionForm "" instead of null

2007-01-14 Thread uni
Hi, I have an DynaActionForm (using Struts 1) with several properties, all of type String. My business object is typed; one of its properties is a BigDecimal. To copy form data to the entity, I'm using BeanUtils.copyProperties. This works well, but in case of BigDecimals, there is a conversion err

Re: Two Struts actions in one jsp

2007-01-11 Thread uni
Hi > i have a jsp where i put 2 forms and 2 actions which belong to two action > classes.But i am getting does not contain specified > method:java.lang.NoSuchMethodException: > > Is it possible in one jsp to have 2 different actions and making switch over > based on the hyperlink we are clicking?

Re: [S2] How to separate Action from "FormBean"

2007-01-07 Thread uni
Dariusz Wojtas <[EMAIL PROTECTED]> wrote: > Want to have a bean separate from the action and just reference it? > Define your bean (whatever you want) and just declare it as a variable > on your action. Thanks Dariusz. That's exactly what I was looking for. Looks like I should definitely give S2 a

[S2] How to separate Action from "FormBean"

2007-01-07 Thread uni
I just took a look at the tutorials of Struts 2 today. As a Struts 1 user, I don't like form beans that mostly copy your business data beans. In Struts 2, you don't need form beans anymore, but the tutorial states that you have to implement an execute() method into your business bean. Actually, wha

Re: Data security

2007-01-04 Thread uni
No, I mean that I am a user and log in as usual. I can see that my orders have id's such as 5, 10 and 42. Now I trick a little bit and send another id, say 41 (which is an order of another user), and without a check the action would show me this order. What's the best way to avoid this situation?

Data security

2007-01-04 Thread uni
Hi, The question I have is not purely specific to Struts, but I expect that it's a common problem for Struts users. Suppose you have a web application which is a shop. You have several users, each of which can have orders, accounting details, etc. Now a user logs in and you store the the user obje

Re: How to reduce redundant form code in JSPs?

2007-01-03 Thread uni
Hi, > There are lots of ways :-) You didn't list what technologies you're > using, but here are some possibilities: > > - if you're using JSP 2.0, you could create a tag file to represent each > type of form field and encapsulate the common markup there > > - you could write a JSP Custom Tag to em

How to reduce redundant form code in JSPs?

2007-01-02 Thread uni
Hi, My application consists of several forms, all following a common style. Each form is rendered using a table. This results in the following code for each field: The only variations are the name of the field ("xxx" in the snippet) as well as the field type (in most cases html:t

Re: struts/hibernate/tomcat question

2007-01-02 Thread uni
Hi Rick, I am using a utility class as proposed in the book "Hibernate in Action". The session and the transaction is stored in a ThreadLocal. The utility class itself has the following methods: - getSession / closeSession - beginTransaction / commitTransaction / rollbackTransaction In your action

Best practive for request attributes with validation?

2007-01-02 Thread uni
Happy new year to everyone! In my application, I'm putting some attributes into the request that are used by the JSP. The approach works fine, but when I have a form and the validation fails, the input JSP is redisplayed but lacking the former request attributes. My current workaround is to put th

Re: Problems with special characters in an ActionForm

2006-12-30 Thread uni
Dariusz, Thanks for your help - this works. The filter approach is very convenient (you don't even need to cast the request to a HttpServletRequest) and now all special characters are submitted correctly! Cheers, Thorsten - To

Problems with special characters in an ActionForm

2006-12-29 Thread uni
Hi, I have a simple action form where users can enter texts, including special characters such as German umlauts. If a user enters "müller" in the text field, I only get "müller" from the actionform. I assume that there is a problem with the encoding, but I don't know how I can resolve it. The a