Hi Maxim,

There was a small mistake in my question. I will state the question
more clearly with some new findings.

In the baseErrorDialog class it has a view like this,

<attribute name="errortext" value="" type="string" />

<view y="24" width="$once{ parent.width - 40 }" height="130" x="30" clip="true">
    <text fontsize="10" fontstyle="bold" text="${
parent.parent.errortext }" multiline="true" width="$once{ parent.width
- 16 }" selectable="true" />
</view>

the contentSaveWindow class has been created by extending
baseErrorDialog. So I want to update the text of the above text view
from the subclass contentSaveWindow. For that task, I thought updating
the value of errorText attribute which is used to specify the text of
text view.

So I have created a english.xml file entry like this,

<string id="1541" name="content_is_saving">
           <value>Content is Saving, Please wait.</value>
</string>

Then I have changed the oninit handler of the contentSaveWindow class
like this to update the variable.

<handler name="oninit">
        this.parent.setAttribute('errortext',canvas.getLabelName(1541));
        lz.ModeManager.makeModal(this);
        if ($debug) Debug.write("contentsavewindow: ",errorid);
        if ($debug) Debug.write("this.parent.errortext:",this.parent.errortext);
        this.startSave();
</handler>

In the debug mode I saw the value of errortext attribute is updated.
But the message window come without empty value in the text box. So
what is wrong here?

My basic requirement is to add a text to the empty text box of
baseErrorDialog while being in the sub class
contentSaveWindow.

Also my other question was how to update all the language xml files
with this new entry,

<string id="1541" name="content_is_saving">
           <value>Content is Saving, Please wait.</value>
</string>

Vasiliy instructed me to use
org.apache.openmeetings.test.labels.FillLabels for this task. Is it
enough to run the text() method of that particular class to update all
langue xml files.

Please be kind enough to instruct me on these questions. Sorry for the
earlier mistake.

Thanks!

On Fri, Apr 5, 2013 at 7:06 AM, Maxim Solodovnik <solomax...@gmail.com> wrote:
> I'm totally confused with this question,
>
> 1) since you have entry in your english.xml file (and have this language
> file imported via language admin) there is no need to create any attributes.
>
> 2) Why do you need attribute?
>
> 3) your attribute declaration is confusing: by setting  *type="number"* you
> telling openlaszlo the value will be number, but in the same line you
> declaring: value="I want to put it here".
>
> Please take a look at the code, there is special label which takes string
> id, you just need to use it.
>
>
>
> On Thu, Apr 4, 2013 at 9:50 PM, Andun Sameera <andun...@gmail.com> wrote:
>
>> Hi All,
>>
>> I have a language xml entry like this,
>>
>>     <string id="1541" name="content_is_saving">
>>         <value>Content is Saving, Please wait.</value>
>>     </string>
>>
>> I want to save this value to a attribute like this,
>>
>>      <attribute name="errorid" value="I want to put it here" type="number"
>> />
>>
>> What will be the way?
>>
>> Also I have added the above new entry to master language (English) xml
>> file. Running the test method in
>> singlewebapp/src/org/apache/openmeetings/test/labels/FillLabels.java
>> will populate that entry to other languages. Am I correct?
>>
>> Thanks!
>>
>> --
>> Regards
>> Andun S.L. Gunawardana
>> Undergraduate
>> Department of Computer Science And Engineering
>> University of Moratuwa
>> Sri Lanka
>>
>> Blog - http://www.insightforfuture.blogspot.com/
>> LinkedIn - http://www.linkedin.com/pub/andun-s-l-gunawardana/34/646/703
>> Twitter -http://twitter.com/AndunSLG
>>
>
>
>
> --
> WBR
> Maxim aka solomax



-- 
Regards
Andun S.L. Gunawardana
Undergraduate
Department of Computer Science And Engineering
University of Moratuwa
Sri Lanka

Blog - http://www.insightforfuture.blogspot.com/
LinkedIn - http://www.linkedin.com/pub/andun-s-l-gunawardana/34/646/703
Twitter -http://twitter.com/AndunSLG

Reply via email to