Velocity Question

2005-07-05 Thread Vinicius Caldeira Carvalho
Sorry for the OT. But since they're kinda related ... Does velocity provides a way to fill gaps on my variables? Translating... I have a pojo car, which has ID and Name Id must have size 6 with zero left padd, and Name 15 with with white spaces padding. Now let's suppose I have: Car beetle = new

ActionErrors ActionMessages bif problem

2005-05-20 Thread Vinicius Caldeira Carvalho
Hello there! I'm really, really confused with this. Being a struts user for a quite some time, I must say, it's a great framework but its warning system sux big time. Here's my problem: I have 2 types of errors in my system (general are displayed on top of page, detailed in front of each

Where does ValidatorForm saves its errors?

2005-05-19 Thread Vinicius Caldeira Carvalho
Hello there! Which one is the name of the property that validator form saves its errors? I tried everthing. I can't use html:errors/ cause diferent parts of screen show diferent errrors types. Here's what I've tried: logic:messagesPresent message=false property=org.apache.struts.action.ERROR

Slightly OT: web security-constraints

2005-05-06 Thread Vinicius Caldeira Carvalho
I was wondering... I have this configuration on my web.xml: security-constraint web-resource-collection web-resource-nameActions/web-resource-name descriptionActions/description url-pattern*.do/url-pattern http-methodPOST/http-method

html:options

2005-04-09 Thread Vinicius Caldeira Carvalho
Hello there! I've always used the html:options with the collection attribute, so I had a separate bean with the collection. But now I'd like to have that collection on my form bean cuz it'll be stored on the session, and I have a utility filter that always remove my formbeans stored on the

Help with validator and xdoclet

2005-03-15 Thread Vinicius Caldeira Carvalho
Hello there! I'm using for the first time, xdoclet to create my validation.xml file (that really help) But I got stuck in a point. I have a property that must be float and also greater than 0. Here's what I've tried: /** * @param limitePreAutorizacao The limitePreAutorizacao to set.

Re: chain two actions together

2005-03-15 Thread Vinicius Caldeira Carvalho
wo_shi_ni_ba_ba wrote: Is there a way to chain two Actions together? a lot of times I found that I need to have Action B that needs to do something then do Action C. What is the best practice here? thanks __ Do you Yahoo!? Yahoo! Small Business - Try our new

BeanUtils: examples

2005-03-15 Thread Vinicius Caldeira Carvalho
Well, I know it's not the right list, but since it's very close related and struts list is much more active. Does anyone has a good tutorial on that? I was told to use Converters to assemble my Pojos from my formbeans but most of the time the types doesn't match so BeanUtils.copyProperties()

Re: Help with validator and xdoclet

2005-03-15 Thread Vinicius Caldeira Carvalho
Vinicius Caldeira Carvalho wrote: Hello there! I'm using for the first time, xdoclet to create my validation.xml file (that really help) But I got stuck in a point. I have a property that must be float and also greater than 0. Here's what I've tried: /** * @param limitePreAutorizacao

Re: Help with validator and xdoclet

2005-03-15 Thread Vinicius Caldeira Carvalho
starts up? If not configure logging for debug and see if you can see it trying to call the validator. Niall - Original Message - From: Vinicius Caldeira Carvalho [EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 6:28 PM Vinicius Caldeira Carvalho wrote: Hello there! I'm using

Struts tags and enums

2005-03-14 Thread Vinicius Caldeira Carvalho
Hello there! I'm using enum types in my app and I'd like to use combine them with struts tags. My enum class hierarchy descends to PersistenEnum (the example on hibernate) a method called getEnumCode() returns a Serializable that represents the code for that enum :P So far what I'm doing is:

Help with checkboxes and nested

2005-02-24 Thread Vinicius Caldeira Carvalho
Hello there! I have a form with a nested object and I'm using struts nested tags to display it. One of the properties of the nested pojo is a checkbox. Now, handling checkboxes with struts is already a pain, and I figured that nested checkboxes are even worse. Here's the deal. If the user

Re: Help with checkboxes and nested

2005-02-24 Thread Vinicius Caldeira Carvalho
Hubert Rabago wrote: In order to detect boxes that are unchecked, your form should set the corresponding property's value to false in its reset() method. See http://struts.apache.org/userGuide/struts-html.html#checkbox . hth, Hubert On Thu, 24 Feb 2005 11:13:05 -0300, Vinicius Caldeira Carvalho

Checkbox problem again

2005-02-24 Thread Vinicius Caldeira Carvalho
I'm trying to set an checkbox to be disabled. But it's not working anyway %String enable = String.valueOf(myBean.isEnable)% nested:checkbox property=status value=S disabled=%=enable%/ Well, that throws an Exception setDisable(boolean). Ok so I tried nested:checkbox property=status value=S

nested:checkbox question

2005-01-14 Thread Vinicius Caldeira Carvalho
Hi there. I have a nested object where one of its properties is a string representing on|off. When converting it to a form I'm using a nested:checkbox as shown: nested:checkbox property=state/ Problem is, it should be checked when it's on, and unchecked when off, and it's not working. How can

Nested and javascript'

2005-01-13 Thread Vinicius Caldeira Carvalho
Well, this is kinda off topic, but I thought that maybe some of you may ran into this problem. I have a nested text field. It's name is : destiny[0].airShip.name I need to use a javascript function to get this value. But document.forms[0].destiny[0].airShip.name will not work, which seems

Validator what am I missing??

2004-12-28 Thread Vinicius Caldeira Carvalho
Hi there. I can't get validator to work (although I've done this before) I know I'm missing something. Here's my configuration files: struts-config: plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml,

nesting a collection inside another collection

2004-12-27 Thread Vinicius Caldeira Carvalho
How can I nest a collection inside another? Like I have a collection of products each product has a collection of modules, when trying to use nested:iterate property=products //iterate through request modules collection containing name and idvalue of each module logic:iterate name=modules

nested:select and expression evaluation

2004-12-27 Thread Vinicius Caldeira Carvalho
Hi there I checked the tld for nested-el and it shows that the property onChange has the rtexprvalue is set to true. But I try to put some expression language value in there and it's not working: nested:iterate . indexId=idx nested-el:select onchange=changeProduct($idx) it's printing

Struts tags / JSTL question

2004-12-23 Thread Vinicius Caldeira Carvalho
Hi there! I have a collection of beans, and this collection is set to the request. I'd like to retreive only the first object of the collection (later on I'll iterate over it completely) How can I do this? My Collection is a List. I tried c:set var=bean value=${collection.get(0)} and also c:set

Forwarding question

2004-12-15 Thread Vinicius Caldeira Carvalho
Hi there! I have a dispatch action that receives a forward parameter and I need to find the approprieate path for it. Since this action is used by a lot of scenarios, It's not desirable to be setting new forwards for each new scenario that uses it (would be to confusing the struts-config) and

Validator question

2004-12-13 Thread Vinicius Caldeira Carvalho
Hi there. Correct if I'm wrong, validator returns to the input jsp after a validation fails right? Now if my jsp was called by an action that receives parameters throught the request, how can I handle this? Imagine this flow: Search Action (receives parameters on the request) - forwards to jsp

Struts-el question

2004-12-07 Thread Vinicius Caldeira Carvalho
Hi there I'm using struts-el to solve some of my indexed problems. Inb my action I have a collection of beans, assume this beans have a property of parentBean which has a name: bean.getParent().getName() would retreive what I want. on my jsp I have: html-el:form html-el:select property=idBean

nesting options

2004-12-06 Thread Vinicius Caldeira Carvalho
Hi there! I have a html:options collection where the beans have a deep hierarchy. I'd like to set the labelproperty of my html:options to one of the bean's property like mybean.getCustomer().getParent().getName(); how can I do this with html:options. Does it suport expression language? Thanks

struts tags and scriplet

2004-12-03 Thread Vinicius Caldeira Carvalho
Hi there! I often find myself writing scriptlet due to struts tags or my misunderstanding about it. Let's suppose I have an action that retreives information in a user bean. My jsp has an account form-bean and one of the properties is the userID (a hidden value) I always end up doing this:

Re: struts tags and scriplet

2004-12-03 Thread Vinicius Caldeira Carvalho
Bill Siggelkow wrote: If you specify the form in the action you don't need to use the scriptlet -- Struts will retrieve and display the value for you. -Bill Siggelkow Vinicius Caldeira Carvalho wrote: Hi there! I often find myself writing scriptlet due to struts tags or my misunderstanding

Re: struts tags and scriplet

2004-12-03 Thread Vinicius Caldeira Carvalho
Wendy Smoak wrote: From: Vinicius Caldeira Carvalho [EMAIL PROTECTED] Not possible. Not likely. ;) The form hold values that do not come from a database, I'm not talking about an update where we assemble the form from a dto class. This is an insert form, so no values filled, only

Re: struts tags and scriplet

2004-12-03 Thread Vinicius Caldeira Carvalho
the user's input if the form fails validation. (The user could have modified the value that was originally displayed, and that change will be lost.) From: Vinicius Caldeira Carvalho [EMAIL PROTECTED] I have the caller action having the name=myform inside it I have this code: myform.setUserId

Re: struts tags and scriplet

2004-12-03 Thread Vinicius Caldeira Carvalho
Wendy Smoak wrote: From: Vinicius Caldeira Carvalho [EMAIL PROTECTED] code Proponente proponente = delegate.findProponente(id); CadastrarReservaProspeccaoForm reservaForm = (CadastrarReservaProspeccaoForm)form; reservaForm.setIdProponente(proponente.getId()); /code As you can see I'm using

Re: struts tags and scriplet

2004-12-03 Thread Vinicius Caldeira Carvalho
Wendy Smoak wrote: From: Vinicius Caldeira Carvalho [EMAIL PROTECTED] I have two actions cuz: The first one is triggered after the user clicks in a link from a page that displays a list of prospects. so it find the prospect attributes and then sets it for the form in the next page. got

Validator question

2004-11-30 Thread Vinicius Caldeira Carvalho
Hi there! I'm trying to make my validator projetct work on oc4j (oracle 10g) and so far I got no success at all. First thing that is really strange is that at deploy time the application runs it complains about some attributes being used but not declared: XML-0149: (Error) Element 'arg0' used

Re: Validator question

2004-11-30 Thread Vinicius Caldeira Carvalho
Bill Siggelkow wrote: Make sure you are using the latest release of Struts (http://struts.apache.org/acquiring.html). In Struts 1.2.2 (IIRC) there was an inconsistency with the Validator that caused this problem. -Bill Siggelkow Vinicius Caldeira Carvalho wrote: Hi there! I'm trying to make my

Re: Validator question

2004-11-30 Thread Vinicius Caldeira Carvalho
an external IDE? / Manually Regards Duncan Mills Vinicius Caldeira Carvalho wrote: Bill Siggelkow wrote: Make sure you are using the latest release of Struts (http://struts.apache.org/acquiring.html). In Struts 1.2.2 (IIRC) there was an inconsistency with the Validator that caused this problem. -Bill