Re: indexed properties and validation
No one?? [EMAIL PROTECTED] 11/15/2005 04:15 PM Please respond to Struts Users Mailing List user@struts.apache.org To user@struts.apache.org cc Subject indexed properties and validation I've got a form with an indexed propety contained in an array list, with values such as ssn. It has four accessor methods List getDependents() DependentForm getDependent(int i) void setDependents(List l) void setDependent(int i, DependentForm form) The validator makes an ActionError with a key of dependents[x].ssn if there's an error for a given row's ssn, but when the the html tags check errorStyleClass (or any of the others) it checks for dependent[x].ssn. From what I understand this is common knowledge and the solution is to call both sets of getters and setters the same thing. However, I dont like the method signatures. I was wondering if anyone found a solution to this other than changing the method signatures. Mario
tag's default object formatting
Hello all. A while back I poked around and I think I remember finding some resource property keys that I could override for Object formatting. For instance, using html:text property=foo/ where foo is a Date on some bean. i want dates output and read in as mm/DD/. Anyone know what key I should be use to specify this? Mario
This is an easy one
I should know this, but how do I use '' in a tiles xml? I guess this makes me the whipping boy for a while.
Re: Action mapping to a Tile
just out of curiosity, did you mean to write a href=pages/Tester.doTest/a
Re: Printer Friendly Struts Form
Ed, I'm not sure why you would need to use javacript to change the the media attribute. If you just output the both at the same time, the styles with media set to screen get applied only on your monitor and while the media=print styles are ignored. The reverse is true when you send the page to a printer. no need for javascripting at all. Mariano [original message below] This is a creative idea for presentation, and the attribute can be changed by simple javascript. But, there might be an application access/security issue with this if this method is used for display of read-only data, as you are sending an editable version of the form even though it's hidden. Some browsers allow you to change CSS on the fly, e.g. firefox with the EditCSS plugin. -ed On 9/14/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Here's a solution for you, but I don't know its applicability to Firefox, and won't work for inline styling. 1. Start by outputting the information in a text area and in a div/span. 2. Give each different class names/ids, say foo and bar respectivly. 3. Link to your stylesheet or declare your style section defining all your styles EXCEPT for foo and bar. 4. Define two more stylesheets or style sections. 5. In one use the attribute media=screen and within the section do foo { display: inline;} bar{display: none;} 6. In the second one do the same thing but reverse the display properties. Mariano - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Printer Friendly Struts Form
Here's a solution for you, but I don't know its applicability to Firefox, and won't work for inline styling. 1. Start by outputting the information in a text area and in a div/span. 2. Give each different class names/ids, say foo and bar respectivly. 3. Link to your stylesheet or declare your style section defining all your styles EXCEPT for foo and bar. 4. Define two more stylesheets or style sections. 5. In one use the attribute media=screen and within the section do foo { display: inline;} bar{display: none;} 6. In the second one do the same thing but reverse the display properties. Mariano
Re: Printer Friendly Struts Form
Woops, should have read the rest of the thread as Jeff Deskins had already brought up the media attribute.