On 2/8/06, Keith Fetterman <[EMAIL PROTECTED]> wrote:
>
> OrderRulesBean.getSmallOrderFeeLimit()
>
> This static method is returning a property from a properties file that
> will be included in a message to the user. This class provides a
> convenient way for java classes to reference a single instance of this
> property.
>
>  From what you said, I could create a page display backing bean and
> expose it through there.  Good idea if it works. But, I was wondering if
> there was a more general way without having to re-expose it.

Well is it possible to just put this in as another property of what's
being displayed on the page currently so that
${order.smallOrderFeeLimit} just delegates that call on the get to
OrderRulesBean.getSmallOrderFeeLimit()?

>
> In my particular case, I might have a problem accessing the request
> scoped page display bean.  The message that I am displaying to the user
> is located in an internationalized message (JSP) file that will be
> imported to the page using <c:import> tag after fetching the page URL
> using <fmt:message> tag to get the URL from the
> ApplicationResources.properties file.  I need to insert the value from
> the static method in the text contained in the imported file.

Ow, that made my head hurt :-)

Ok, since this app is internationalized, I'm guessing you have your
.en, .fr, etc. files all ready to go?  If I'm reading this right, it
looks like your app needs an internationalization effort put into it? 
Maybe I misread.

Is there a reason you're not using the Applications.resources.(country
code) files to do this sort of thing?  Again, I'm probably missing
something.

>
> Is there is a direct way to access the static method without fetching it
> from request scoped variable or object?  Another post said there is a
> nonstandard Struts tag library that will work.

FWIW, I'd stay away from those, but it might work for your situation.

> BTW, what is best practice in Struts when providing data to JSP files?

Good question, I know the technique I prefer is your #2 item below,
but that might not be the best practice in your situation.

> 1. Create a display backing bean that contains all of the objects that
> will be used and store that in a single requested scoped variable?
>
> 2. Store individual objects and values in requested scoped variables?
>

thanks,
--
Keith Sader
[EMAIL PROTECTED]
http://www.saderfamily.org/roller/page/ksader
http://www.jroller.com/page/certifieddanger

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to