You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beehive.apache.org by fa...@gmail.com on 2006/10/11 14:06:46 UTC

beehive message resources problem, can I define a message resources factory class?

I have the following problem:


I implemented my web application with message resources
which are queried dinamically from a database. I use Struts
and my struts-config.xml contains the following row:

    <message-resources factory="com.myapp.MessageResourcesFactory" key="
org.apache.struts.action.MESSAGE" parameter=""/>

I implemented this factory class, and a class
which extends the org.apache.struts.util.MessageResources
class. This works fine. I can retrieve the message from database.

Now I'm trying to use Beehive and
can't find the annotation(s) for solving this problem!

Shall I edit the struts-config xmls manually?
This wouldn't be nice!:(

Thank you in advance!


Best regards!
Balazs

Re: beehive message resources problem, can I define a message resources factory class?

Posted by Carlin Rogers <ca...@gmail.com>.
Hi Balazs,

Yes, this looks like a hole in the current set of annotations. You
could open an Apache Beehive JIRA improvement for this issue.

The workaround would be to have a simple struts module config file
that contains the desired <message-resources> element. Then on your
Controller annotation set the strutsMerge attribute with the path to
your struts module config. This will merge in the <message-resources>
element into the generated struts module config for the page flow
controller.

Hope that helps,
Carlin

On 10/11/06, fark.balazs@gmail.com <fa...@gmail.com> wrote:
> I have the following problem:
>
>
> I implemented my web application with message resources
> which are queried dinamically from a database. I use Struts
> and my struts-config.xml contains the following row:
>
>     <message-resources factory="com.myapp.MessageResourcesFactory" key="
> org.apache.struts.action.MESSAGE" parameter=""/>
>
> I implemented this factory class, and a class
> which extends the org.apache.struts.util.MessageResources
> class. This works fine. I can retrieve the message from database.
>
> Now I'm trying to use Beehive and
> can't find the annotation(s) for solving this problem!
>
> Shall I edit the struts-config xmls manually?
> This wouldn't be nice!:(
>
> Thank you in advance!
>
>
> Best regards!
> Balazs
>
>