> What I was trying to achieve was that my bxml pulls that text written in json
> and since it has '@' symbol so convert it to URL.
I understand. However, that syntax only works in BXML files. It does not work
in resource (JSON) files.
> In this, only '@sample.txt' is displayed. But the aim was to display the text
> in sample.txt file.
> So can the latter case be modified in such a way that I have the contents in
> the file as the text in my textarea. I don't want to declare the file
> location in my bxml as the file name to be loaded may change during runtime.
If the file name can change at runtime, you probably wouldn't want to put it in
a resource file anyways, since resources are static and generally read only
once at application startup. You could do this:
<TextArea text="$textLocation"/>
Then, before you read the BXML file, you can call:
bxmlSerializer.getNamespace().put("textLocation", new URL(...));
Then the text will be set to the contents of the file specified by the given
URL.
G