> First, is there a default properties file that can be used 
> for holding data that is specific to the whole application, 
> and not just one form (like in the examples where there is a 
> FormTest.properties).  I tried using the webwork.properties, 
> but it didn't seem to like that. Of course
> I could be doing it wrong :).   I was able to read my own properties
> file, but wasn't sure if that is the best way to go.

I assume you're talking about properties files for pulling message
texts? WW will walk up the inheritance tree looking for the property
if
it is not found in one named the same as your class, so if you have a
common base class for all of your Actions, you can create a default
message file with that name in the same package
(my/app/MyBaseAction.properties).

********
Ok, thanks much for that, sounds like that would be something that
would be easy enough to implement :).

> 
> Second, kind of on the same lines, I noticed there was no way 
> to see if a property is in a file, so I was wondering why 
> not?  Because a hashtable is used, I wouldn't see why it 
> couldn't just use containsKey(), and containsValue().  Just 
> am curious about this as I have found I think that would be 
> nice instead of having to catch an error, or having to walk 
> through the list.

Not sure where you want to use this? Can you explain?
*******
Ok, the long story short.  I have an application that based on what ID
you pass to the first page, I need it to display different things for
all the sub pages.  So  I am checking the properties files for things
such as css pages, images, ect because if it is not in their properties
file, I need to use the default.  

So the reason for the containsKey would be to check if the property is
in their file instead of either making sure every last property is in
the file.  I could use a try{} and catch it if the property is not
there, but from what I have seen the time consumed with throwing errors
is too costly.  Because the properties class extends Hashtable it
already has containsKey() built in.  I wouldn't mind changing it,
actually I am planning on writing a file that extended Configuration
that would do it for me, and just use that instead, I just was curious
if anyone else had run into this and what they did.



Lyle Eckert
[EMAIL PROTECTED]
(651) 917-4747


-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to