You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ryangr <gr...@gmail.com> on 2009/03/20 21:51:44 UTC

TextProvider issue upgrading from 2.0.14 to 2.1.6

I have a subtoolbar with 6 options on it with the labels being pulled in from
a message resource bundle. Each subtoolbar is defined like this
(substituting Location/locations for each of the other categories):

<li> <s:url action= " class="active"> ../../images/icons/drive.png <s:text
name="%{getText('label.title.locations')}" /> </li>

If you click on 3 of the 6 items to go to that respective section, something
messes up with the TextProvider. For example, if you click "Locations" it
takes you to the Locations page, but the subtoolbar option does not display
"Locations" anymore, but rather the .toString() representation of all of the
Location objects (in this case it looks like:
"[Location["90795bb4-a00a-441a-8e7f-5d7ad9795382","Test","C:\Test","SERVER","1"]]")

The log contains: 

2009-03-20 15:39:51,212 (CommonsLogger.java:45) WARN 
org.apache.struts2.util.TextProviderHelper  - The first TextProvider in the
ValueStack (com.rjssoft.webdocs.admin.LocationAction) could not locate the
message resource with key 'Locations'
2009-03-20 15:39:51,212 (CommonsLogger.java:45) WARN 
org.apache.struts2.util.TextProviderHelper  - The default value expression
'Locations' evaluated to
'[Location["90795bb4-a00a-441a-8e7f-5d7ad9795382","Test","C:\Test","SERVER","1"]]'

The only search results on this error point to the 2.0.x -> 2.1.x migration
guide where it just explains to have the logger ignore warning-level
messages. I can't do that in this case because it is changing the "button"
label from "Locations" to
"[Location["90795bb4-a00a-441a-8e7f-5d7ad9795382","Test","C:\Test","SERVER","1"]]"
and destroying the look of the button.

This only happens on 3 of the pages and messages are loaded from the
resource bundle all over the place, and all of them worked in Struts 2.0.14.

What on earth is going on here? Everything else in my application works
perfectly fine with 2.1.6 rather than 2.0.14.

Ryan
-- 
View this message in context: http://www.nabble.com/TextProvider-issue-upgrading-from-2.0.14-to-2.1.6-tp22628594p22628594.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: TextProvider issue upgrading from 2.0.14 to 2.1.6

Posted by ryangr <gr...@gmail.com>.
Anyone?


ryangr wrote:
> 
> Apparently the code sample of the button got messed up...the actual code
> can be seen here: http://pastie.org/422358
> 

-- 
View this message in context: http://www.nabble.com/TextProvider-issue-upgrading-from-2.0.14-to-2.1.6-tp22628594p22660388.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: TextProvider issue upgrading from 2.0.14 to 2.1.6

Posted by ryangr <gr...@gmail.com>.
Apparently the code sample of the button got messed up...the actual code can
be seen here: http://pastie.org/422358
-- 
View this message in context: http://www.nabble.com/TextProvider-issue-upgrading-from-2.0.14-to-2.1.6-tp22628594p22628675.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org