hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From locutuz <Sebastian.Kl...@vector-informatik.de>
Subject Default value for symbol
Date Wed, 17 Oct 2007 09:52:48 GMT

Hi everyone,

I have a contribution where an attribute is defined with a symbol, see
below:

<config myNewAttribute="${my.new.symbol}" ...


To fill this symbol with data at runtime, there is a properties file
(myProps.properties)
my.new.symbol=The value

So far this works fine.
But there are some cases, where this properties file doesn´t exist already,
so at runtime an error message appears, telling me that there is no value
for that symbol 
(org.apache.hivemind.impl.SymbolExpander    : Error
at...META-INF/hivemodule.xml, line 146, column 7: No value available for
symbol 'my.new.symbol'.).

Off course not, because the properties file doesn´t exist where the value is
get from.
My question is, if there is a possibility to set a default-value for a
symbol, if it can´t be expanded by the SymbolExpander?

I tried to set the value with the <default> element. 
      <contribution configuration-id="hivemind.ApplicationDefaults">
		<default symbol="my.new.symbol" value="DEFAULT" />
	</contribution>

The problem here is, that at runtime the value for 'myNewAttribute' is
'DEFAULT' in any case, regardless if the value can be read from the
properties file. i.e. if the symbol should be expanded by the
SymbolExpander.

Thanks for your help in advance!

Regards,
Sebastian

-- 
View this message in context: http://www.nabble.com/Default-value-for-symbol-tf4639273.html#a13250295
Sent from the Hivemind - User mailing list archive at Nabble.com.


Mime
View raw message