Set language in JSP

2007-04-24 Thread bjorn.de.bakker
I've encountered a rather annoying issue. To select the language in which our labels should be displayed, we use fmt:setLocale. Everything works fine, everybody's happy. But. To validate our forms, we use DynaValidator. In our webapp, we have 1 form which has only 1 field. When validation

DynaValidator and logic-tag

2007-03-27 Thread bjorn.de.bakker
Is there any way to show appropriate errors using DynaValidator? I have a form with 3 fields, one for the username and two fields for a password. When you enter no values, a global error must be shown to the user. When the user enters an invalid character for the username, a messages that

DynaValidatorForm with java.util.Date

2007-03-12 Thread bjorn.de.bakker
Hi I have a form in which a Date is displayed, using fmt. It's static text, so no user input is required. The problem is the following. When the validation of that form fails, you return to that form. Actually, it should return to that form, but you're redirected to the error page. This

RE: DynaValidatorForm with java.util.Date

2007-03-12 Thread bjorn.de.bakker
Ok, I did some tests and debugging and this is the result: The errormsg is Cannot assign value of type 'java.lang.String' to property 'txtFieldName' of type 'java.util.Date'. I fill that field with following code: modifyForm.set(txtFieldName,new Date()); So the object I'm assigning to that

RE: DynaValidatorForm with java.util.Date

2007-03-12 Thread bjorn.de.bakker
And the 3rd mail. Is it possible to use an object that's different from java.lang.* as type for the dynavalidatorform? I think that's what causing the issue here. If it's not possible, then I'm in deep :) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

RE: DynaValidatorForm with java.util.Date

2007-03-12 Thread bjorn.de.bakker
Why does sql.Date work? And the apache-site states that it's actually possible to use for instance java.util.ArrayList. How do you do that? http://struts.apache.org/1.3.5/userGuide/building_controller.html, see section 4.3.1. -Original Message- From: Hubert Rabago [mailto:[EMAIL

RE: DynaValidatorForm with java.util.Date

2007-03-12 Thread bjorn.de.bakker
Where do I register such a convertor? Simply add this code to my Action or do I have to add this somewhere else? I've figured out what my problem was, but now sth else pops up. I have a field with type java.util.ArrayList. When I enter the form, the precedent Action fills the form. On

RE: DynaValidatorForm with java.util.Date

2007-03-12 Thread bjorn.de.bakker
I can't see how that can solve my problem? The ArrayList is actually gone. When I want to display the arraylist with c:forEach items=${ModifyCivilServantForm.map} var=formField li${formField.key}: ${formField.value}/li /c:forEach Everything is gone. The problem is, that list contains

Equivalent logic:messagesPresent in JSTL

2007-02-12 Thread bjorn.de.bakker
Is there an equivalent in JSTL for the logic :messagesPresent ? I've looked on Google, but I can't find a decent example. Someone suggested c:if test=${! Empty requestScope['org.apache.struts.action.ERROR'} but that doesn't work. I also need to test if a certain property is added, so I can

Scanning for tld's in loop

2007-02-11 Thread bjorn.de.bakker
Last Friday, we've encountered a rather annoying issue. When we launch our webapplication, org.apache.commons.digester.Digester.sax starts parsing all our tld's and shows every line in the log-file. Because of that, our app won't launch. I removed all the TLD files in that directory, but

From html:form direct to JSP

2007-02-09 Thread bjorn.de.bakker
Hi everybody, New day, new problem :). I have a html:form in my page, with hidden fields (don't ask why, long explanation). When you submit that form, an action is triggered, which forwards the user to a page. The problem is, the forward is the only thing that the action does (no additional

Extend form-bean in struts-config

2007-02-05 Thread bjorn.de.bakker
Hi In my struts config, I have a few forms, with type DynaValidatorForm. The problem is, I have a few forms who share a few fields. Is there a way to declare a superform and let the other extend that form, so that I don't have to declare the common fields for every form? Tia Bjorn De

Check if field exists in Validator

2007-02-01 Thread bjorn.de.bakker
Probably simple solution, but I can't find any solutions on Google. I have two forms whom use the same validatorMethod. However, in one form, a field doesn't exist, where it exists in the other form. I want to check if the field exists and use that value in my validation. Does anybody know

Validate multiple fields and show multiple messages

2007-01-31 Thread bjorn.de.bakker
Rather annoying problem, but I really don't know how to fix it. I have a form, with 3 fields on it. A field for UserName, one for E-mailaddress and a checkbox. The username can't be equal to a given value (let's say testing) and if you check the checkbox, the e-mailaddress is required. If

Taglib error JSTL 1.1

2007-01-31 Thread bjorn.de.bakker
Hi This morning I started Eclipse and all of a sudden a weird error appears: Referenced file contains errors (http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd). For more information, right click on the message and select Show Details... web.xmlline 1

Failure request.getAttribute();

2007-01-30 Thread bjorn.de.bakker
Some weird things are happening here : I have a form, with a hidden field and a button. This button is placed on a page with some user information. I want to pass that users ID to the subsequent action, to retrieve his data and display it on the other page. In another part of my webapp, I'm

RE: Re: Loss of request attributes after validation form

2007-01-29 Thread bjorn.de.bakker
Well, I'm using Struts 1.3.5 and DynaValidatorForm + validation.xml for validation. We resolved the issue Friday, by performing some additional steps. Instead of using DynaValidatorForm, we created our own class which extends DynaValidatorForm. After we call the validate-method, and it

Multiple resource bundles

2007-01-26 Thread bjorn.de.bakker
Before, I had no problems with this, but all of a sudden, errors appear in my console window. I have 2 resource bundles, one with captions and titles and 1 with error messages. To use them, I found this on the net: fmt:setBundle basename=adminLabels var=adminLabels scope=session / To use a

JSTL toUpperCase

2007-01-24 Thread bjorn.de.bakker
Seems straight-through, but apparently it isn't. I have an object in the session scope, of which I need to show some attributes. Some of them need to be converted to upper case. You can use functions for that, but the problem is that I get a lot of errors :-/. My taglib-definition looks as

RE: JSTL toUpperCase

2007-01-24 Thread bjorn.de.bakker
Then I get this: h3Validation error messages from TagLibraryValidator for c in /dynamic/view/ViewPersonView.jsp/h3p43: tag = 'out' / attribute = 'value': An error occurred while parsing custom action attribute value with value ${fn:toUpperCase(person.lastName)}:

RE: JSTL toUpperCase

2007-01-24 Thread bjorn.de.bakker
All of a sudden, my iteration doesn't work anymore. I want to iterate through an ArrayList of Person-objects, and before this change, I simply iterated through it with c:forEach items=${list} var=person But when I run my webapp, now I can only see ${person.firstName}, ... instead of the actual

RE: JSTL toUpperCase

2007-01-24 Thread bjorn.de.bakker
So I have to change it to this: !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.4//EN http://java.sun.com/dtd/web-app_2_4.dtd; ? Can you also tell me what's wrong with this: fmt:setBundle basename=adminLabels var=adminLabels scope=session / fmt:message

RE: BROWSER CLOSE

2007-01-23 Thread bjorn.de.bakker
Use window.onunload or windows.unload or sth like that. -Original Message- From: Kranti [mailto:[EMAIL PROTECTED] Sent: dinsdag 23 januari 2007 9:04 To: user@struts.apache.org Subject: BROWSER CLOSE Hi Guys, I am working on a struts based application. I need to meet a special

Using DynaValidatorForm

2007-01-18 Thread bjorn.de.bakker
Is this deprecated ? The reason why I'm asking is that I want to use it in my application, but I can't seem to find a lot of articles on it. The guide on the Struts website is well written, but beside that, not a lot of people have written tutorials on it. I have some problems with the

RE: Using DynaValidatorForm

2007-01-18 Thread bjorn.de.bakker
Sorry, forgot to supply that. I'm using Struts 1.3.5 and commons-validator 1.1.3 -Original Message- From: Nuwan Chandrasoma [mailto:[EMAIL PROTECTED] Sent: donderdag 18 januari 2007 16:46 To: Struts Users Mailing List Subject: Re: Using DynaValidatorForm Hi, what is the struts version

RE: Using Tiles with fmt:setBundle

2007-01-18 Thread bjorn.de.bakker
I already tried that. I always get an error. -Original Message- From: navin mca [mailto:[EMAIL PROTECTED] Sent: woensdag 17 januari 2007 10:37 To: Struts Users Mailing List Subject: Re: Using Tiles with fmt:setBundle Put it into the layout jsp. [EMAIL PROTECTED] wrote: I'm using

Using Tiles with fmt:setBundle

2007-01-17 Thread bjorn.de.bakker
I'm using Tiles and 2 resource bundles. The problem is that I have to define them for every page I'm creating. Isn't there a way to define a bundle in de template page, and use them in every tile? Tia This message is for the designated recipient only and may contain privileged,

Use an image as a button

2007-01-11 Thread bjorn.de.bakker
I've looked on the net for a solution, but I couldn't find one. The problem is, I want to use an image as a button. I've used a simple solution with the html:image / -tag and thus far, it worked fine. But in Firefox we've encountered a problem with the reset button. There's a html-form,