I have instances of beans within the ActionForm and then access them with
the name of the bean and the name of the property in the bean when using
them in the JSP. The only problem is having non-Strings in the bean. You
need to do some sort of conversion within the ActionForm to get around this.
method in the ActionForm. If we have the original
bean as an instance variable in the ActionForm and have no other
getters/setters hardcoded into the ActionForm, won't that cause a
compile-time error on the JSP?
- Original Message -
From: MacKellar, Kimberly [EMAIL PROTECTED]
To: 'Struts
() or nameOfBean.propertyOfBean
- Original Message -
From: MacKellar, Kimberly [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Friday, February 15, 2002 3:22 PM
Subject: RE: Form - Bean conversion
You will have a getter and setter for the bean. Then in the jsp you
hardcoded into the ActionForm, won't that cause a
compile-time error on the JSP?
- Original Message -
From: MacKellar, Kimberly [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Friday, February 15, 2002 2:54 PM
Subject: RE: Form - Bean conversion
I have
If I understand your structure correctly, something like the following
should work
strutslogic:iterate id=a name=newBusinessActivityForm
property=report.Level1
brstrutsbean:write name=a property=agentName//a
strutslogic:iterate id=b name=a property=Level2
brInsured Name:
html:image src=images/cancel.gif border=0
property=org.apache.struts.taglib.html.CANCEL/
-Original Message-
From: Cutrell, George [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 09, 2002 4:45 PM
To: 'Struts Users Mailing List'
Subject: How to achieve html:cancel but with an image?
You need to add your object to the request or the session.
Try adding
if (request.equals(mapping.getScope()))
request.setAttribute(mapping.getAttribute(), oForm);
else
session.setAttribute(mapping.getAttribute(), oForm);
Where your struts-config.xml contains something like
action
This is happening because when you click submit and go to validate(...) in
your form class a new form is created and populated with the request
parameters from the JSP page. So if you don't have postDate as a hidden
field or put the form in session the value will be lost. Ted posted a
message
Set the filter attribute of bean:write to false.
Kimberly MacKellar
-Original Message-
From: John Ng [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 18, 2001 1:25 PM
To: Struts Users Mailing List
Subject: embed html tags in the javabeans.
Hi, I have a javabean with one method
I know this is off subject but I can't find a poolman mailing list and I
know there are people on this list using Poolman...
I'm running struts-1.0 on a windowNT machine with tomcat-3.2.3. I have
multiple webapps running under the same server. I just set up a new webapp
that uses poolman. The
something
like this:
try {
if (resultSet!=null) resultSet.close();
if (statement!=null) statement.close();
if (connection!=null) connection.close();
} catch (SQLException sqle) { }
Hope that helps :)
Nathan Anderson
-Original Message-
From: MacKellar, Kimberly
!= conn)
{
conn.close();
}
...
}
catch(Exception)
{
}
}
- Original Message -
From: MacKellar, Kimberly [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, December 19, 2001 9:57 AM
Subject: RE: Poolman
I have a class called Tags which contains 5 fields each of which is a
String. In an action form, I have a Vector of Tags. I need to be able to
iterate over the vector to print out the values contained in tags as form
fields that will then be submitted and hopefully put back into the Vector of
Could you do the following?
bean:cookie id=cookies name=.. multiple=true/
logic:iterate id=fav name=cookies scope=page
bean:write name=fav property=value /br
/logic:iterate
Kimberly MacKellar
-Original Message-
From: Juan Alvarado [mailto:[EMAIL PROTECTED]]
Sent: Friday,
Is it because of the typo?
bean:message key=%=request.getAttribute(errorMessage)%/
Kimberly MacKellar
-Original Message-
From: Rooms, Christoph [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 16, 2001 9:03 AM
To: 'Struts Users Mailing List'
Subject: Use Request Attribute in message
You can do a bean:size id=vectorSize... to the size of the vector.
Then do a logic:equal value=0 name=vectorSize
I think this should work but haven't tried it.
-Original Message-
From: Francois Duchaussoy [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 15, 2001 4:13 PM
To:
Hi All,
I have a JSP that contains
bean:define id=notAssociated name=editAssociationsForm
property=notAssociatedInsts/
td
html:select size=10 property=newAssociations multiple=true
style=width=206;
html:options collection=notAssociated property=value
labelProperty=label/
How are you storing the information in the columns?
Kim
-Original Message-
From: Rajeshwar Rao V [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 31, 2001 2:05 PM
To: Struts Users Mailing List
Subject: Sorting at client side
Hi ,
We are displaying data in tabular form in
I have an iterate tag and the body of this tag prints out a link to forward.
I need to pass multiple parameters to the link one of which is a property of
the current bean in the iteration.
I tried doing the following :
%
java.util.HashMap args = new java.util.HashMap(2);
bean:write property=variable1/
-Original Message-
From: Dua, Amit [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 19, 2001 12:24 PM
To: '[EMAIL PROTECTED]'
Subject: porb:
how to write equivalent of %=variable1% in stuts
To get the first element of the Vector set the length=1 in the iterate tag
for example:
logic:iterate id=currRecord name=beanName property=vectorName
length=1
bean:write name=currRecord property=name/
bean:write name=currRecord property=desc/
bean:write name=currRecord property=price/
In your struts-config.xml put
action...
forward name=success path=/nextAction.do /
/action
Kim
-Original Message-
From: Julia Yang [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 13, 2001 4:20 PM
To: [EMAIL PROTECTED]
Subject: How to mapping to a action class instead of a JSP
I created a servlet that is loaded at server initialization by including the
following in web.xml
servlet
servlet-nameInitialization/servlet-name
servlet-classcom.tfp.fraudban.InitializationServlet/servlet-class
load-on-startup1/load-on-startup
/servlet
and in the init method of
Are all of your errors defined in the ApplicationResources.properties?
Kim MacKellar
-Original Message-
From: Marcel Andres [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 10, 2001 10:06 AM
To: struts-user
Subject: Does html:errors not work proper?
Hi there
Like most of you, I am
I have a bean that is being stored in the Session which contains a caseId
and a HashMap of related items. In my JSP page I print the caseId and then
iterate over the HashMap and print out its key and value Object. During
this iteration I need to be able to print out a link tag that will go to
I have a form that submits a file to an action (UploadImageAction). After
the action has finished processing the file it forwards to another Action
that retrieves data to display a page. When the forward is invoked in
UploadImageAction I get the following error
javax.servlet.ServletException:
I am trying to upload an image to my local tomcat server. I have created a
bean called ImageUploadForm that contains
FormFile imageFile;
public void setImageFile(FormFile imageFile)
{
this.imageFile = imageFile;
}
public FormFile getImageFile()
{
return imageFile;
}
and a JSP
Well if I move the jar file to the correct directory, it all seems to
work... Amazing :
-Original Message-
From: MacKellar, Kimberly
Sent: Thursday, August 09, 2001 10:39 AM
To: '[EMAIL PROTECTED]'
Subject: RE: New Release
Chris,
This isn't exactly struts related... How did
I am trying to iterate over a Vector using the logic:iterate tag.
Everything works fine until I try to set an offset.
The offset for where I need to start iterating from is passed in as a
parameter to the page and I retrieve it using
bean:parameter id=fromRecord name=FROMRECORD value=0/
when I
When is the new release of struts coming out (I really would like to use the
logic:notEmpty tag)? What happened to PropertyUtils in the nightly builds?
Kimberly MacKellar
Thomson Financial Publishing
[EMAIL PROTECTED]
30 matches
Mail list logo