> I have a database with ISO 3166 country
> names and codes that I use to populate an html:select. There
> is one country in the list that contains a non-ascii
> character and I want to make sure it shows up properly. That
> country is listed in HTML as ÅLAND ISLANDS
>
> I have two questions re
I did something similar. I extended each struts HTML tag
to take a rule and evaluate it in doStartTag.
It then returns SKIP_BODY to hide it or
super.doStartTag() to show it. Similarly doEndTag()
returns EVAL_PAGE to hide it or super.doEndTag()
to show it. I actually have 3 security levels and
I
In the JSP below, <%=p1%> will expand the way I expect.
But <%=p2> does not. Does anyone know why and how to
fix it? Using HTML-EL is not a good option because my
real case uses custom tags that extend the HTML taglib.
<%@ taglib uri="struts-html" prefix="html" %>
<% String foobar = "FooBar",
See
http://www.systemmobile.com/articles/strutsMessageResources.html
> Does anybody know of a way to define more than one default
> message resources in struts 1.1.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional co
I want to iterate over a list where each object in the
list is a map, and print values from the map. The problem,
of course, is Map is not a bean - no getters and setters.
Do I have to wrap each map in a bean, or is there a
more clever approach.
(I am pretty much stuck with list:iterate, not c:fo
Or replacing all newlines with "".
Either should work, but might look nicer.
This is not a struts issue ... just a basic
fact of how HTML works.
- Dan
> -Original Message-
> From: Hien Q Nguyen [mailto:[EMAIL PROTECTED]
> Sent: Saturday, January 24, 2004 4:30 PM
> To: Struts Users Mailin
iling List'
> Subject: RE: bean:write and apostrophes
>
>
> 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
>
> -Origi
If I use
to write out the value "Dan's Test" I get "Dan's".
But this is giving me problems with Javascript.
THIS FAILS:
Dan's Test
BUT THIS WORKS:
Dan's Test
But I don't know how to get the second form.
I can reverse the single quotes and double quotes
in javascript - then it works for the tes
See http://www.systemmobile.com/articles/strutsMessageResources.html
In an Actions you can get the resource bundle like
getResources(HttpServletRequest request)
Inside taglib code you can do
RequestUtils.message(pageContext, bundle, locale, key);
- Dan
> -Original Message-
> From: AMI
Maybe you want a beautifier rtaher than an editor?
Like tidy: http://tidy.sourceforge.net/
It works for HTML and XML. I haven't tried
using it for JSPs but I see some mention of
it in the discussion group.
- Dan
> -Original Message-
> From: dirk [mailto:[EMAIL PROTECTED]
> Sent: Thursday,
I would suggest you extend PropertyMessageResources.
Overide constructor so that returnNull=true always.
Override getMessage to call super.getMessage(),
check for null, if null return key.
Very simple. You probably have to extend the factory too.
- Dan
> -Original Message-
> From: Brian
> Would someone show me a very simple example of the use of an
> html:select tag? I did not understand its use.
>
> I'd appreciate any simple example.
The select tag can contain a list of option tags, or an options or
optionsCollection tag or any combination. Here I use 1 option tag to
<%
LabelValueBean[] lvArray = new LabelValueBean[] {
new LabelValueBean("label1", "value1"),
new LabelValueBean("label2", "value2"),
new LabelValueBean("label3", "value3"),
new LabelValueBean("label4", "value4") };
request.setAttribute("lvArray", lvArray);
%>
Or you can override the form value like this
If the value you set doesn't exist then nothing will
be selected. Which means the first item will be
selected, because something always is (if we are talking
about a dropdown and not a multiselect). But you can
always add a blank first item like this
If I am understanding correctly you just want
which will pull the value from the "name" property of the bean.
If you specify a value in the tag it oiverrides what is in
the bean.
- Dan
> I want to use an update user details page in my application
> which uses a
> form to display the current user
Try java.sql.Timestamp.
RTFM for the differences between Date, Time, and Timestamp.
- Dan
> -Original Message-
> From: Raj Yadav [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 19, 2003 3:42 PM
> To: [EMAIL PROTECTED]
> Subject: [OT] Date Problem
>
>
> Hi All,
>
> I have date
I agree. I think it would be bizarre and confusing to the user
to try and select many things from a dropdown. Nobody does this.
Maybe you want to use a popup (DHTML or separate window) if
you really need to save real estate. Otherwise use a
multiselect with multiple lines.
- Dan
> From a GUI
In the setDescription pass a string which includes both
code and description call.
Or if you don't want to change that object
just create a list of LabelValueBean objects
which has the right content.
or use
TEXT TO BE DISPLAYED HERE
...
...
- Dan
> Wit,
>
> My baseAbstractVO
There are 2 ways, and I did both, just to be anal
and because I didn't know which was best.
FormTag form = (FormTag) pageContext.
getAttribute(Constants.FORM_KEY, PageContext.REQUEST_SCOPE);
if (form == null)
form = (FormTag) findAncestorWithClass(this, FormTag.class);
if (form
Struts has a class called RequestUtils and you can call
RequestUtils.message(pageContext, bundle, locale, key);
But maybe you should be creating your array in the Action
and passing storing it in the Form for the JSP to grab.
Then you can get messages in an action like this:
// default bundle
>
> String str = new String(LogonAction.class.getName());
>
This is completely off-topic, but using
new String(String)
is almost always wasteful. Strings are
immutable, so there is no need to copy them.
- Dan
-
T
Use one tag followed by the
tag.
- Dan
> -Original Message-
> From: Frank Schaare [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 24, 2003 3:15 AM
>
> Hallo,
>
> i´ve made a select from an optionsCollection Tag. The values are read
> from a hashmap like
> value1 = one
> value2 = t
If I understand your question you are just looking for
- Dan
> I put the bean on the method execute on myAction
>
> ArrayList formatosArquivos = new ArrayList();
>
> formatosArquivos.add("CSV");
>
> formatosArquivos.add("XML");
>
> formatosArquivos.add("Algorithmics");
>
> ProdutoView pr
(this is really a taglib question, not struts,
so my apology for being off-topic)
I am designing a security tag which shows or
nukes its body depending on the user.
I got it to work, although I have a question
as to why the simplier code didn't work.
I am just learning and I want to understand.
Do this
[^\\/?] (one char)
[^\\/?]* (zero or more chars)
Also if in a java string don't forget to escape
the backslashes again like
"[^/?]*"
- Dan
> From: Saul Q Yuan [mailto:[EMAIL PROTECTED]
>
> Try this,
>
> ^[\\|\/|\?]
>
> or (^[\\|\/|\?])* for 0 or more matches
>
> From: Kevin W
I am wanting to do some special logging
of MessageResource requests based on what
page the user makes the request from.
I looked at subclassing MessageResources
and MessageResourcesFactory - but it looks like
that won't work because in the MessageResources
class you don't have a way to access Page
26 matches
Mail list logo