Ref : msg71420
Hi,
I suppose the proble is very simple,
just add the following things to the web.xml and struts-config.xml
In Web.xml
init-param
param-nameapplication/param-name
param-valuecom.xyz.ApplicationResources/param-value
/init-param
add the above entry below
Hello Marco,
maybe this will help (using struts-el):
bean-el:message key='prompt.productType.${product.productType}'/
Dima.
Thursday, March 25, 2004, 6:02:54 PM, you wrote:
MM Hi all,
MM I was wondering if anyone of you have a solution
MM For this dilemma.
MM I have a collectin of
Hi all,
I was wondering if anyone of you have a solution
For this dilemma.
I have a collectin of product DTOs to show on my jsp. One of
DTO's property is, let's say, the type, which is listed in number.
(let's say, 10 or 20).
ON the DTO I will have the value 10,20 ecc but on the jsp I
Something like
bean:define id=type
bean:write name=product property=productType
/bean:define
bean:message key=%='prompt.productType.' + type%/
Paul
-Original Message-
From: Marco Mistroni [mailto:[EMAIL PROTECTED]
Sent: 25 March 2004 16:03
To: 'Struts Users Mailing List
Marco, can you use bean:define and a scriptlet code
inside bean:message ? Something like :
bean:define id=suffix name=product
property=productType/
bean:message
key='%=prompt.productType.+suffix%'/
--- Marco Mistroni [EMAIL PROTECTED]
escreveu: Hi all,
I was wondering if anyone of you
Hi,
In my logic:iterate tag, I want to pull out the value of the bean:write tag.
I am using following syntax.
something is probably wrong, as i am getting a compile error.
looking for right syntax
basically all i want to to is pull out the value of the bean:write tag.
Thanks
this in
the JavaBean specification.
robert
-Original Message-
From: as as [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 21, 2004 12:47 PM
To: Struts Users Mailing List
Subject: Bean:write
Hi,
In my logic:iterate tag, I want to pull out the value of the bean:write tag.
I am using
getting a error make sure you are
using proper JavaBean naming conventions. You can find this in
the JavaBean specification.
robert
-Original Message-
From: as as [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 21, 2004 12:47 PM
To: Struts Users Mailing List
Subject: Bean:write
Hi
a onclick='returnData(bean:write name=xloc property=script /)'
bean:write name=xloc property=locCode/
/a
this a tag should output something like this
onclick = 'returnData(y-2342,234,home office, 10230 your street, nj,
union, 02932, 12fl)
but instead it does this
onclick = 'returnData
use jsp:getProperty instead.
Adriano.
-Mensagem original-
De: sean [mailto:[EMAIL PROTECTED]
Enviada em: Wednesday, March 03, 2004 3:55 PM
Para: [EMAIL PROTECTED]
Assunto: bean:write problem
a onclick='returnData(bean:write name=xloc property=script /)'
bean:write name=xloc
sean sean.jones at ubs.com writes:
a onclick='returnData(bean:write name=xloc property=script /)'
bean:write name=xloc property=locCode/
/a
bean:write name=obj property=getter filter = true/
adding the filter=true did the trick
If I use bean:write to display a bean property comments which happens
to be a long line of text. Is there a way to enforce wrapping with
bean:write so the long comments can be displayed as a paragraph?
Thanks!
-
To unsubscribe
to keep the text width a certain size you can also inline style
with
p style=width: 200px;comments here/p
HTH
--
Tim Coy
If I use bean:write to display a bean property comments which happens
to be a long line of text. Is there a way to enforce wrapping with
bean:write so the long comments
Well the following fixed it:
bean:write name=reportForm property=totalInventory/
The problem was the case in the reportForm. The form bean was named
ReportForm and I did not realize the case was changed when set in the
session.
I used the following snippet of code to help in the debugging (I
html:text works differently I think. It looks up the bean on the enclosing
html:form tag from the action mapping. So in all possiblity your
html:text bean:write are fetching from different scopes.
also try
bean:write name='total' scope='session' property='totalInventory' /
and this probably
I added the following tag:
logic:notPresent name='total' property='totalInventory'
Not present
/logic:notPresent
And I DO get the 'Not present' text. I am still confused; why then does the
html:text tag work?
Sorry for the posting to myself, but I am hoping for someone to pick up
named 'totalInventory' on that form bean, and
render the value.
but if I put the following:
bean:write name='total' property='totalInventory'/
This means Go find the bean (form bean or otherwise) named 'total', then
look up the property named 'totalInventory' on that form bean, and render
Tried both cases - no joy.
Also tried wrapping the bean:write... tag
in logic:present tag:
logic:present name='total' property='totalInventory'
bean:write name='total' property='totalInventory' ignore='false'/
/logic:present
while setting the ignore to 'false'. The page renders
both these tags are accessing the same bean.
-jayash
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 26, 2004 1:53 PM
To: [EMAIL PROTECTED]
Subject: html:text works, bean:write fails
I have a situation where I have not found a solution
in the JSP
page, it works just fine (other than I don't want a text input field):
html:text property='totalInventory' size='20'/
but if I put the following:
bean:write name='total' property='totalInventory'/
it won't render the JSP page (just blank), unless I put ignore='true', in
which case
Hi folks,
I'm trying to set up a database system. My current problem is that some
struts tags do not seem to behave as they should. I have a class
-- CountryMainForm.java ---
public class CountryMainForm extends ActionForm() {
String mode = ;
public String getMode() { return mode ;
Thank you very much
Bean:define solved the problem
-Original Message-
From: Nicolas De Loof [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 29, 2004 3:45 PM
To: Struts Users Mailing List
Subject: Re: Using bean:write as a tag's value atrribute
bean:define id=value name
I haven't been able to confirm this first hand, but one of my team members
(who is not on this list) is trying to do a bean:write.
The problem is that sometimes, the bean that is being displayed is null. My
question is what is the proper way to handle this?
We tried to play with the ignore
Greg: you could alternatively use the JSTL Core tags, if the bean is null it
doesn't write anything I believe. The format is c:out
value=${yourbean}/
otherwise if you really want to use bean:write you could enclose it in a
logic:notEmpty name=mybean property=bean property/logic:notEmpty or
just
On Jan 30, 2004, David Erickson [EMAIL PROTECTED] wrote:
|Greg: you could alternatively use the JSTL Core tags, if the bean is null it
|doesn't write anything I believe. The format is c:out
|value=${yourbean}/
|
|otherwise if you really want to use bean:write you could enclose
What type of formatting are you looking to do?
-David
- Original Message -
From: Gregory F. March [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, January 30, 2004 1:42 PM
Subject: Re: bean:write
On Jan 30, 2004, David Erickson [EMAIL PROTECTED] wrote
On Jan 30, 2004, David Erickson [EMAIL PROTECTED] wrote:
|What type of formatting are you looking to do?
We are formatting dates, currency, and numbers.
I think we will extend the bean:write in a custom tag and just check for null
ourselves - very minimal code change this way (which
[EMAIL PROTECTED]
Sent: Friday, January 30, 2004 2:54 PM
Subject: Re: bean:write
On Jan 30, 2004, David Erickson [EMAIL PROTECTED] wrote:
|What type of formatting are you looking to do?
We are formatting dates, currency, and numbers.
I think we will extend the bean:write in a custom tag
Dear All;
Using bean:write name=myBeanName property=its property works properly
in my jsp page body. But when I want to use it in a tag to fill its
attribute, it fails.
Actually I don't know the syntax of using bean:write, obviously the below
way is wrong:
someTag value=bean:write name
'
-- Betreff: Using bean:write as a tag's value atrribute
--
--
--
-- Dear All;
--
-- Using bean:write name=myBeanName property=its
-- property works properly
-- in my jsp page body. But when I want to use it in a tag to fill its
-- attribute, it fails.
-- Actually I don't know the syntax
This is fine as long as the tag you're using the bean:write.../ is not
another custom tag e.g. html:.../ or logic:.../ etc. It is done like
this:
input type=submit value=bean:write name=FormName
property=Property/ / - make sure you include '/' at the end of the bean
tag.
If you want to use
bean:define id=value name=myBeanName property=its property
someTag value=%= value %
Nico.
Dear All;
Using bean:write name=myBeanName property=its property works properly
in my jsp page body. But when I want to use it in a tag to fill its
attribute, it fails.
Actually I don't know
Dear Sir / Madam,Thank you for writing to [EMAIL PROTECTED] We confirm receipt of your
mail and assure you of a response shortly.To help us serve you better, we would
request you to kindly mention your account number or any reference number you may have
in your future correspondence. Kindly
Dear Sir / Madam,Thank you for writing to [EMAIL PROTECTED] We confirm receipt of your
mail and assure you of a response shortly.To help us serve you better, we would
request you to kindly mention your account number or any reference number you may have
in your future correspondence. Kindly
Dear Sir / Madam,Thank you for writing to [EMAIL PROTECTED] We confirm receipt of your
mail and assure you of a response shortly.To help us serve you better, we would
request you to kindly mention your account number or any reference number you may have
in your future correspondence. Kindly
List
Subject: Re: bean:write question
how about wrapping your content inside the PRE/PRE tag?
On Jan 24, 2004, at 11:37 AM, Allen Jordan wrote:
Hello all,
I am trying to display a file name and the contents of the file in a
jsp. My formbean object contains 2 Strings (filename
Hello all,
I am trying to display a file name and the contents of the file in a
jsp. My formbean object contains 2 Strings (filename and contents).
The problem I am having is the file contents are displayed in one
continues string, without line breaks. Is there anyway to do this
without using
how about wrapping your content inside the PRE/PRE tag?
On Jan 24, 2004, at 11:37 AM, Allen Jordan wrote:
Hello all,
I am trying to display a file name and the contents of the file in a
jsp. My formbean object contains 2 Strings (filename and contents).
The problem I am having is the file
If I use bean:write ... filter=true
to write out the value Dan's Test I get Dan#39;s.
But this is giving me problems with Javascript.
THIS FAILS:
a href=javascript:alert('Dan#39;s Test')Dan#39;s Test/a
BUT THIS WORKS:
a href=javascript:alert('Dan\'s Test')Dan#39;s Test/a
But I don't know how
Dan,
Try using the filter=false attribute of the bean:write tag. That will
disable the encoding of characters that are sensitive to HTML.
-Richard
-Original Message-
From: Daniel Lipofsky [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 22, 2004 4:18 PM
To: [EMAIL PROTECTED]
Subject
to the Javascript method, which
causes a Javascript exception.
Thanks,
Dan
-Original Message-
From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 22, 2004 4:39 PM
To: 'Struts Users Mailing List'
Subject: RE: bean:write and apostrophes
Dan,
Try using
-Ursprüngliche Nachricht-
Von: Mark Nichols [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 19. Januar 2004 13:03
An: Struts Users Mailing List
Betreff: Re: bean:message WITH bean:write ?!?
Jimmy,
I would be interested in seeing your extension of the bean:message tag.
Thanks,
Mark
--
Science is what we
Hi all,
In my HashMap (which defines the form) I save something like that:
setField(username, oliver); Know I want to the output of the message
to be dynamic.
For a static version this works fine:
bean:message key=form.username/
For a dynamic version I think I need some thing like that:
if you are interested in the code. Its just a quick hack of the struts
code.
Greetings
Jimmy
-Original Message-
From: Oliver Thiel [mailto:[EMAIL PROTECTED]
Sent: maandag 19 januari 2004 9:14
To: [EMAIL PROTECTED]
Subject: bean:message WITH bean:write ?!?
Hi all,
In my HashMap (which
just a quick hack
of the struts code.
Greetings
Jimmy
-Original Message-
From: Oliver Thiel [mailto:[EMAIL PROTECTED]
Sent: maandag 19 januari 2004 9:14
To: [EMAIL PROTECTED]
Subject: bean:message WITH bean:write ?!?
Hi all,
In my HashMap (which defines the form) I save something like
Here you go.
-Original Message-
From: Mark Nichols [mailto:[EMAIL PROTECTED]
Sent: maandag 19 januari 2004 13:03
To: Struts Users Mailing List
Subject: Re: bean:message WITH bean:write ?!?
Jimmy,
I would be interested in seeing your extension of the bean:message tag.
Thanks,
Mark
Hi Jimmy,
Of course I'm interested in seeing your extension of the bean:message
tag!
Thanks
Oliver
-Ursprüngliche Nachricht-
Von: Mark Nichols [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 19. Januar 2004 13:03
An: Struts Users Mailing List
Betreff: Re: bean:message WITH bean:write
I've already send the source file to the user list.
Enjoy!
-Original Message-
From: Oliver Thiel [mailto:[EMAIL PROTECTED]
Sent: maandag 19 januari 2004 13:37
To: 'Struts Users Mailing List'
Subject: AW: bean:message WITH bean:write ?!?
Hi Jimmy,
Of course I'm interested in seeing
To: Struts Users Mailing List
Subject: RE: bean:message WITH bean:write ?!?
I've already send the source file to the user list.
Enjoy!
-Original Message-
From: Oliver Thiel [mailto:[EMAIL PROTECTED]
Sent: maandag 19 januari 2004 13:37
To: 'Struts Users Mailing List'
Subject: AW: bean:message
Hi,
Is there an elegant way to get the bean:write tag to encode space
to nbsp; ?
I tried setting the attribute filter=true but it doesn't encode space
to nbsp;
I need to get this working, as consecutive spaces will be collapsed
into one in HTML and I need to ensure that doesn't happen
Hi,
Is there an elegant way to get the bean:write tag to encode space
to nbsp; ?
I tried setting the attribute filter=true but it doesn't encode space
to nbsp;
I need to get this working, as consecutive spaces will be collapsed
into one in HTML and I need to ensure that doesn't happen
Good Morning All,
I am trying to complete the following code:
logic:greaterThan name=FSCalcOutputForm
property=foodstampAllotmentUnformatted value=0
bean:message key=fs.calc.result.eligible arg0=bean:write
name=FSCalcOutputForm property=foodstampAllotment/ /
/logic:greaterThan
logic:equal
Hello,
I want to write a string like line1brline2.
If I use bean:write name=myForm property=myProperty/, I will get
line1lt;brgtline2.
If I use bean:write name=myForm property=myProperty filter=false/, I will get
line1brline2.
But I want to write:
line1
line2
How can I do
bean:write name=myForm property=myProperty/, I will get
line1lt;brgtline2.
If I use bean:write name=myForm property=myProperty
filter=false/, I will get line1brline2.
But I want to write:
line1
line2
How can I do this with struts?
Regards,
Frank
does it work with br/ instead of br
because I have things working exactly as you would have with ...
bean:write name=myForm property=myProperty filter=false/
filter=false does the trick for me - only difference is my line breaks are
br/ instead of br
not sure if that changes things for you
.
On 14 Jan 2004, at 14:30, Otto, Frank wrote:
Hello,
I want to write a string like line1brline2.
If I use bean:write name=myForm property=myProperty/, I will get
line1lt;brgtline2.
If I use bean:write name=myForm property=myProperty
filter=false/, I will get line1brline2
want to write a string like line1brline2.
If I use bean:write name=myForm property=myProperty/, I will
get
line1lt;brgtline2.
If I use bean:write name=myForm property=myProperty
filter=false/, I will get line1brline2.
But I want to write:
line1
line2
How can I do this with struts?
Regards
!!!
Regards,
Frank
-Ursprüngliche Nachricht-
Von: Kris Schneider [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 14. Januar 2004 15:58
An: Struts Users Mailing List
Betreff: Re: bean:write
The delims attribute of c:forTokens works just like the delim argument to
a StringTokenizer constructor
Anybody knows how can I show I CNPJ in this format (33.435.231/0001-27) ???
I my bean I just have number (33435231000127)
So I have to show with . and /
There are a way to put something in the resource bundle??? What??
[]´s
Mauricio
Anybody knows how can I show I CNPJ in this format (33.435.231/0001-27) ???
I my bean I just have number (33435231000127)
So I have to show with . and /
There are a way to put something in the resource bundle??? What??
[]´s
Mauricio
Ah, ha! I am an idiot. I think this has to do with the format tag in
bean:write. Could someone tell me how to set this up?
I think you can put the formats into the application properties file,
correct?
Does someone have an example of what to put in?
thanks,
Brian
From: Brian Styles [EMAIL
in
bean:write. Could someone tell me how to set this up?
I think you can put the formats into the application properties file,
correct?
Does someone have an example of what to put in?
thanks,
Brian
From: Brian Styles [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED
PROTECTED]
Subject: Re: format tag in bean:write - was :RE: Handling Missing Message
Key
Date: Thu, 8 Jan 2004 08:35:14 -0500
Use the formatKey attribute if you want to pull it from message resources.
Have
a look at java.text.DecimalFormat for an explanation of formatting patterns
for
decimal numbers
just copy into the resource bundle?
From: Kris Schneider [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: format tag in bean:write - was :RE: Handling Missing Message
Key
Date: Thu, 8 Jan 2004 08:35:14
thanks again for all your help on this Kris!
Invaluable!
From: Kris Schneider [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: format tag in bean:write - was :RE: Handling Missing Message
Key
Date: Thu, 8 Jan
Here's the bean:
public class Cart extends HashMap {
private double subTotal = 400.00;
public double getSubTotal(){return subTotal;}
}
Here's the Java:
session.setAttribute(cart, new Cart());
Here's the JSP
bean:write name=cart property=subTotal/ // no output?
%= ((csp.Cart
Here's the bean:
public class Cart extends HashMap {
private double subTotal = 400.00;
public double getSubTotal(){return subTotal;}
}
Here's the Java:
session.setAttribute(cart, new Cart());
Here's the JSP
bean:write name=cart property=subTotal/ // no output?
%= ((csp.Cart
Michael;
Did you forget to specify the taglib directive for bean:write tag library in
your JSP? In such case, have following in your JSP.
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
Hope this helps.
Sharad
From: Michael Marrotte [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED
%@ taglib uri=/tags/struts-bean prefix=bean %
is at the top of the JSP file and other bean:write tags are working in the
same page...
-Original Message-
From: Sharad Acharya [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 27, 2003 9:48 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED
Aren't tags usually in /WEB-INF?
On 27 Dec 2003, at 14:57, Michael Marrotte wrote:
%@ taglib uri=/tags/struts-bean prefix=bean %
is at the top of the JSP file and other bean:write tags are working
in the
same page...
-Original Message-
From: Sharad Acharya [mailto:[EMAIL PROTECTED
hi,
it must end with
.tld
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
and place the file in /WEB-INF
-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 27, 2003 3:52 PM
To: Struts Users Mailing List
Subject: Re: bean:write not writing
(even bean:write) as
advertised, except in this one case.
-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 27, 2003 9:52 AM
To: Struts Users Mailing List
Subject: Re: bean:write not writing?
Aren't tags usually in /WEB-INF?
On 27 Dec 2003, at 14:57
-Original Message-
From: Matthias Wessendorf [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 27, 2003 9:54 AM
To: 'Struts Users Mailing List'
Subject: RE: bean:write not writing?
hi,
it must end with
.tld
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
and place the file in /WEB-INF
Fair enough
The only other thing i can think of is to use jstl or old jsp tags
instead
or try using the scope attribute of bean:write
bean:write name=cart property=subTotal scope=session /
c:out value=${cart.subTotal} /
c:out value=${session.cart.subTotal} /
JSTL give better debug info even
I'm pretty sure this boils down to the way PropertyUtils works.
bean:write will use PropertyUtils.getProperty(bean, property) to
retrieve the subTotal property from the bean cart. PropertyUtils
will test whether or not cart is a Map (which it is) and then call
Map.get to retrieve the property
: Saturday, December 27, 2003 10:08 AM
To: Struts Users Mailing List
Subject: Re: bean:write not writing?
Fair enough
The only other thing i can think of is to use jstl or old jsp tags
instead
or try using the scope attribute of bean:write
bean:write name=cart property=subTotal scope=session /
c:out
yeah buddyneed the tld for 'c'
, declare the uri in the web.xml and the refer to that uri in ur jsp page.
-Original Message-
From: Michael Marrotte [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 27, 2003 10:24 AM
To: Struts Users Mailing List
Subject: RE: bean:write not writing
anything?
Do I need a taglib descriptor for c:out?
--Mike M.
-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 27, 2003 10:08 AM
To: Struts Users Mailing List
Subject: Re: bean:write not writing?
Fair enough
The only other thing i can think of is to use jstl
be
something like that:
logic:iterate id= keyAry name= keyAry
tr align=left
td
bean:message key=bean:write name= keyAry property= keyIndexed /
/
/td
/logic:iterate
Thanks
Oliver
What works so far:
IndexedFom.java
private String keyAry[] = { form.uid, form.email, form.password
List
Subject: Re: bean:write not writing?
I'm pretty sure this boils down to the way PropertyUtils works.
bean:write will use PropertyUtils.getProperty(bean, property) to
retrieve the subTotal property from the bean cart. PropertyUtils
will test whether or not cart is a Map (which
context.
Thanks,
--Mike M.
-Original Message-
From: Kris Schneider [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 27, 2003 10:13 AM
To: Struts Users Mailing List
Subject: Re: bean:write not writing?
I'm pretty sure this boils down to the way PropertyUtils works.
bean:write will use
be
something like that:
logic:iterate id= keyAry name= keyAry
tr align=left
td
bean:message key=bean:write name= keyAry property= keyIndexed /
/
/td
/logic:iterate
Thanks
Oliver
What works so far:
IndexedFom.java
private String keyAry[] = { form.uid, form.email, form.password,
form.conf_pwd
;
public double getSubTotal(){return subTotal;}
public void setSubTotal(double dbl){subTotal=dbl;}
}
This could be the problem because the bean:write would expect a bean,
but the %...% is just accessing an object's method.
Also the way to access maps in struts is object(value) eg bean:write
name
(double dbl){subTotal=dbl;}
}
This could be the problem because the bean:write would expect a bean,
but the %...% is just accessing an object's method.
Also the way to access maps in struts is object(value) eg bean:write
name=cart(abc)/
Which is roughly the same as c:out value=${cart.abc
Hi All,
I am trying to display the content to the front end user which contains some HTML TAGS.
say i have into the database bHI I am bold tag
when i am tryiong to display the data using
bean:write name=something property=something format=true/
OR
bean:write name=something property
u can try something like this :
bean:write name=something property=something filter=false/
Thanks,
Kulkarni
-Original Message-
From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 4:50 PM
To: Struts Users Mailing List
Subject: Bean:write \problem
Hi All
hi KulKarni
Thanks for it
It worked
Cheers
gary
- Original Message -
From: Ravi Kulkarni [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 4:54 PM
Subject: RE: Bean:write \problem
u can try something like this :
bean:write name
/struts-bean.tld prefix=bean %
%
pageContext.setAttribute(test1.int, new Integer(123));
pageContext.setAttribute(test1.string, This is a string);
%
bean:write name=test1.int/
bean:write name=test.string/
if i remove bean:write name=test1.int/ or change it to
bean:write name=test1.int
Many thanks you for the response,
makingworkString.replaceAll(\n, \nbr);
I have the br in the output. I mean the br tag is not
interpreted. Is there any way to be interpreted?
Surrounding with pre/pre I have line breaks as I want, but
the output have big width. A horizontal scroll
Hello guys,
I didn't found any from Struts solution for the my last mail (find below), but I
managed to correct it by adding a line in my Tiles layout file
META http-equiv=Content-Type content=text/html; charset=ISO-8859-1 /
Now I run into new problem that, the bean:write not understands
Hi all:
I insert a text with various line breaks , paragrapgs etc in the database. When i get
the text back to show in the html page I do it with bean:write tag.
The text mantain its format (line breaks, return carriage, end of line, etc) when I
show it in a text area
You need to replace newlines with brs:
workString.replaceAll(\n, \nbr);
Paul
-Original Message-
From: Mohamed Abu Zur [mailto:[EMAIL PROTECTED]
Sent: 07 November 2003 11:12
To: [EMAIL PROTECTED]
Subject: Line break and bean:write
Hi all:
I insert a text with various line
You need to replace newlines with brs:
workString.replaceAll(\n, \nbr);
Or surround it with pre /pre tags.
--
Wendy Smoak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
/
bean:write
name=GetMostRecentNews
filter=false/
/td
/tr
...
All my pages use the UTF-8 charset thus I use
the
following at the start of every jsp page:
%@ page contentType=text/html;
charset=UTF-8 %
%@ taglib uri=/WEB-INF/struts-bean.tld
contains a table with the
following
row:
...
tr
td
bean:include
id=GetMostRecentNews
page=/getmostrecentnews.do/
bean:write
name=GetMostRecentNews
filter=false/
/td
/tr
...
All my pages use the UTF-8 charset thus I use
/
bean:write
name=GetMostRecentNews
filter=false/
/td
/tr
...
All my pages use the UTF-8 charset thus I use the
following at the start of every jsp page:
%@ page contentType=text/html; charset=UTF-8 %
%@ taglib uri=/WEB-INF/struts-bean.tld
prefix
to
keep it simple).
So my topical.jsp contains a table with the
following
row:
...
tr
td
bean:include
id=GetMostRecentNews
page=/getmostrecentnews.do/
bean:write
name=GetMostRecentNews
filter=false
=/getmostrecentnews.do/
bean:write name=GetMostRecentNews
filter=false/
/td
/tr
...
All my pages use the UTF-8 charset thus I use the
following at the start of every jsp page:
%@ page contentType=text/html; charset=UTF-8 %
%@ taglib uri=/WEB-INF/struts-bean.tld
prefix=bean%
... plus other
the various
pages together (I haven't tried Tiles yet, I want to
keep it simple).
So my topical.jsp contains a table with the following
row:
...
tr
td
bean:include id=GetMostRecentNews
page=/getmostrecentnews.do/
bean:write name=GetMostRecentNews
style=height: 70; width: 200; border: 1px solid black; overflow: auto;
bean:write name=hit property=comment/
/div
Is there something special about the way text is stored in a bean property?
-thanks
/Lars Hammer
http://www.dezide.com
1 - 100 of 529 matches
Mail list logo