indexed="true" is only valid within an enclosing iterate tag

2004-05-05 Thread Paul Barry
I am trying to use indexed properties in a form, as described in James Turner's Article "Succeeding With Struts: Indexed Properties and Beans as Properties" at http://www.developer.com/java/ejb/article.php/2233591 The example shows you can use c:forEach with , like this: But when I

Re: indexed="true" is only valid within an enclosing iterate tag

2004-05-05 Thread Paul Barry
e "indexed" attribute from all the - does it work properly then (except for the "name" attribute) is the html page generated OK? Niall - Original Message - From: "Paul Barry" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 05

Re: indexed="true" is only valid within an enclosing iterate tag

2004-05-05 Thread Paul Barry
If I do this: It gives me the results I want: ... But I can't get indexed="true" to work with c:forEach Paul Barry wrote: Yeah, if I remove the indexed="true", my JSP code looks like this: I get a bunch of HTML inputs like this: With different values

Re: indexed="true" is only valid within an enclosing iterate tag

2004-05-05 Thread Paul Barry
I meant Paul Barry wrote: If I do this: It gives me the results I want: ... But I can't get indexed="true" to work with c:forEach Paul Barry wrote: Yeah, if I remove the indexed="true", my JSP code looks like this: I get a bunch of HTML inputs lik

Re: indexed="true" is only valid within an enclosing iterate tag

2004-05-06 Thread Paul Barry
he exception you show is for the EL version of the checkbox tag. Also its better if you post to the struts user list rather than directly to me - someone who knows more than me or has experienced your problem may jump in if you post to the list. Niall - Original Message - From: "Paul Ba

Re: indexed="true" is only valid within an enclosing iterate tag

2004-05-07 Thread Paul Barry
java.util.HashMap(); map.put("code","ABC"); interests.add(map); request.setAttribute("interests",interests); %> Interest: ... and it produced: Interest: Niall - Original Message - From: "Paul Barry

Re: nl2br equivalent?

2004-05-25 Thread Paul Barry
Another way to do it is to create a wrapper method in your form that does the replacing. So if you have a text property in the form, create a textAsHTML method that return the test property with the line breaks replaced. That could get ugly if you have lots of fields like that, so I would the

Re: Session size

2004-05-27 Thread Paul Barry
Sounds like a good idea. I suggest that you look into using something like ibatis to handle the caching for you, and it definately won't take you a week to implement, even with the learning curve of ibatis. Riyad Kalla wrote: Mike, Good suggestions. I was dealing with something like this recent

Re: Newbie - DataBase

2004-07-30 Thread Paul Barry
I think why you would want to do it is pretty obvious, you need to get data from the database to display on your page, such as a list of items. A better question is why would you not want to. That answer to that question is that it would be better to encapsulate your database query in a Data Ac

Re: DAO Resource Suggestions

2004-07-30 Thread Paul Barry
Here is another one: http://www.javapractices.com/Topic66.cjp Bussie, Andre D wrote: Does anyone know of good resources on implementing a DAO and service within a struts application Andre' D. Bussie Sourcing Rotational Program MAC-MAR 532 Fellowship Rd Moorestown, NJ 08057 856.787.3273 856.9

validator and dispatch action

2004-03-31 Thread Paul Barry
Hello Everyone, I am using the validator and dispatch actions and I am wonder what the best way to do this is. Consider that I have the following method in a dispatch action: add- populates collections for drop-down lists, forwards to jsp page create - needs to do validation and store in d

Re: validator and dispatch action

2004-03-31 Thread Paul Barry
that you defined in the validation.xml, e.g. 'widget-update' or 'widget-edit' and then call the validate() method. My main worry is that ActionMapping may not like being changed, but if so, you could instantiate a new one. Adam On 03/31/2004 05:18 PM Paul Barry wrote: H

Re: validator and dispatch action

2004-03-31 Thread Paul Barry
g.getName(); mapping.setName("widget-edit"); form.validate(mapping, request); mapping.setName(oldName); On 03/31/2004 05:52 PM Paul Barry wrote: The name of the action-mapping has to correspond to the name of the form-bean. Adam Hardy wrote: If I really wanted to stick with your set-up, I se

Re: validator and dispatch action

2004-03-31 Thread Paul Barry
Name(); mapping.setName("widget-edit"); form.validate(mapping, request); mapping.setName(oldName); On 03/31/2004 05:52 PM Paul Barry wrote: The name of the action-mapping has to correspond to the name of the form-bean. Adam Hardy wrote: If I really wanted to stick with your set-up,

Re: validator and dispatch action

2004-03-31 Thread Paul Barry
fig to say "use this form name even though we are using the same class" name="" property=""?? It would still require a different mapping...if it is true sandeep -Original Message- From: Paul Barry [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 31, 2004 1

Re: validator and dispatch action

2004-03-31 Thread Paul Barry
validation, etc and then actually handle these all with a multiple methods in a single Action class. http://jakarta.apache.org/struts/api/index.html Mike Paul Barry wrote: Hello Everyone, I am using the validator and dispatch actions and I am wonder what the best way to do this is. Consider t

validator integer required

2004-04-01 Thread Paul Barry
I have an ActionForm with an int property called id. If I use the validator "required" validation, it always passes the validation, even if there is no request parameter called id. Is this is correct behavior, or am I doing something wrong?

Re: validator integer required

2004-04-01 Thread Paul Barry
side from that, std questions about validator setup: Is validate="true" on your ActionMapping? Are we talking about a ValidatorForm or a ValidatorActionForm? With the letter, you validate the Mapping name. with the former you validate the form name? HTH, Joe -Original Message- Fro

BeanUtils.copyProperties() throws java.lang.IllegalArgumentException: No origin bean specified

2004-04-01 Thread Paul Barry
I am trying to use BeanUtil.copyProperties() as described in 5.6.7 in "Struts in Action" (Husted). I have an Interface UserBO which my ActionForm implements. I also have a standard JavaBean UserBOImpl which implements the Interface. I have a DAO that returns a UserBOImpl. I would like to us

Re: [OT] UI Suggestion Request

2004-04-01 Thread Paul Barry
I have seen people create a link to a pop-up window next to the a text input box. The pop-up window has a scrolling, possibly paged list of the descriptions you want the users to be able to select from. Each description is a hyperlink and when the user clicks on one of the descriptions, the p

Re: BeanUtils.copyProperties() throws java.lang.IllegalArgumentException: No origin bean specified

2004-04-02 Thread Paul Barry
-Original Message- From: Paul Barry [mailto:[EMAIL PROTECTED] Sent: 02 April 2004 00:12 To: [EMAIL PROTECTED] Subject: BeanUtils.copyProperties() throws java.lang.IllegalArgumentException: No origin bean specified I am trying to use BeanUtil.copyProperties() as described in 5.6.7 in "Stru

Re: validator integer required

2004-04-02 Thread Paul Barry
02/2004 01:01 AM Paul Barry wrote: validate is true. I wrote my own "greaterThan" validation to make sure the property is greater than 0, which seems to work. I haven't looked at how the validator works at all, but it seems that it checks the form bean, not the request parameter

Editing unique fields

2004-04-02 Thread Paul Barry
When I am writing a form that updates a record in the database, the best practice is to pre-populate the form with the data from the database and then just update all of those values in the database, regardless of whether or not they have changed, right? So what happens when you have a field t

Re: [FRIDAY OT] .net or websphere?

2004-04-02 Thread Paul Barry
Not really sure why you sent this to the struts mailing list, but I can tell you this in not the place to get an unbiased opinion on that subject. Asking a bunch of java developers if you should choose .net or a J2EE server is like asking people at the Democratic National Convention if you sho

Re: Editing unique fields

2004-04-02 Thread Paul Barry
elect returns one or more records then you know that the selected Code on the myFoo object is not valid. Paul Barry wrote: When I am writing a form that updates a record in the database, the best practice is to pre-populate the form with the data from the database and then just update all of those v

Re: Connection Pooling (How i use...)

2004-04-06 Thread Paul Barry
Yes, you need to put the conn.close() in a finally, something like this Connection conn = null; try { ... conn = ds.getConnection(); ... } catch(Exception ex) { } finally { try { conn.close(); } catch(Exception ex) { System.err.println(ex); } } In your way, if

Re: Connection Pooling (How i use...)

2004-04-06 Thread Paul Barry
Looks like he is not re-inventing the wheel because he is already using DBCP. His question is just about how to use the pool properly. But if are we are talking about re-inventing the wheel, I would recommnd that you take a look a SQLMaps http://www.ibatis.com/common/sqlmaps.html. This takes a

Re: ORM Tools (Ibatis, Hibernate, OJB....)

2004-04-06 Thread Paul Barry
I don't know much about ORM toools, but I can say that iBatis SQL Maps is not an ORM tool. As I understand it, ORM tools map java object to database tables, whereas SQL Maps map java objects to SQL statements. iBatis just makes using JDBC much easier, whereas ORM tools hide the JDBC from you,

validator one of multiple fields required

2004-04-07 Thread Paul Barry
Is there an easy way to check that at least one of multiple fields is filled in with the validator? Kind of like: if(username != null || firstname != null || lastname != null) - To unsubscribe, e-mail: [EMAIL PROTECTED] For add

Re: Problem with Formbean validate method forwarding to input page

2004-04-07 Thread Paul Barry
Make your input action an error page, which just has the error and no sensitive data and make a success forward that you only send the user to if everything checks out. Todd Bryant wrote: I have need for every page in my web app to be secure. What I originally did was extend the Action class to

Re: Problem with Formbean validate method forwarding to input page

2004-04-07 Thread Paul Barry
odd Bryant wrote: That is a good suggestion, and I had thought of that, but the problem is that a user would have to go from the error page back to the page they were on. This would make it prohibitively difficult to interact with this particular app (too many clicks). -Original Message-----

Re: Problem with Formbean validate method forwarding to input pag e

2004-04-07 Thread Paul Barry
is - is the formbean populated BEFORE the request processor runs or after? If the form bean is populated before the method you mention, then the request process will still be circumvented by the formbean. -Original Message- From: Paul Barry [mailto:[EMAIL PROTECTED] Sent: Wednesday, April

html:text for Date property

2004-04-09 Thread Paul Barry
What is the best way to deal with a Date property in an ActionForm? My ActionForm has a object that has a Date property that I want to set. So I have If I populate the that property in the Action like this: MyObject obj = new MyObject(); obj.setDate(new Date()); form.setObject(obj); The html

Re: html:text for Date property

2004-04-09 Thread Paul Barry
Yeah, I guess I could do that. I think need 2 properties. I would create a dateAsString property, have the form get and set that, and then have the getters and setters set and convert the actual Date. This way I can call getDate to get a Date and getDateAsString to get it as a formatted Stri

Re: html:text for Date property

2004-04-09 Thread Paul Barry
ing as the property in the tag. I'll also create a rule in the validator to make sure that dateOfBirthString is the right format, so the ParseException never happens. Christian Bollmeyer wrote: On Friday 09 April 2004 21:19, Paul Barry wrote: Generally, it's a good idea to have onl

Struts, Business Logic, DAOs

2004-04-15 Thread Paul Barry
I have a question about business logic. The best way I can think to explain this is with an example. I know this is kind of long, but I am trying to keep this as simple as possible while still being able to illustrate the point. Let's say I have Users and Widgets. I would have Business Obje

Re: Unsub

2004-04-15 Thread Paul Barry
It's [EMAIL PROTECTED] now, the docs haven't been updated. Slattery, Tim - BLS wrote: I'm trying to unsub from this list, since I'm going away for a week. Unfortunately, when I send email to [EMAIL PROTECTED], as directed by the welcome message I got when I subscribed, as well as the footers to n

Re: [OT] Oracle JDev 10g Final (9.0.5.1 build 1605) is out!

2004-04-19 Thread Paul Barry
I have been using Eclipse for a while now. It is a little slow a times, but overall works pretty well. Have any eclipse users tried JDeveloper? Any reason to switch? Is JDeveloper free? Amjad Shahrour wrote: Just wanted to say my toughts about Jdeveloper10g. Simply it is GREATE!!. And t

Re: Pagination

2004-04-20 Thread Paul Barry
No, but check out displaytag at http://www.displaytag.org Steven Leija wrote: Hello All, Is there any sort of a util class that is used for pagination already provided by struts or jakarta? Thanks! Steven