Regression from WW-3810? NPE in UrlSet.includeClassesUrl(UrlSet.java:199)

2012-06-08 Thread struts . rgm
Like I said a couple of days ago, this doesn't actually seem to hurt anything, but I thought that Ɓukasz might want to have a look at this exception. Has anyone else seen this with 2.3.4 or newer snapshots? -rgm On Jun 6, 2012, at 2:23 PM, struts@spamgourmet.com wrote: > Running Struts 2.3

NPE at at xwork2.util.finder.UrlSet.includeClassesUrl(UrlSet.java:199)

2012-06-06 Thread struts . rgm
Running Struts 2.3.4 build #481 on JBoss 5 I'm getting the following NullPointerException on startup. It seems benign, and happens with devMode either true or false. 2012-06-06 12:50:18,539 INFO [com.opensymphony.xwork2.config.impl.DefaultConfiguration] (HDScanner) Overriding property struts

Re: Dynamic Attributes can't be boolean? StrutsUtil.translateVariables exception

2012-05-25 Thread struts . rgm
Chris, Surrounding it with quotes would mean that I'd have to change all my UI templates, as well as my theme templates. Note how my theme template expects a Boolean (not a String) attribute, below: > < <#if parameters.required?default(false)> > < required="true"<#rt/> > < From my perspec

Dynamic Attributes can't be boolean? StrutsUtil.translateVariables exception

2012-05-25 Thread struts . rgm
After installing Struts 2.3.4, it appears that dynamic attributes must be strings now? I've modified text.ftl in my custom theme like this (diff output): 23c23 < --- > 46,54d45 < <#if parameters.required?default(false)> < required="true"<#rt/> < < <#if parameters.autofocus?default(false)> <

Bug? 2.3.3 struts2-blank.war fails to deploy on JBoss 5

2012-05-07 Thread struts . rgm
I recently tried to upgrade our app from 2.3.1.2 to 2.3.3, but got an error in startup. To determine if it was "just me" I tried deploying the struts2-blank.war file in my JBoss 5.1 system, but got the attached error. It seems that the application cannot load "struts-default.xml" anymore. Th

Re: Fuzz testing and ognl.MethodFailedException - Freemarker results can't use integer types in compare operations?

2012-03-15 Thread struts . rgm
Replying to my own post after reading some source code. If you have additional advice to add, I'd love to hear it. I have now learned about the ConversionErrorInterceptor: http://struts.apache.org/2.0.14/docs/conversion-error-interceptor.html http://struts.apache.org/2.3.1.2/xwo

Fuzz testing and ognl.MethodFailedException - Freemarker results can't use integer types in compare operations?

2012-03-15 Thread struts . rgm
I've got accessor/mutators on my action for an integer ID parameter like this: NewUserAction { int _userGroupId = -1; // execute, validate, other methods setUserGroupId( int id ) { this._userGroupId = id; } getUserGroupId() { return _userGroupId; } } But when I

freemarker radio tag with map literals [solved, kind of]

2011-10-13 Thread struts . rgm
I'm having a hard time using the freemarker syntax radio tag. This works fine: <@s.radio name="cars" list=[ "ford", "toyota" ] /> But using a literal map does not: <@s.radio name="cars" list={ "ford" : "mustang", "toyota":"prius" } /> The web page renders: "freemarker.ext.beans.HashAdapter$1$1$

Example for optgroup doesn't work

2011-09-19 Thread struts . rgm
Regarding: http://struts.apache.org/2.2.3/struts2-core/apidocs/org/apache/struts2/components/OptGroup.html and http://struts.apache.org/2.2.3.1/docs/optgroup.html The example given at the bottom, when translated in to Freemarker tag syntax, doesn't work. Here's my FM version: <@s.select label=

Documentation: Checkbox "false" injection

2011-07-20 Thread struts . rgm
The "using checkboxes" page at http://struts.apache.org/2.2.3/docs/using-checkboxes.html says: The framework automatically tracks the checkboxes used by a form (so you don't have to). If a checkbox is missing, a default value for the checkbox (usually false) is injected. The checkbox

FieldErrors for a specific form ID

2011-07-19 Thread struts . rgm
After perusing the source code I don't feel like this is possible, but if y'all know otherwise please give me a heads-up even if just to confirm my suspicion. It appears that Struts2 does know the ID of the current form, but this information is not used for an xwork validation context -- which ap

Using string literals or references to objects in @s.url?

2011-07-12 Thread struts . rgm
Which of these is more correct when using Struts2 freemarker tag dynamic attributes for @s.url: <@s.url action="viewitem" itemid="${item.itemid?c}" /> or <@s.url action="viewitem" itemid=item.itemid /> I've been favoring the second example, since it doesn't require me to remembe

Documentation styles missing some classes?

2011-07-11 Thread struts . rgm
This could be intentional, but I believe the "space.css" style stylesheet lost the CSS class definition for ".tipMacro." This makes the docs look a little less nice in v2.2.3 than in v2.0.14. Compare the green package heirarchy tip boxes between: http://struts.apache.org/2.0.14/docs/loca

Re: Namespace sitemesh decorators? Namespace from freemarker result?

2011-07-05 Thread struts . rgm
Dear Roland-from-last-week, The normal ConfigDecoratorMapper does what you want. Since namespaces in Struts look like a "path" in the URL, you can simply apply a decorator to the pattern for the namespace. For example, in your decorators.xml, do: /yournamespace/* There is n

Namespace sitemesh decorators? Namespace from freemarker result?

2011-06-28 Thread struts . rgm
I have two namespaces, "admin" and " (the default namespace). I'd like to re-use the same result template for both, but decorate them differently. My templates declare their decorator using the meta tag, like this: Then, in decorators.xml, I have defined: I'd like to generalize this to h

RedirectAction supports "anchor" param

2011-06-21 Thread struts . rgm
I've opened this minor documentation issue as: https://issues.apache.org/jira/browse/WW-3652 Affected files will be: src/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java (needs javadoc updates) -Roland

Re: optgroup supporting cssClass? or dynamicAttributes?

2011-06-20 Thread struts . rgm
https://issues.apache.org/jira/browse/WW-3209 I wonder if I've just run into this unresolved issue. On Jun 20, 2011, at 5:37 PM, struts@spamgourmet.com wrote: > Is it possible for optgroup to support some of the attributes that other > UIBeans have, such as "cssClass" and "id" ? > > I crea

optgroup supporting cssClass? or dynamicAttributes?

2011-06-20 Thread struts . rgm
Is it possible for optgroup to support some of the attributes that other UIBeans have, such as "cssClass" and "id" ? I created my own theme and edited optgoup.ftl to check for parameters.cssClass??, but it appears that this is not enough. Perhaps some of the universal HTML attributes should be

Re: jsp caching problem

2011-06-13 Thread struts . rgm
For the browser-side issues, you might try using the "autocomplete="off"" attribute on the form tag. See: https://developer.mozilla.org/en/How_to_Turn_Off_Form_Autocompletion#How_to_Turn_Off_the_Autocompletion_Feature It may differ for Google Chrome and IE. -Roland On Jun 13, 2011, at 10:46 AM

Re: Custom TextProvider -- fall-back not working?

2011-06-08 Thread struts . rgm
Some more minor points on this issue, relating to the document at: http://struts.apache.org/2.2.3/xwork-core/apidocs/com/opensymphony/xwork2/TextProvider.html * "Implementing classes can delegate TextProviderSupport" -- clarifying the verb "delegate" or providing an example would be really useful

Custom TextProvider -- fall-back not working?

2011-06-08 Thread struts . rgm
This is a question that has come up before, but I've not seen it answered fully (I searched the list first!). Here's what I've got so far. Goals: Implement a custom resource provider that gets searched BEFORE the action-level, interface-level, or package-level ".properties" files, and gets its

Re: Hash tags

2011-06-01 Thread struts . rgm
Yes, I believe the document should be updated to add an anchor example. As Dave mentioned, I'll file a JIRA ticket for that. Explaining my other sentence, I saw that the extended class also supported the "location" and "parse" parameters in addition to "anchor." However, the constructor for the

Re: Hash tags

2011-06-01 Thread struts . rgm
I tried that first, but it yields "viewuser#userPreferences.action." I found the answer by diving into the source code. The key insight is that this is called an "anchor" (not a hash). This works: viewuser userPreferences This document should be updated: http://struts.apache.org/2.2.3/d

Hash tags

2011-06-01 Thread struts . rgm
Does the redirectAction result support a parameter or attribute defining a hash tag to append? For example, this: viewuser Might yield: /context/viewuser.action#userPreferences I don't see any such thing on the document: http://struts.apache.org/2.2.3/docs/redirect-action-result.html Tha

Localization for SiteMesh decorators

2011-01-28 Thread struts . rgm
This seems like a documentation bug. This page: http://struts.apache.org/2.2.1.1/docs/localization.html Says "Internationalizing SiteMesh decorators is possible, but there are quirks. See SiteMesh Plugin for more." Unfortunately, the link in the documentation is invalid. After using Google to f

Re: cssClass attribute with <@s.textfield> ignored when inputError happens

2010-12-13 Thread struts . rgm
I did try that -- but unless simple/text.ftl changes, there will *still* be an unwanted "class='inputError'" before my cssClass and cssErrorClass attributes are handled by css.ftl. Your example produces the following broken tag: It's closer -- but I believe that a change needs to be made in t

cssClass attribute with <@s.textfield> ignored when inputError happens

2010-12-13 Thread struts . rgm
When a validation error occurs with the css_xhtml theme, the CSS class for a form input does not have the correct class attributes, if a "cssClass" has been supplied. Instead of class "inputError" joining the existing "class" which is specified by the "cssClass" form tag attribute, two separat

Running external Javascript files through Struts/Freemarker -- access to ActionContext and ValueStack?

2010-11-12 Thread struts . rgm
I have an action and freemarker result that includes an external Javascript file. This javascript files needs to be able to use the getText() method. I figured I'd name it "util.js.ftl" so that accessing it directly caused the sitemesh-freemarker filter to catch it, but this throws a NullPoint