I am having problems defining a bean with a Session Object value.
I want to retrieve the Object within the JSP and display navigation depending
on the values within the session
Any ideas?
I can only get it working when I check directly in JSP for the the session
within the logic:present tag. I
= oFormeBean.getXXX();
From: Andrew Martin [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List user@struts.apache.org
To: Struts Users Mailing List user@struts.apache.org
Subject: bean:define
Date: Thu, 8 Feb 2007 09:04:05 +0100
I am having problems defining a bean with a Session Object value.
I want
Hello.
When I try to define the following typed variable on a page, I get a
ClassCastException:
bean:define id=totAquisicao type=java.lang.Double value=0.0/
Looking at the generated servlet code, the error occurs at this line:
totAquisicao = (java.lang.Double
td class=rightsubheading1bean:message
key=label.college//td
td class=leftsubheading1
bean:define id=colleges
i.e:
html:select property=lauf
logic:iterate id=lauf name=fehlendeKapForm property=laeufe
bean:define id=laufId name=lauf property=id /
html:option value=%= laufId.toString() %
bean:write name=lauf /
/html:option
, June 15, 2006 11:24 AM
To: user@struts.apache.org
Subject: [HELP] bean:define and Map
bean:define id=paramsMap type=java.util.Map/
I get a can not set null value form paramsMap.
How do I specify the key, value pairs?
This is to pass into html:link name= for request parameters when they
click
Thanks, this works.
Can you explain to me why I couldn't do the same thing with bean:define?
On 6/15/06, Samere, Adam J [EMAIL PROTECTED] wrote:
There are probably numerous ways to accomplish this, what I like to do
is define/instantiate the Map using the jsp:useBean/ tag, then set the
key
The bean:define tag can create new attributes and scripting variables of
type String or create a copy of an existing bean or property on an
existing bean. The standard jsp:useBean covers creating a new instance
of any class with a default constructor, so why duplicate that
functionality
for the help,
Shawn
On 6/15/06, Samere, Adam J [EMAIL PROTECTED] wrote:
The bean:define tag can create new attributes and scripting variables of
type String or create a copy of an existing bean or property on an
existing bean. The standard jsp:useBean covers creating a new instance
of any class
with tiles and here is something, I am having some trouble
with.
I have a main jsp (a.jsp). This jsp includes a few other jsps (using
tiles:insert
attribute=b/, where b=b.jsp).
Now, if I have a bean:define in a .jsp (eg bean:define name=aForm
property=prop id=prop1 /), prop1 is usable
Hey guys,
We us Struts with tiles and here is something, I am having some trouble
with.
I have a main jsp (a.jsp). This jsp includes a few other jsps (using
tiles:insert
attribute=b/, where b=b.jsp).
Now, if I have a bean:define in a .jsp (eg bean:define name=aForm
property=prop id=prop1
Sure, I prefer to use JSTL rather than Struts taglib, but jsp:useBean
should be replaced too by JSTL or Struts tags.
bean:define id=map3 name=actionForm property=map /
c:set target=${map3} property=id value=123 /
c:set target=${map3} property=name value=ahmed /
using this way is best case for me
I want to replace the scriptlet with a bean:define / tag but I don't know
how will i add the values to the hash map.
I want to avoid using scriptlet.
Thanks for your help.
--
In Life, it doesn't matter who you are, but whether someone appreciates you
for what you are, accepts you and loves you
bean:message bundle=job key=job.joblist.button1 /
/html:link
I want to replace the scriptlet with a bean:define / tag but I don't know
how will i add the values to the hash map.
I want to avoid using scriptlet.]
To be honest I haven't used the bean tag lib for years.. So i dont
know how to do
/
/html:link
I want to replace the scriptlet with a bean:define / tag but I don't
know
how will i add the values to the hash map.
I want to avoid using scriptlet.]
To be honest I haven't used the bean tag lib for years.. So i dont
know how to do what you need with bean define. But you could
bundle=job key=job.joblist.button1 /
/html:link
I want to replace the scriptlet with a bean:define / tag but I don't
know
how will i add the values to the hash map.
I want to avoid using scriptlet.]
To be honest I haven't used the bean tag lib for years.. So i dont
know how
Josh McDonald wrote:
can someone point me towards some documentation on compile-time taglibs or
however
it works? I can't seem to google an answer for myself.
Look in the source?
Dave
-
To unsubscribe, e-mail: [EMAIL
Hi!
I have a problem with defining an scripting variable with:
/bean:define id=Cmax name=adminFormBean property=Cmax
type=java.lang.Integer/
/and this property is defined into the bean called adminFormBean like this:
/private int Cmax = 0 ;
public void setCmax(int cmax
Try to put lowercase
private int Cmax = 0 ; --- private int cmax = 0 ;
-Mensaje original-
De: Eider Iturbe [mailto:[EMAIL PROTECTED]
Enviado el: martes, 22 de noviembre de 2005 10:33
Para: Struts Users Mailing List
Asunto: Problem: bean:define...
Hi!
I have a problem
Hi Eider
Try
/bean:define id=cmax name=adminFormBean property=Cmax
type=java.lang.Integer/
the property=Cmax should be property=cmax. Struts is case
sensitive. If the method in the bean is setCmax then the property should
be accessed as cmax in any of the struts tag.
Have a Good Day!!!
Best
Thanks to all! Writing the first letter in lowercase, it works well :-) !!
Eider
Ramaswamy, Palaniappan wrote:
Hi Eider
Try
/bean:define id=cmax name=adminFormBean property=Cmax
type=java.lang.Integer/
the property=Cmax should be property=cmax. Struts is case
sensitive. If the method
Thanks to both of you
I've seen the servlet's code and indeed, Michael,
you're right...
I know deeper the bean:define mechanism
now...Thanks!
Cordialement,
- Original Message -
From:
Michael Jouravlev
To: Struts Users Mailing List
Sent: Monday, November 21
Hi Michael,
Sorry to disturb again, just another question :
If i use scoped variable, than what do I must write in value attribute of
a notEqual tag?
So what do I have to write instead of
nested:notEqual property=idservice value=%=myVar%
I have tried
nested:notEqual
Hi,
I'm sure this question is easy to answer for much of yours but I cannot
figure out the following behaviour :
bean:define id=myVar value=/
% myVar = content; %
logic:notEmpty name=myVar
% System.out.println(myVar is NOT EMPTY
Nobody knows the answer to this trivial question?
Thanks
- Original Message -
From: Gaet
To: Mailing List Struts
Sent: Monday, November 21, 2005 10:08 AM
Subject: bean:define and its behaviour
Hi,
I'm sure this question is easy to answer for much of yours but I
To: Struts Users Mailing List
Sent: Monday, November 21, 2005 5:54
PM
Subject: Re: bean:define and its
behaviour
If it is trivial, why won't you look it up yourself? The key is
tounderstand that myVar objects used here
bean:define id="myVar" value=""/and here
12:46 PM
To: Struts Users Mailing List
Subject: Re: bean:define and its behaviour
Thanks for reply Michael,
I mean that it's certainly trivial for experimented users with strutsnot
like me :o)
I try to look...but I can't find the solutionwhy this variables are
different
Gaet,
This is not a Struts thing, this is a JSP thing. read bean:define
documentation [1] and look at the source code generated by servlet
container as James suggested. Documentation states clearly in the very
first sentence that bean:define creates a _new attribute_ (in the
scope specified
I try to edit my JSP in Eclipse 3.1.1 WTP (Web Tools Project) however I get
errors on variables defined by ID tags for example:
snip
bean:define id=myValue1 type=String/
bean:define id=myValue2 type=String/
%=(myValue1 + - myValue2)%
/snip
The above snip of code will result in Eclipse telling
On 11/21/05, Garner, Shawn [EMAIL PROTECTED] wrote:
I try to edit my JSP in Eclipse 3.1.1 WTP (Web Tools Project) however I get
errors on variables defined by ID tags for example:
snip
bean:define id=myValue1 type=String/
bean:define id=myValue2 type=String/
%=(myValue1 + - myValue2
Hi if have the following simple example.
A Hashtable is created and used for a options-list.
Is it possible with bean:define to create the
Hashtable without java-code?
When does it make sense to use the bean:define tag in this example
or generally?
Thanks a lot for suggestions
Starki
html
Hi!
You would normally populate the list in an action not in the jsp.
Tamas
On 9/13/05, starki78 [EMAIL PROTECTED] wrote:
Hi if have the following simple example.
A Hashtable is created and used for a options-list.
Is it possible with bean:define to create the
Hashtable without java-code
: Tuesday, May 03, 2005 6:22 PM
To: Struts Users Mailing List
Subject: Re: Combining html:image and bean:define
Chris,
Firstly, it looks like hard work using an input type=image and then
defining an onclick event - why don't you just wrap a link around an
image - i.e. something like...
a href
Hi all,
I'm using Struts 1.1, and just received from another team updates to a
JSP page that look like this:
bean:define id=nodeid name=hierarchyTreeForm property=nodeId /
bean:define id=requestPath value=%=request.getContextPath()% /
html:image pageKey=image.common.button.cancel
titleKey
Responding to my own question, I did manage to get this working by doing
this:
bean:define id=nodeid name=hierarchyTreeForm property=nodeId /
bean:define id=requestPath value=%=request.getContextPath()% /
bean:define id=cancel_pagebean:message
key=image.common.button.cancel//bean:define
-
From: Chris Loschen [EMAIL PROTECTED]
Sent: Tuesday, May 03, 2005 9:55 PM
Responding to my own question, I did manage to get this working by doing
this:
bean:define id=nodeid name=hierarchyTreeForm property=nodeId /
bean:define id=requestPath value=%=request.getContextPath
yes its an arraylist
On Wed, 10 Nov 2004 15:50:36 +0800, Peng Tuck [EMAIL PROTECTED] wrote:
Hi Richard,
You use bean:define to define a bean with a id of user but yet
in logic:iterate you refer to originatingHost ?
I think it should be refering to user instead for logic:iterate
So in logic:iterate you should refer to the bean you defined, using
bean:define right ?
Richard wrote:
yes its an arraylist
On Wed, 10 Nov 2004 15:50:36 +0800, Peng Tuck [EMAIL PROTECTED] wrote:
Hi Richard,
You use bean:define to define a bean with a id of user but yet
in logic:iterate
bean:define right ?
Richard wrote:
yes its an arraylist
On Wed, 10 Nov 2004 15:50:36 +0800, Peng Tuck [EMAIL PROTECTED] wrote:
Hi Richard,
You use bean:define to define a bean with a id of user but yet
in logic:iterate you refer to originatingHost ?
I think it should
Uh, you already have defined it using bean:define. Check the original
code snippet you sent.
You're just referring to the wrong bean in logic:iterate .
To be clear you might want to have a look see at the taglib docs right here
http://struts.apache.org/userGuide/struts-bean.html#define
Richard
select
bean:define id=user name=user property=originatingHost
logic:iterate id=host name=user
option value=1
bean:write name=host property=hostName/
/option
/logic:iterate
/bean:define
/select
Hello Guys,
Please help I have to display the contents of my arraylist object
I have this code on my jsp
select
bean:define id=user name=user
property=originatingHost
logic:iterate id=host
name
Hi Richard,
You use bean:define to define a bean with a id of user but yet
in logic:iterate you refer to originatingHost ?
I think it should be refering to user instead for logic:iterate.
Also is originatingHost a collection ?
Richard wrote:
Hello Guys,
Please help I have to display
04, 2004 11:43 PM
Subject: Re: Need an alternative to bean:define
My condolences :-( I now see your rock and hard spot.
It's not about bleeding edge though. Of course, what counts in that
regard is your clients' opinion of what bleeding edge is.
Best of luck!
Eddie
- Original Message
: Thursday, November 04, 2004 11:43 PM
Subject: Re: Need an alternative to bean:define
My condolences :-( I now see your rock and hard spot.
It's not about bleeding edge though. Of course, what counts in that
regard is your clients' opinion of what bleeding edge is.
Best of luck!
Eddie
, 2004 5:17 PM
To: Struts Users Mailing List
Subject: Re: Need an alternative to bean:define
I would question anyone who told me I had to use something that is going
away in the future (most of Struts' taglibs), instead of using a standard
technology (the JSTL).
Are they fully-aware of the decision
' [EMAIL PROTECTED]
Sent: Thursday, November 04, 2004 12:25 PM
Subject: RE: Need an alternative to bean:define
I should point out that it isn't my company that has the restrictions. My
employer would quite happily move to the bleeding edge of any technology if
there were any benefit to do so
to bean:define
Is JSTL an option? I find Struts Logic tag hard to read! If so, I think this
should do:
c:set var=lastCN value=/
logic:iterate...
c:if test=${widget.clinetName != lastCN}
/c:if
c:set var=lastCN value=${widget.clientName}/ /logic:iterate
HTH. Of course this is from top of my
Janice -
I do multiple bean:defines (with values, not with name/property
attributes) in some of my jsps, and never have problems, and am
therefore assuming that the name/property attributes are causing the
problem.
Here may be a non-jstl workaround you can try:
bean:define id=lastClientName
Matt Bathje wrote:
Janice -
I do multiple bean:defines (with values, not with name/property
attributes) in some of my jsps, and never have problems, and am
therefore assuming that the name/property attributes are causing the
problem.
Here may be a non-jstl workaround you can try:
bean:define
]
Sent: Wednesday, November 03, 2004 10:32 AM
To: Struts Users Mailing List
Subject: Re: Need an alternative to bean:define
Janice -
I do multiple bean:defines (with values, not with name/property
attributes) in some of my jsps, and never have problems, and am
therefore assuming that the name
-bean.html#define
You can't re-define in 1.1. There must be a workaround?
TIA,
J
-Original Message-
From: Matt Bathje [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 03, 2004 10:32 AM
To: Struts Users Mailing List
Subject: Re: Need an alternative to bean:define
Janice -
I do multiple
From: Janice [EMAIL PROTECTED]
Thanks Matt, but I think my problem is that I'm using Struts 1.1 (and
can't
change it)
According to: http://struts.apache.org/userGuide/struts-bean.html#define
You can't re-define in 1.1. There must be a workaround?
Honestly, I'd last 2.5 seconds in a place
Janice,
Does this snippet work if you move all of the bean:defines insidea of your
logic:iterate?
I haven't tested this myself, but I strongly suspect that the problem is the
fact that bean:define declares the variable in the resulting servlet code
that gets generated. It's trying to declare
Janice,
Does this snippet work if you move all of the bean:defines insidea of your
logic:iterate?
I haven't tested this myself, but I strongly suspect that the problem is the
fact that bean:define declares the variable in the resulting servlet code
that gets generated. It's trying to declare
Thanks Joe, but I just can't use bean:define / to refer to a variable I've
already defined. Its just a glitch with my versions, but thank you for your
answer.
What I ended up doing is changing the second bean:define / to:
% lastClientName =
String.valueOf(((mypackage.dataBeans.Survey)widget
List' [EMAIL PROTECTED]
Sent: Wednesday, November 03, 2004 1:06 PM
Subject: RE: Need an alternative to bean:define
Thanks Matt, but I think my problem is that I'm using Struts 1.1 (and
can't
change it)
According to: http://struts.apache.org/userGuide/struts-bean.html#define
You can't re-define
My brain has stopped working. I need an alternative to bean:define.
What I'm TRYING to do is iterate through a list, displaying a certain bit of
code only when its different than the last iteration (grouping).
Here's a snip:
bean:define id=lastClientName value
bean:define to this but its not picking the value. Can some one give me
some input on what is wrong here..
JSP code:
logic:equal name=member property=accessLevel value=1
bean:define id=exportIndex value=true/
/logic:equal
logic:notEqual name=member property
. I am using display:table from DisplayTag. I am using
bean:define to this but its not picking the value. Can some one give me
some input on what is wrong here..
JSP code:
logic:equal name=member property=accessLevel value=1
bean:define id=exportIndex value=true
-Original Message-
From: Shabada, Gnaneshwer [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 21, 2004 5:36 PM
To: '[EMAIL PROTECTED]'
Subject: FW: bean:define tag
Sorry for the repeat post. Can someone give me some input?
Hello,
In my application, I am trying to set a exportIndex
Hi,
I am using bean:define tag to define a conditional attribute to use it
somewhere else. So when I am using this id that variable is expecting an
int value. I have my tag as below.
bean:define id=sortIndex value=1
type=java.lang.Integer
on the page.
But because the pager tag hasn't el capabilities i had to use the define
tag like:
bean:define id=pageItems name=optionsForm property=pageItems
type=java.lang.Integer/
pg:pager
maxPageItems=%=pageItems.intValue()%
//items
/pg:pager
In the el way it should be like:
c:set
bean:define creates a scoped attribute AND a scripting variable, whereas
c:set just created the scoped attribute. In your example you are making
use of the scripting variable feature (as the data is already available as a
scoped attribute).
But, with JSP2, all tags magically become EL aware (I
capabilities i had to use the define
tag like:
bean:define id=pageItems name=optionsForm property=pageItems
type=java.lang.Integer/
pg:pager
maxPageItems=%=pageItems.intValue()%
//items
/pg:pager
In the el way it should be like:
c:set var=pageItems value=${optionsForm.pageItems
[mailto:[EMAIL PROTECTED]
Verzonden: donderdag 29 juli 2004 18:25
Aan: Struts Users Mailing List
Onderwerp: Re: bean:define vs c:set
You are correct that c:set does not create a scripting variable, so
you can't use the specified identifier in a scriptlet. The question,
though, is why are you still
66 matches
Mail list logo