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
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
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
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
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
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
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
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
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
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
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
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
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
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,
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
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
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?
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
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
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
-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
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
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
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
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
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
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
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,
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
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
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-----
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
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
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
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
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
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
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
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
39 matches
Mail list logo