-
1. Re: custom application properties
wrzep Apr 21, 2008 3:54 PM (in response to tiamak)Hi Simon,
can i put properties in the seam.properties file and access them on demand? if so, how do i get hold of seams properties object?You'll find information how to make use of seam.properties file in the Configuring Seam components chapter.
Cheers,
-Pawel -
2. Re: custom application properties
tiamak Apr 21, 2008 4:02 PM (in response to tiamak)hi pawel,
Pawel Wrzeszcz wrote on Apr 21, 2008 03:54 PM:
You'll find information how to make use of seam.properties file in the Configuring Seam components chapter.i read that. but it doesn't tell me anywhere how to get hold of the properties i set in there if they're NOT bound to a backing bean. i'd like to set the upload directory once and use that directory in multiple different beans. if the only way to do this is to create an application scoped sfsb, then so be it. but i don't really want to put the following in my seam.properties:
org.aspsimon.termcomp.bean1.uploadDir=dir org.aspsimon.termcomp.bean2.uploadDir=dir org.aspsimon.termcomp.bean3.uploadDir=dir org.aspsimon.termcomp.bean4.uploadDir=dir ...
after reading section 4.2. in the manual i also can't see a method for setting configuration /strings/ not bound to any component in the components.xml.
any other ideas?
thanks,
sb -
3. Re: custom application properties
wrzep Apr 21, 2008 4:18 PM (in response to tiamak)
Simon Bailey wrote on Apr 21, 2008 04:02 PM:
any other ideas?Hm... then there's a solution you've already mentioned - application-scoped Seam Component that stores all properties.
Alternatively, if you got only one property, you can define uploadDir String component in the components.xml file:
<factory name="uploadDir" scope="APPLICATION" auto-create="true" value="/tmp/dir"/>.-P
-
4. Re: custom application properties
wrzep Apr 21, 2008 4:21 PM (in response to tiamak)
Simon Bailey wrote on Apr 21, 2008 04:02 PM:
if the only way to do this is to create an application scoped sfsb, then so be it.Why SFSB? It can be plain old JavaBean being a Seam Component.
-P