Here's my ugly hack of the week to get the functionality I'm looking
for. Try not to cringe. ;-)
Index:
src/java/org/apache/tapestry/services/impl/ComponentMessagesSourceImpl.java
===================================================================
--- src/java/org/apache/tapestry/services/impl/ComponentMessagesSourceImpl.java
(revision
390321)
+++ src/java/org/apache/tapestry/services/impl/ComponentMessagesSourceImpl.java
(working
copy)
@@ -225,7 +224,9 @@
List result = new ArrayList();
String baseName = extractBaseName(resource);
-
+ // MR: Hack to override default location of global properties file
+ if (baseName.equals("tapestry")) baseName =
"classes/ApplicationResources";
+
LocalizedNameGenerator g = new
LocalizedNameGenerator(baseName, locale, SUFFIX);
while (g.more())
On 3/30/06, Matt Raible <[EMAIL PROTECTED]> wrote:
> Is there a way to wire up a ResourceBundle with Hivemind? Since I
> have a getText() method in my BasePage that talks to getMessages(), I
> can easily replace it with a ResourceBundle. I can wire one up with
> Spring, but I'd prefer to use the "Tapestry way" if one exists.
>
> <bean id="messageSource"
> class="org.springframework.context.support.ResourceBundleMessageSource">
> <property name="basename" value="ApplicationResources"/>
> </bean>
>
> Matt
>
> On 3/30/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
> > The top one I can do, the bottom one isn't non trivial at all. I'd have to
> > re-factor ~all~ of the specification stuff to get it in in non-hacky
> > form...Since that area is so delicate I can't find a reasonable way to add
> > it in without doing a refactor.
> >
> >
> > On 3/30/06, Matt Raible <[EMAIL PROTECTED]> wrote:
> > > On 3/30/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
> > > > Hmm...On second thought, I'm not sure if this feature is in the current
> > 4.0
> > > > release or not...But since we're releasing 4.0.1/3.0.4 tonight it won't
> > > > matter anyways.
> > >
> > > Is it possible to get this patch fixed as part of 4.0.1?
> > >
> > > http://issues.apache.org/jira/browse/TAPESTRY-234
> > >
> > > The wrong patch was committed when it was marked fixed. ;-) I
> > > uploaded a new one that fixes the problem.
> > >
> > > Also, you mentioned that it would be possible to change the location
> > > of the global i18n file in 4.0.1? I'm guessing that won't be going
> > > in?
> > >
> > > http://issues.apache.org/jira/browse/TAPESTRY-881
> > >
> > > I'd like to fix this for my own needs - can you point me to the files
> > > I need to modify to add this functionality?
> > >
> > > Thanks for all the help today - you guys have been great.
> > >
> > > Matt
> > >
> >
> >
> >
> > --
> >
> > Jesse Kuhnert
> > Tacos/Tapestry, team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind. http://opennotion.com
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]