You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dakota Jack <da...@gmail.com> on 2005/01/23 09:41:52 UTC
Where is the Struts 1.2.6 API for taglibs?
I am getting the following error:
java.lang.IllegalArgumentException: No bean specified
org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:751)
org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:937)
org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811)
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298)
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:493)
And, so, I need to get the API for the <html:image> taglib for Struts
1.2.6. Where is that?
Thanks.
Jack
--
------------------------------
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~
"You can't wake a person who is pretending to be asleep."
~Native Proverb~
"Each man is good in His sight. It is not necessary for eagles to be crows."
~Hunkesni (Sitting Bull), Hunkpapa Sioux~
-----------------------------------------------
"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Where is the Struts 1.2.6 API for taglibs?
Posted by James Mitchell <jm...@apache.org>.
html:image produces an image (<input type="image" ...>) that submits a form.
If you are not using a form (html:form), then why do you need an image
input?
Perhaps what you are looking for is html:img, which simply renders an image
on the page (nothing to do with a form).
--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx
----- Original Message -----
From: "Kwok Peng Tuck" <pe...@bluebottle.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Sunday, January 23, 2005 8:34 AM
Subject: Re: Where is the Struts 1.2.6 API for taglibs?
> Do you really need the api for that? Well if you do you can browse the
> documentation for that.
> I'd like to know what you actually used in the <html:image> tag before you
> got the error.
>
> Dakota Jack wrote:
>
>>I am getting the following error:
>>
>>
>>java.lang.IllegalArgumentException: No bean specified
>>
>> org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:751)
>>
>> org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:937)
>>
>> org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811)
>> org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298)
>> org.apache.struts.util.RequestUtils.populate(RequestUtils.java:493)
>>
>>And, so, I need to get the API for the <html:image> taglib for Struts
>>1.2.6. Where is that?
>>
>>Thanks.
>>
>>Jack
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Where is the Struts 1.2.6 API for taglibs?
Posted by Kwok Peng Tuck <pe...@bluebottle.com>.
Do you really need the api for that? Well if you do you can browse the
documentation for that.
I'd like to know what you actually used in the <html:image> tag before
you got the error.
Dakota Jack wrote:
>I am getting the following error:
>
>
>java.lang.IllegalArgumentException: No bean specified
> org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:751)
> org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:937)
> org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811)
> org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298)
> org.apache.struts.util.RequestUtils.populate(RequestUtils.java:493)
>
>And, so, I need to get the API for the <html:image> taglib for Struts
>1.2.6. Where is that?
>
>Thanks.
>
>Jack
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Where is the Struts 1.2.6 API for taglibs?
Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Sorry, late to this discussion.
One thought from this (and oither) thread - did you upgrade BeanUtils to
version 1.7.0? LazyValidatorForm depends on LazyDynaBean which is only in
Version 1.7.0 of BeanUtils. What makes me think that is it doesn't seem that
LazyValidator form works for you in any way - if it can't find the class
then there should be errors logged.
Wendy is right (I think) - if its a DynaBean then BeanUtils should ignore
any "regular" properties youve added and just use the DynaBean get/set
methods. Rather than extending LazyValidatorForm, you could define these as
beans in the struts-config - then LazyValidatorForm should try and
instantiate them:
<form-bean name="..." type="org.apache.struts.validator.LazyValidatorForm">
<form-property name="adminForm"type="mypackage.AdminForm"/>
<form-property name="chatForm"type="mypackage.ChatForm"/>
</form-bean>
Niall
----- Original Message -----
From: "Dakota Jack" <da...@gmail.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Monday, January 24, 2005 6:25 AM
Subject: Re: Where is the Struts 1.2.6 API for taglibs?
> I have the impression taht LazyValidatorForm was a little different
> and allowed us to use it in conjunction with a regular ActionForm, so
> I had my AdminForm, ChatForm, etc. subclasses of LazyValidatorForm. I
> am thinking of a different solution, including maybe a subclass of
> <html:select> that does what I need.
>
> Jack
>
>
> On Sun, 23 Jan 2005 22:04:35 -0700, Wendy Smoak <ja...@wendysmoak.com>
wrote:
> > From: "Dakota Jack" <da...@gmail.com>
> > > If I use the code and LazyValidatorForm, then I get no HTML because
> > > it bails because of LazyValidatorForm.
> >
> > You really need to post the exact error messages.
> >
> > This isn't going to be a drop-in solution. Just as in moving from
> > ActionForm to DynaActionForm, you have to change how you define [or not
in
> > this case] and access the form properties.
> >
> >
http://struts.apache.org/userGuide/building_controller.html#dyna_action_form_classes
> >
> > "However, you cannot mix conventional properties and DynaProperties. A
> > conventional getter or setter on a DynaActionForm won't be found by the
> > reflection utilities."
> >
> > --
> > Wendy Smoak
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> --
> ------------------------------
>
> "You can lead a horse to water but you cannot make it float on its back."
>
> ~Dakota Jack~
>
> "You can't wake a person who is pretending to be asleep."
>
> ~Native Proverb~
>
> "Each man is good in His sight. It is not necessary for eagles to be
crows."
>
> ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
>
> -----------------------------------------------
>
> "This message may contain confidential and/or privileged information.
> If you are not the addressee or authorized to receive this for the
> addressee, you must not use, copy, disclose, or take any action based
> on this message or any information herein. If you have received this
> message in error, please advise the sender immediately by reply e-mail
> and delete this message. Thank you for your cooperation."
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Where is the Struts 1.2.6 API for taglibs?
Posted by Dakota Jack <da...@gmail.com>.
I have the impression taht LazyValidatorForm was a little different
and allowed us to use it in conjunction with a regular ActionForm, so
I had my AdminForm, ChatForm, etc. subclasses of LazyValidatorForm. I
am thinking of a different solution, including maybe a subclass of
<html:select> that does what I need.
Jack
On Sun, 23 Jan 2005 22:04:35 -0700, Wendy Smoak <ja...@wendysmoak.com> wrote:
> From: "Dakota Jack" <da...@gmail.com>
> > If I use the code and LazyValidatorForm, then I get no HTML because
> > it bails because of LazyValidatorForm.
>
> You really need to post the exact error messages.
>
> This isn't going to be a drop-in solution. Just as in moving from
> ActionForm to DynaActionForm, you have to change how you define [or not in
> this case] and access the form properties.
>
> http://struts.apache.org/userGuide/building_controller.html#dyna_action_form_classes
>
> "However, you cannot mix conventional properties and DynaProperties. A
> conventional getter or setter on a DynaActionForm won't be found by the
> reflection utilities."
>
> --
> Wendy Smoak
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
------------------------------
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~
"You can't wake a person who is pretending to be asleep."
~Native Proverb~
"Each man is good in His sight. It is not necessary for eagles to be crows."
~Hunkesni (Sitting Bull), Hunkpapa Sioux~
-----------------------------------------------
"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Where is the Struts 1.2.6 API for taglibs?
Posted by Wendy Smoak <ja...@wendysmoak.com>.
From: "Dakota Jack" <da...@gmail.com>
> If I use the code and LazyValidatorForm, then I get no HTML because
> it bails because of LazyValidatorForm.
You really need to post the exact error messages.
This isn't going to be a drop-in solution. Just as in moving from
ActionForm to DynaActionForm, you have to change how you define [or not in
this case] and access the form properties.
http://struts.apache.org/userGuide/building_controller.html#dyna_action_form_classes
"However, you cannot mix conventional properties and DynaProperties. A
conventional getter or setter on a DynaActionForm won't be found by the
reflection utilities."
--
Wendy Smoak
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Where is the Struts 1.2.6 API for taglibs?
Posted by Dakota Jack <da...@gmail.com>.
There is a Catch-22 on this, Wendy. If I don't use the code you see
and not LazyValidatorForm, I get no HTML because it bails because
there is a property without a getter on the form. If I use the code
and LazyValidatorForm, then I get no HTML because it bails because of
LazyValidatorForm.
More later. Home duties call.
Jack
--
------------------------------
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~
"You can't wake a person who is pretending to be asleep."
~Native Proverb~
"Each man is good in His sight. It is not necessary for eagles to be crows."
~Hunkesni (Sitting Bull), Hunkpapa Sioux~
-----------------------------------------------
"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Where is the Struts 1.2.6 API for taglibs?
Posted by Wendy Smoak <ja...@wendysmoak.com>.
From: "Dakota Jack" <da...@gmail.com>
> So, I need something like LazyValidatorForm, but that is not working
> for me. Are we on all fours concerning the problem?
I think so. I'd like to see the HTML generated from your most recent post
and know whether those 'normal' properties that are still in your form bean
(that used to be an ActionForm and is now a LazyValidatorForm) are working
or not.
I think that 1. you need to stick very closely to the JavaBeans naming
conventions and 2. you shouldn't have get/set methods in a
LazyValidatorForm. Perhaps Niall could comment on whether #2 is correct,
it's just a theory. (From the JavaDoc, it is okay to define some properties
in advance, but in struts-config.xml as you'd do for a dynamic form.)
> Where is the best place to download html-el, by the way?
Last I looked, it was in the 'contrib' directory of the Struts distribution
along with the other .jar files it needs. Look for struts-el.jar and take
all the .jar files you find alongside it. I'd hold off until you can get
this to work with a JSP expression though, you don't need any more variables
at the moment.
> Can you share that class?
Page, I should have said. I don't remember where it came from, it was
originally done with scriptlets and then I got help to change it over to
JSTL: http://wiki.wendysmoak.com/cgi-bin/wiki.pl?DebugJSP
HTH,
--
Wendy Smoak
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Where is the Struts 1.2.6 API for taglibs?
Posted by Dakota Jack <da...@gmail.com>.
<snip>
On Sun, 23 Jan 2005 17:56:51 -0700, Wendy Smoak <ja...@wendysmoak.com> wrote:
> From: "Dakota Jack" <da...@gmail.com>
>
> > I want to stress that my ONLY problem is that I want to use a dynamic
> > variable in
> > <html:select property='<c:out value="${room.value}"/>'> size='1'>
>
> Does that even work and generate HTML?
</snip>
That is right. Thanks. Assume the code, for the moment, is the
following for discussion purposes.
<%
AdminForm af =
(AdminForm)request.getAttribute("adminForm");
Map map = (Map)af.getStateBaseMap();
com.crackwillow.list.ListHandler list =
(com.crackwillow.list.ListHandler)map.get("DATA_3C");
java.util.ListIterator iterator =
((List)list.getList()).listIterator();
%>
<c:forEach
items="${adminForm.stateBaseMap.DATA_3C.list}" var="room">
<%
if(iterator.hasNext()) {
%>
<font color='<c:out
value="${state.banMddlBgClr}"/>'>
<html:select property='<%=
((com.crackwillow.gui.LVB)iterator.next()).getValue() %>' size='1'>
<html:options
collection="sound_list"
property="value"
labelProperty="label" />
</html:select><br>
</font>
<%
}
%>
</c:forEach>
This will bail with a normal ActionForm with
ApplicationDispatcher[] Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: No getter method available for
property 164.chat.rooms5 for bean under name
org.apache.struts.taglib.html.BEAN
at org.apache.struts.taglib.html.SelectTag.calculateMatchValues(SelectTag.java:266)
So, I need something like LazyValidatorForm, but that is not working
for me. Are we on all fours concerning the problem? Where is the
best place to download html-el, by the way?
Thanks,
Jack
<snip>
> I have a 'debug.jsp' class that I include at the bottom of the Tiles layout
> when I'm developing. It prints out everything, all the request parameters,
> cookies, the entire contents of request, session and context scope. That
> plus the log files usually makes it clear where any "missing" values have
> gone off to.
</snip>
Can you share that class?
Jack
--
------------------------------
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~
"You can't wake a person who is pretending to be asleep."
~Native Proverb~
"Each man is good in His sight. It is not necessary for eagles to be crows."
~Hunkesni (Sitting Bull), Hunkpapa Sioux~
-----------------------------------------------
"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Where is the Struts 1.2.6 API for taglibs?
Posted by Wendy Smoak <ja...@wendysmoak.com>.
From: "Dakota Jack" <da...@gmail.com>
> I want to stress that my ONLY problem is that I want to use a dynamic
> variable in
> <html:select property='<c:out value="${room.value}"/>'> size='1'>
Does that even work and generate HTML? Tags within tags have never been
allowed, unless you're talking about something like a <c:out> inside a
plain-old-HTML tag.
Try Struts-EL then, <html-el:select property="${room.value}" >
> Maybe I should stress that the only change I made in my code was from
> "implements ActionForm" to "implements LazyActionForm" and that leads
> to all these troubles.
implements LazyValidatorForm, I assume you mean.
IMO, writing get/set methods in a class that extends LazyValidatorForm
rather defeats the purpose, and probably *is* causing you problems, since
the framework "knows" it has a LazyValidatorForm, and when it sees
<html:text property="name"/>
I think it is going to call get("name") and not getName(). Likewise when it
populates the form bean from the request, I'd bet that your get/set methods
aren't going to be called, but the set("propName") method instead. But
maybe not... only the log files or running it in a debugger is going to tell
you exactly what method it's trying to call with what parameters.
I have a 'debug.jsp' class that I include at the bottom of the Tiles layout
when I'm developing. It prints out everything, all the request parameters,
cookies, the entire contents of request, session and context scope. That
plus the log files usually makes it clear where any "missing" values have
gone off to.
--
Wendy Smoak
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Where is the Struts 1.2.6 API for taglibs?
Posted by Dakota Jack <da...@gmail.com>.
<snip>
On Sun, 23 Jan 2005 17:21:08 -0700, Wendy Smoak <ja...@wendysmoak.com> wrote:
> What do you mean by 'farming' the values? IIRC this all started when you
> didn't want to pre-define property names. Could it be that a Mapped
> property in a normal ActionForm would do what you want? Do you really need
> separate properties for each one, or would putting them all into a single
> Map do just as well?
</snip>
I already use a mapped property in my ActionForm. My only difficulty
comes when I want to put dynamic property attribute values into Struts
html tags, because the ActionForm requires that I have a pre-existing
getter/setter set for all property attributes. That is what I have
understood from you can be handled with a LazyValidatorForm.
Everything else that I do works with Struts 1.2.6 as long as I don't
use LazyValidatorForm.
I want to stress that my ONLY problem is that I want to use a dynamic
variable in <html:select property='<c:out value="${room.value}"/>'
size='1'> in the code shown below. The property will then have values
like: 147.chat.room3.sound and 147.chat.room4.sound. What these
values are cannot be predetermined, so I have to be able to get them
either just from normal input type attributes or from some ActionForm
that can handle not having the value preset.
<c:forEach
items="${adminForm.stateBaseMap.DATA_3C.list}" var="room">
<font color='<c:out
value="${state.banMddlBgClr}"/>'>
<html:select property='<c:out
value="${room.value}"/>' size='1'>
<html:options
collection="sound_list"
property="value"
labelProperty="label" />
</html:select><br>
</font>
</c:forEach>
Is this clear? I have no trouble with Struts 1.2.6 other than finding
a way to do this. If I use LazyValidatorForm, my prior code is
busted. Otherwise, everything is okay. I have no troubles with
commons utils until I use LazyValidatorForm. However,
LazyValidatorForm does, apparently, what I need. I think I have to
look more closely at LazyValidatorForm and see what is wrong there.
Since I have no difficulty "farming" (getting the values) from
ActionForm I don't see why I should have a problem with
LazyValidatorForm using the same code. I am not trying to get the
values of those parameters particularly related to LazyValidatorForm
at this stage.'
Maybe I should stress that the only change I made in my code was from
"implements ActionForm" to "implements LazyActionForm" and that leads
to all these troubles.
Jack
--
------------------------------
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~
"You can't wake a person who is pretending to be asleep."
~Native Proverb~
"Each man is good in His sight. It is not necessary for eagles to be crows."
~Hunkesni (Sitting Bull), Hunkpapa Sioux~
-----------------------------------------------
"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Where is the Struts 1.2.6 API for taglibs?
Posted by Wendy Smoak <ja...@wendysmoak.com>.
From: "Dakota Jack" <da...@gmail.com>
> The second one probably does have something to do with how I am
> "farming" the values. Prior to using LazyValidatorForm, I have some
> values in the form as related to <html:form> and some not. E.g. I
> have a combination of <input type='hidden'> for example and
> <html:hidden>.
This really shouldn't matter (other than that with the plain old HTML tag,
Struts can't render the 'value' from the form bean. But you don't always
need that.) By the time it gets to HTML, they look the same, and when you
submit the form, it's just name/value pairs in the request.
> I have noticed that I am not getting any values in my
> Actions from my ActionForms by my normal, Struts 1.1, coding when I
> used LazyValidatorForm. All those values are blank, even the ones
> with <html:text> etc.
Again, how are you trying to get the values from the form? Showing some
code might help, you've said "It doesn't work" in a bunch of ways but
haven't given us much to look at.
> Why would that be? It must be that I have to recode farming all
> values for LazyValidatorForm? I wish I had an ActionForm class that
> would allow me to have parametr name/values without getters and
> setters in the ActionForm but without other requirements. Apparently
> LazyValidatorForm has other requirements which I must learn?
What do you mean by 'farming' the values? IIRC this all started when you
didn't want to pre-define property names. Could it be that a Mapped
property in a normal ActionForm would do what you want? Do you really need
separate properties for each one, or would putting them all into a single
Map do just as well?
--
Wendy Smoak
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Where is the Struts 1.2.6 API for taglibs?
Posted by Dakota Jack <da...@gmail.com>.
A few things, Wendy. I think you are on the right track. I had two
difficulties.
I solved one with the -*- and the @ as a stop gap solution. I
customarily use the property value of the html image button to pass
the method with myMethod.method. This will not work with
LazyValidatorForm. So, I changed that to myMethod@method, having
decided that I would rather have a char ('@') then a String ("-*'-")
in place of the original char ('.'). This solved that problem. The
utility classes have never had a problem with that until
LazyValidatorForm.
The second one probably does have something to do with how I am
"farming" the values. Prior to using LazyValidatorForm, I have some
values in the form as related to <html:form> and some not. E.g. I
have a combination of <input type='hidden'> for example and
<html:hidden>. I have noticed that I am not getting any values in my
Actions from my ActionForms by my normal, Struts 1.1, coding when I
used LazyValidatorForm. All those values are blank, even the ones
with <html:text> etc.
Why would that be? It must be that I have to recode farming all
values for LazyValidatorForm? I wish I had an ActionForm class that
would allow me to have parametr name/values without getters and
setters in the ActionForm but without other requirements. Apparently
LazyValidatorForm has other requirements which I must learn?
I guess I am going to have to open up the documentation war and learn
about LazyValidatorForm and maybe rewrite something similiar? Maybe
not too. I just don't want to change all my code to do this simple
thing.
Jack
On Sun, 23 Jan 2005 16:22:30 -0700, Wendy Smoak <ja...@wendysmoak.com> wrote:
> From: "Dakota Jack" <da...@gmail.com>
> > I think there is some way that LazyValidatorForm is wedded to the
> > struts framework that I don't understand. I will have to check it
> > out. For the moment, I cannot use it with my Actions. Is there some
> > special way we are suppposed to get the values from the form with
> > LazyValidatorForm?
>
> How are you trying to get the values out of the form? It depends on the
> type of the property-- String, Mapped or Indexed. Some variation of:
> get(String propName), get(String propName), String key, or get(String
> propName, int index) should work. (And they all return Object.)
>
> I just flipped through the code, and there's nothing special in there
> _except_ that it all depends on JavaBeans. That means that if your naming
> doesn't conform, it can fail in interesting ways. One of your first posts
> about this was someObject.method not working-- and then you seem to have
> switched to -*- and @ in the names, which I doubt BeanUtils is going to be
> happy with.
>
> All of these classes are *very* verbose, set them to DEBUG, and the log
> files should tell you exactly what is going on. (If that doesn't work, run
> it in a debugger like JSwat.) Are you getting NPE's? Is the form bean not
> getting populated at all, or are only some of the properties not coming
> through?
>
> --
> Wendy Smoak
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
------------------------------
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~
"You can't wake a person who is pretending to be asleep."
~Native Proverb~
"Each man is good in His sight. It is not necessary for eagles to be crows."
~Hunkesni (Sitting Bull), Hunkpapa Sioux~
-----------------------------------------------
"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Where is the Struts 1.2.6 API for taglibs?
Posted by Wendy Smoak <ja...@wendysmoak.com>.
From: "Dakota Jack" <da...@gmail.com>
> I think there is some way that LazyValidatorForm is wedded to the
> struts framework that I don't understand. I will have to check it
> out. For the moment, I cannot use it with my Actions. Is there some
> special way we are suppposed to get the values from the form with
> LazyValidatorForm?
How are you trying to get the values out of the form? It depends on the
type of the property-- String, Mapped or Indexed. Some variation of:
get(String propName), get(String propName), String key, or get(String
propName, int index) should work. (And they all return Object.)
I just flipped through the code, and there's nothing special in there
_except_ that it all depends on JavaBeans. That means that if your naming
doesn't conform, it can fail in interesting ways. One of your first posts
about this was someObject.method not working-- and then you seem to have
switched to -*- and @ in the names, which I doubt BeanUtils is going to be
happy with.
All of these classes are *very* verbose, set them to DEBUG, and the log
files should tell you exactly what is going on. (If that doesn't work, run
it in a debugger like JSwat.) Are you getting NPE's? Is the form bean not
getting populated at all, or are only some of the properties not coming
through?
--
Wendy Smoak
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Where is the Struts 1.2.6 API for taglibs?
Posted by Dakota Jack <da...@gmail.com>.
Well, it gets odder. I have discovered that when I submit to ChatAction with
<crackwillow:image
button='SEND.gif'
plain='false'
mapBean='state'
bgClrCode='banMddlBgClr'
txtClrCode='banLftTxtClr'
font='Eurostile'
italic='false'
bold='true'
size='16'
property='entryWrapped@method'/>
things work fine but that when I submit to the same ChatAction with
<crackwillow:image
button='Chat.gif'
plain='false'
mapBean='state'
bgClrCode='banMddlBgClr'
txtClrCode='banLftTxtClr'
font='Tork Bold'
italic='false'
bold='true'
size='25'
property='entryFormatted@method'/>
I think there is some way that LazyValidatorForm is wedded to the
struts framework that I don't understand. I will have to check it
out. For the moment, I cannot use it with my Actions. Is there some
special way we are suppposed to get the values from the form with
LazyValidatorForm?
Maybe I should say that I use both html tag elements and plain HTML
elements on the page. For example, in the same form I use
<html:hidden> and <input type='hidden'>. I do this because some of
the names in the input type tag are used to mimic the methods such as
entryFormated@method, but I don't want to have to have a value in the
ActionForm for this. LazyValidatorForm should do this for me but it
has other unknown troubles.
Any ideas?
Jack
--
------------------------------
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~
"You can't wake a person who is pretending to be asleep."
~Native Proverb~
"Each man is good in His sight. It is not necessary for eagles to be crows."
~Hunkesni (Sitting Bull), Hunkpapa Sioux~
-----------------------------------------------
"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Where is the Struts 1.2.6 API for taglibs?
Posted by Dakota Jack <da...@gmail.com>.
<snip>
On Sun, 23 Jan 2005 12:55:56 -0800, Dakota Jack <da...@gmail.com> wrote:
> It is clear, however, that
> something that works with Struts 1.1 does not work with Struts 1.2.6.
</snip>
I should have said "something that works without LazyValidatorForm
does not work with LazyValidatorForm and that something has to do with
a particular Action class in my setup. The action class that I have
problems with uses reflection to call a method and the method called
in turn uses utility classes, e.g. the Action class execute method
calls:
public ActionForward exit (ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
{
return new AdminActionExit().execute(mapping,form,request,response);
}
Does not work. I am beginning to wonder if there is something in
LazyValidatorForm that cannot stomach the second execute method.
Jack
--
------------------------------
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~
"You can't wake a person who is pretending to be asleep."
~Native Proverb~
"Each man is good in His sight. It is not necessary for eagles to be crows."
~Hunkesni (Sitting Bull), Hunkpapa Sioux~
-----------------------------------------------
"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Where is the Struts 1.2.6 API for taglibs?
Posted by Dakota Jack <da...@gmail.com>.
Thanks for the responses: they are all helpful. I meant
"documentation", Kwok. Sorry! You are right! I have the image tag
in a form, James. I am now convinced the problem is not the tag, but
somehow the Action class used with some of the image tags. This is
because all of the image tags work fine except those that "call up" a
particular Action class. Further, this Action class IS different than
the ones that work.
Before I get to the Action class differerence, let me say incidentally
that I use a custom <html:image> tag which I call <crackwillow:image>
and which extends the Struts html image tag. The difference betweeen
this and the <html:image> tag is that whatever is specified as the
image in a button attribute, e.g. "button='EXIT.gif'", is created and
cached in whatever language the user has as his/her locale. That is,
this tag does not merely reference but creates and caches the images
themselves with the values indicated in the tag, including text color,
background color, font, and size. Sometimes the tag works with Struts
1.2.6 and sometimes not. There is nothing peculiar to the crackwillow
image tag that would be impacted by Struts 1.2.6 and I suspect nothing
in the Struts image tag that would other. I think it has something to
do with the Action class, since when I use one action class, which has
many methods, the errors happen. I have the following tags which work
fine:
LOGON
<crackwillow:image
button='SUBMIT.gif'
plain='false'
mapBean='state'
bgClrCode='navTbsClr'
txtClrCode='banRtTxtClr'
font='Eurostile'
italic='false'
bold='true'
size='20'
scope='session'
property='submit@method'/>
I had to change the 'submit.method' to 'submit@method' to make this work.
UPLOAD
<crackwillow:image
button='Upload.gif'
plain='false'
mapBean='state'
bgClrCode='banMddlBgClr'
txtClrCode='banLftTxtClr'
font='Tork Bold'
italic='false'
bold='true'
size='25'
onclick='openStatus()'
property='upload@method'/>
And I have the following tag, among many, which does not work fine:
CHANGE
<crackwillow:image
button='CHANGE.gif'
plain='false'
mapBean='state'
bgClr='ffffff'
txtClrCode='banMddlBgClr'
font='Eurostile'
italic='false'
bold='true'
size='25'
alt='CHANGE'
property='webmasterChange@method'/><BR>
This Action class is a little different from the ones used in the
other cases. But, I don't see why the differences should make a
difference.
I am doing some looking at my Action differences and will get back to
this list when I have better data. It is clear, however, that
something that works with Struts 1.1 does not work with Struts 1.2.6.
Jack
--
------------------------------
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~
"You can't wake a person who is pretending to be asleep."
~Native Proverb~
"Each man is good in His sight. It is not necessary for eagles to be crows."
~Hunkesni (Sitting Bull), Hunkpapa Sioux~
-----------------------------------------------
"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Where is the Struts 1.2.6 API for taglibs?
Posted by Wendy Smoak <ja...@wendysmoak.com>.
From: "Dakota Jack" <da...@gmail.com>
> And, so, I need to get the API for the <html:image> taglib for Struts
> 1.2.6. Where is that?
Assuming you downloaded struts-1.2.6.zip (or .tar.gz) from
http://struts.apache.org/download.cgi
there is a 'struts-documentation.war' file included which has the docs for
exactly that version.
Otherwise, the latest and greatest docs are linked from the
http://struts.apache.org/ website, and you just have to keep an eye on the
'since' version to make sure you're not trying to use something that doesn't
exist in the version you're using.
And here I was going to say that I didn't think you'd have any problems
moving up from 1.1, except that you'd see deprecation warnings about
ActionError. :(
--
Wendy Smoak
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org