The actionformbean has not been specified anywhere in this code snippet. Try adding
nested:nest
property=foo before the nested:write where foo is the instance of the
actionformbean you
have instantiated.
m
--- Karr, David [EMAIL PROTECTED] wrote:
That's a different error. You always have
At your own risk, manipulate the ActionErrors and ActionMessages collections any way
you like.
They're in the request scope and named according to Globals.ERROR_KEY and
Globals.MESSAGE_KEY.
m
--- Shane Mingins [EMAIL PROTECTED] wrote:
Hi
I have a Swing app where the SwingView implements
Try bean:write name=bean property=list[0]/
m
--- Smith, Johnathan M. [EMAIL PROTECTED] wrote:
I have bean in struts that returns a list of names how can I only take the
first name out of the list?
Please do not transmit orders or instructions regarding a UBS account by
email. The
Perhaps if you posted some code someone could provide more specific help.
m
--- Smith, Johnathan M. [EMAIL PROTECTED] wrote:
Does not work!
-Original Message-
From: Michael Ruppin [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 4:20 PM
To: Struts Users Mailing List
+1 (#1).
m
--- Brandon Goodin [EMAIL PROTECTED] wrote:
#1
Reasons:
-Dynas massive struts configs are annoying and the runtime errors
bite.
-DynaForm time saving is insignificant (how long does it take for your
ide to generate getters/setters?).
-Refactoring is easier is traditional
+1 (#3)
--- Mainguy, Mike [EMAIL PROTECTED] wrote:
#2 and #3 are, to me, flip sides of the same coin. Our team is really
divided over which is better. Currently, we're using #3 and I personally
think it's the best way, but, the argument that has been made that it is
much simpler to
You did make the indexed setters in your Form, right?
m
Hajratwala, Nayan (N.) [EMAIL PROTECTED]wrote:
Folks, I have the following jsp that is giving me a headache.
My ActionForm contains a Collection of Device objects. The outer loop iterates over
each device.
Each Device contains a
I never got any official confirmation on this, but in my experience, you can't do this
without the nested taglib. You can nest with strut tags, and you can index, and you
can nest and index, but only if the indexed object is the furthest nested. In other
words, sl.s[0] would work, but sl[0].s
)
public void setDeviceParameterValue(int parameterId, String value)
---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com
-Original Message-
From: Michael Ruppin [mailto:[EMAIL PROTECTED]
Sent: Friday, September 19, 2003 12:42 PM
To: Struts Users Mailing List
Subject: Re
Yeah, but doesn't that assume he has a static set of forms? Looks likely dynamic,
to me.
I use nested collections of Forms for this. Rather than multiple HTML forms, there is
one, and
everything gets submitted with indices.
HTH
m
--- Edgar P Dollin [EMAIL PROTECTED] wrote:
Use multiple
Alternatively, nest your beans. That is, have TeamForm contain an instance of
AwayTeam and an instance of HomeTeam:
public class TeamForm extends ActionForm {
private AwayTeam awayteam = new AwayTeam();
private HomeTeam hometeam = new HomeTeam();
...
Then, your select tags look
This looks a lot like your last post.
Try:
name=logonForm
in your action
m
Ritvik [EMAIL PROTECTED] wrote:
Hi There,
I am following the book 'Struts In Action' books and trying to build the
Sample Logon Application from first few chapters. I was able to display
Welcome page (Welcome.do) and
Non-String Form bean properties are evil though, you'll thank yourself later if you
use Strings. As long as the String is set to something sensible like true or
false, your checkbox will be properly set.
I'm sure there are ample posts on the pros cons of this approach, here's one pro
Funny you should mention that, the thread I provided discusses a caveat with that very
Object
Edgar P Dollin [EMAIL PROTECTED] wrote:Boolean form properties are cool too (at
least in my experience)...
Edgar
-Original Message-
From: Michael Ruppin [mailto:[EMAIL PROTECTED]
Sent
This might provide more ideas for your regexp pattern, it works with egrep:
^((0?[1-9]{1})|(1[0-2]{1})){1}[/]((0?[1-9]{1})|(1[0-9]{1})|(2[0-9]{1})|(3[0-1]{1})){1}[/][0-9]{4}$
Not sure about the date validator. Does it prevent submission of 2/29/2003? I do
everything server side ;)
m
Check this thread:
http://marc.theaimsgroup.com/?t=10559454236r=1w=2
HTH
m
Fumitada Hattori [EMAIL PROTECTED] wrote:
Hi gurus,
I wanna know that ActionForm's reset method is invoked twice ?
There's an action tag in my struts-config.xml.
type=example.Test
name=TestForm
scope=request
Distract him with some tasty ants. Mmmm. Ants.
Adam Hardy [EMAIL PROTECTED] wrote:I can hardly believe I am saying this, but the
aardvark keeps eating my
pixie.
On 09/05/2003 05:28 PM Bradley Handy wrote:
That was neat.
-Original Message-
From: Andrew Hill [mailto:[EMAIL
I find that this can still be a valid solution, even when business logic is entirely
factored out of Actions. For example, I have Form A and Form B, both of which nest
Form C. My Actions are all related to LookupDispatchActions. Action A checks the
request for Form A specific submissions,
I don't know about intellij idea, but check here:
http://java.sun.com/products/javabeans/docs/spec.html
Section 8.3.2. I think you need either boolean
getIsTuesday(), or boolean isIsTuesday(). boolean
isTuesday() is non-conforming since you have no
boolean property by the name of tuesday in this
What is it that makes you think our dates time are
not correct?
--- Keith Pemberton [EMAIL PROTECTED] wrote:
I know that this is way off topic but it would be a
bit help for my
inbox. Could the people associated with this list
please check the
clock on there computers and set the correct
I know, I know, never use anything but Strings in an
ActionForm to be populated from the request. I guess
this is the same old argument for that.
I recently thought it might be convenient to use a
Boolean, and it worked fine, until I re-used the Form
for a query jsp where this property was NOT
In your Form/Action you specify a property for
ActionErrors:
String property=FormOne;
ActionErrors errors = ...;
ActionError error = ...;
errors.add(property, error);
In your jsp you use the Struts html:messages tag
with the property attribute:
html:messages property=FormOne id=msg
...
Check that the ActionErrors object under
org.apache.struts.action.ERROR actually contains
anything:
Iterator i =
request.getAttribute(Globals.ERROR_KEY).get();
while (i.hasNext()){
System.out.println(i.next()).getKey());
}
Although, even if it did, I don't think you'll see
them when you set
I wouldn't suggest this is a design issue. This
happens all the time, especially if you're nesting
forms. Furthermore, LookupDispatchAction can get you
into trouble; your Message Resources could be
translated in such a way that some methods become
unreachable (button.one=FooBar,
Is this a cut paste of the code? You're missing a
closing paren in your if statement.
m
--- Jerry Jalenak [EMAIL PROTECTED] wrote:
I am extracting the class type from an Action:
Class c = Class.forName(mapping.getType());
I can then 'chase' the class chain backwards:
I agree with Simon Adam. Something else to consider
is moving the cursory checks to your actions. If you
ever plan to use [Lookup]DispatchAction or similar,
you may have the need for different, or a lack of,
validation in your methods. Extending your Forms
might not be the best alternative,
--- Adam Hardy [EMAIL PROTECTED]
wrote:
I have two actions chained together. They both take
the same formbean.
The first is sectionInsert.do and the second, which
sectionInsert
forwards to on success, is sectionEdit.do
sectionInsert.do receives the properties of a
Section in the
Maybe someone in this thread figured it out:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg72575.html
m
-Original Message-
From: Natalie D Rassmann
[mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 1:07 PM
To: Struts Users Mailing List
Subject: Cancel Button Not
Here's the spec:
http://sunsdlc1-1.sjc-colo.bbnplanet.com/servlet/EComFileServlet/main_products/SDLC//ESD4/JSCDL/javabeans/1.01/beans.101.pdf?ActionId=verifyTicketId=Cl5Z%2BEmLVFM%3DTicketServerUrl=UMdnxpfbimnVhsPzHcxQH1vcfpnakcdixIDR8grWSV9U3HLSgqDMYN%2BV1osLy1dXQQ%3D%3DGroupName=5PoE
Ahhh.
I don't know if it was resolved, but this thread
should be of interest to you:
http://marc.theaimsgroup.com/?l=struts-userm=105943092932593w=2
HTH
m
--- Jones, Marty B. [EMAIL PROTECTED]
wrote:
I have the following tag declaration in a jsp file:
html:form name=loginForm action=/login
So long as both selects are in the same form as
the input type=submit, they will both be in the
request.
m
--- Rick Col [EMAIL PROTECTED] wrote:
Hi,
I have two drop down lists. Once a user selects once
item for every list, she will press on submit
button.
The two lists are collections. I
?
regards,
--- Michael Ruppin [EMAIL PROTECTED] wrote:
So long as both selects are in the same form
as
the input type=submit, they will both be in
the
request.
m
--- Rick Col [EMAIL PROTECTED] wrote:
Hi,
I have two drop down lists. Once a user selects
once
item
Check that
Constants.SUCCESS=success
m
--- todd thorner [EMAIL PROTECTED] wrote:
I have reached this far in my debut logon page
development...
The first JSP page comes up fine, showing me a form
html:form action=/LogonSubmit with a rendered
html:text tag for each required field
Well, ultimately jsp IS Java You can always do
this:
%
String
foo=http://myweb.com/mypage?companyid=+id+ssn=+ssn;
%
mytag:sample name=persons uri=%=foo% /
However, use of scriptlet is discouraged here. If you
switch to JSTL tags, and put foo into an ActionForm
property populated in your
That's not what the ActionForm.reset() method is for.
It's called prior to population of your ActionForm
from the request, to set values for things which may
not be in the request [but should be], like unchecked
checkboxes.
What you need is some ActionForm.setEmpty() method to
call before
What's in your struts-config action mapping? If you
have redirect=true this is expected.
--- Alex Shneyderman [EMAIL PROTECTED] wrote:
I have a need to chain actions and my code looks
like:
OperationConfig oc = new OperationConfig ();
if ((oc.getStep () == null) || .equals
You can't do that. See here for more:
http://marc.theaimsgroup.com/?l=struts-userm=105771765327337w=2
HTH
m
--- Sashi Ravipati [EMAIL PROTECTED] wrote:
jsp:param name=Name value=bean:write
name=showvalue property=providerName / /
I get the following errors
Error(32): Attribute:
The third example in Kris' post, would do. For your
JSP, that would translate to:
jsp:param name=Name value=%=foo /
Where does foo come from, you ask? I believe this
whould be one of a few possible answers:
%
String foo = showvalue.getProviderName();
%
m
--- Sashi Ravipati [EMAIL PROTECTED]
I look up the second key in the MessageResources.
This can be a hassle, especially in JSPs. If there's
a better alternative, I'm unaware.
m
--- White, Joshua A (HTSC, CASD)
[EMAIL PROTECTED] wrote:
Say I have the following items in my message
properties file.
label.name=Your Name
This can be done, although I'm not using the html:link
tags, nor is my documentaion up-to-date enough to
include a description of the action attribute in
your tag. You are, of course, including the
parameter attribute in your struts-config mapping
for this action, right? Your use of the
Whoops, I'm going blind, I totally missed the
bean:define. Must be Friday.
--- Michael Ruppin [EMAIL PROTECTED] wrote:
This can be done, although I'm not using the
html:link
tags, nor is my documentaion up-to-date enough to
include a description of the action attribute in
your tag. You
--- Jim Kennedy [EMAIL PROTECTED] wrote:
I have created several sites that use the
mapping.findForward(BLA) method to forward (or
redirect) to a relative URL. This has always been
statically specified in my struts-config.xml like
this:
forward name=success path=/main_layout.jsp
Great question. You don't, which is why I did my own
dispatch Action which works off the existence of a
parameters in the request, not their value. In other
words, I made a different form property for each type
of submission, and I check which are non-null.
Otherwise, you can't have two buttons
I posted similar code today, just replace
forwardfrommapping.getPath() with your action mapping
path:
http://www.mail-archive.com/struts-user%40jakarta.apache.org/msg74345.html
as did Wendy, yesterday:
http://www.mail-archive.com/struts-user%40jakarta.apache.org/msg74221.html
m
--- Ashish
Try:
org.apache.struts.action.ActionErrors errs =
(org.apache.struts.action.ActionErrors)request.getAttribute(org.apache.struts.action.ERROR);
if(errs!=null){
Iterator i=errs.get();
while(i.hasNext()){
org.apache.struts.action.ActionError err =
---
From : Michael Ruppin
To : Struts Users Mailing List
Cc :
Date : Tue, 22 Jul 2003 08:32:00 -0700 (PDT)
Subject : Re: a_little_question:Please_help_me
Try:
org.apache.struts.action.ActionErrors errs =
(org.apache.struts.action.ActionErrors
There are probably more ways, too. Depending on your
design, I'd recommend Mark's suggestion. Validation
in the Action makes sense particularly when using a
variant of DispatchAction, wherein there will be many
methods for different submissions, only some of which
require validation, and perhaps
Your use of the logic:iterate attributes does not look
right
(http://jakarta.apache.org/struts/struts-logic.html#iterate).
I believe you want 'name=CARVO', 'id' is supposed
to be whatever name you want to assign to Objects from
the map (In this special case, the Map.Entry Objects).
You use that
Whoops, forgot the property=mapEquipment in the
iterate tag.
--- Michael Ruppin [EMAIL PROTECTED] wrote:
Your use of the logic:iterate attributes does not
look
right
(http://jakarta.apache.org/struts/struts-logic.html#iterate).
I believe you want 'name=CARVO', 'id' is supposed
Unless validation suceeds, this looks like an infinite
loop to me:
input=/ForgotPassword.do
path=/ForgotPassword
m
--- Erez Efrati [EMAIL PROTECTED] wrote:
I am using struts/tiles/validator in my application.
Using the following configuration works fine, still
I see that
Yes, if you switch the html:text to bean:write,
there will be not input HTML rendered, and therefore
nothing submitted. Yes, you can use bean:write
followed by html:hidden if you need a normal
string. Alternatively, consider adding
disabled=true to your html:text tags.
m
--- Linus Nikander
Is there a way to accomplish something resembling this
without scriptlet?:
a href=Foo.do?Fooform.Foos[1].foo=BARepair/a
a
href=Foo.do?Fooform.Foos[2].foo=BARecognition/a
The jsp rendering this is using a nested indexed
ActionForm, and the action mapped via Foo.do uses the
same nested indexed
The complete content of your html:cancel tag is
probably key to solving this problem.
m
--- Sashi Ravipati [EMAIL PROTECTED] wrote:
isCancelled(request) is always returning false
(Even when cancel button
is clicked)
Need some help...
Thanks
[EMAIL PROTECTED] 07/08/03 09:10AM
Odd, I can't reproduce that in 1.1-rc1. Unless you're
extending something which might override the
isCancelled(HttpServletRequest) method, or the
html:cancel tag is not contained within an html:form
tag, I can't think of anything else.
m
--- Sashi Ravipati [EMAIL PROTECTED] wrote:
This is how
I'm getting the following, using 1.1-rc1
ActionMessages.add(ActionMessages messages):
[6/20/03 11:15:23:344 CDT] 2d4fa5a WebGroup E
SRVE0026E: [Servlet Error]-[AxisPortalServlet]:
java.util.ConcurrentModificationException
at
-
From: Michael Ruppin [mailto:[EMAIL PROTECTED]
Sent: Friday, June 20, 2003 12:29 PM
To: Struts Users Mailing List
Subject: java.util.ConcurrentModificationException
at
org.apache.struts.action.ActionMessages.add(ActionMessages.java:185)
I'm getting the following, using 1.1-rc1
I'm setting redirect=true on an ActionForward to
remove the request parameters which do not correspond
to the form named in the mapping for the path. This
works nicely, but it appears as if anything I need to
get into the new form needs to be a request parameter,
as a result. Is this true? If I
Without checking the archives for specific references,
I'm still sure I've read on multiple occasions, Don't
use Vectors, use ArrayLists. I was under the
impression that this was because Vectors are not
synchronized. After refactoring, today, I read here
that ArrayLists are not synchronized:
Gee, isn't thread safty an issue with Struts? I
thought I should use synchronized Objects in my
Actions.
--- David Graham [EMAIL PROTECTED] wrote:
Vector was a poorly designed class that has been
replaced by ArrayList. New
code should not use Vector. If you need a
synchronized list do
Struts logic tags work fine nested in HTML table
tags. Something else must be wrong, perhaps with your
logic tag attributes. The nested tag library is for
nested BEANS, not for nested tags. Unless you have
Forms which contain Forms, or Forms with Collections
of Forms, you don't need the nested
/logic:notEqual
/table
~ Keith
http://www.buffalo.edu/~kkamholz
-Original Message-
From: Michael Ruppin [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 12:24 PM
To: Struts Users Mailing List
Subject: RE: Nesting logic tags
Struts logic tags work fine nested in HTML
What's getServletContext() returning? null?
m
--- Raible, Matt [EMAIL PROTECTED]
wrote:
In a regular servlet, I'm trying to do the
following:
InputStream forms =
getServletContext().getResourceAsStream(/WEB-INF/validation.xml);
But it's throwing a NPE, and validation.xml is
Sorry to be a pain about this, but I'm still missing
something here. The suggestion below was not so bad,
for a confirmation screen. It's acceptable for all
forms needing confirmation to extend a ConfirmForm.
There are, however, situations where the second screen
really has nothing to do with
You have to take that relationship on faith. Perhaps
it's not the best example, but suffice it to say that
I have many-to-many types of relationships in my data,
and that the Forms are best segregated for re-use. It
is highly inefficient for me to make a separate form
for each combination of
My jsps currently assume use of the form specified in
the mapping from html:form action=mapping. I
suppose it's not a problem to always include the name
property in my tags, and assign that the generic form
bean name. It's a little bothersome though that the
action writer needs to know what kind
.
m
--- Doug [EMAIL PROTECTED] wrote:
Michael Ruppin wrote:
I'm reconsidering my approach to this problem, in
favor of something more elegant/more compatible
with
out-of-the-box Struts. Anyone tackled this yet?
For those not aware, MS IE allows users to launch
a
browser against
Request variables are not lost unless you set
redirect=true in your [editService] mapping, or
construct an ActionForward from scratch, setting
redirect=true.
--- Alex Winston [EMAIL PROTECTED] wrote:
My apologizes for yet another thread on action
chaining, but I am in a
bit of a pickle, and
For what it's worth, you could alternatively do this:
MessageResources resources = getResources(request);
if(form.getButton().equals(resources.getMessage(your.ok.key))){
}
if(form.getButton().equals(resources.getMessage(your.cancel.key))){
}
However, there could later be unreachable code if
I'm reconsidering my approach to this problem, in
favor of something more elegant/more compatible with
out-of-the-box Struts. Anyone tackled this yet?
For those not aware, MS IE allows users to launch a
browser against the same session via File/New/Window
(Ctrl-N). The issue is, if you have
be transferred from one
browser window to another
though i could be wrong.
-Original Message-
From: Michael Ruppin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 28, 2003 3:47 PM
To: Struts Users Mailing List
Subject: Struts and the infamous IE multiple
browser/same session
problem
I'm not sure if this is a response to me, or to Gourav
Pani. As far as my current solution goes, I don't see
how _any_ caching by the client can break it.
Depending on the level of support chosen for this, if
the client submits a form with an old key, the
important data in the session has either
to me while
I was thing about database transactions :-)
Like I said, if I've misunderstood then please
(gently) point out of the
error of my ways.
Steve
-Original Message-
From: Michael Ruppin [mailto:[EMAIL PROTECTED]
Sent: May 28, 2003 1:47 PM
To: Struts Users Mailing List
I'm interested in using logic tags to react
differently to different errors. In an effort to
determine what properties of the error bean I could
use in my logic, I tried (Note this behaved as
expected, without the property attribute):
html:messages id=error
bean:write name=error
I believe it's the struts-bean.tld write attribute
which actually does the work here, the
struts-html.tld's messages attribute just iterates.
Where's the prefix associated with the struts-bean.tld
in your snippet, that is, one would expect to see
something like:
%@ taglib uri=struts-bean
Is anyone successfully using the resource attribute
[set to false] in a msg element? resource=false
works fine for me in arg elements, but in a msg
element it has no effect. My documentation indicates
this can be done, and it's defined in the 1.1-rc1
validator_1_0.dtd, but I can't get it to
For an exercise, I decided to try using a JSP for my
definitions, as opposed to XML. All went fine until I
tried to implement a definition with an extends
attribute. It works fine in XML, but in a JSP I
get:javax.servlet.ServletException: Can't get
definitions factory from context. Both my JSP
76 matches
Mail list logo