Return-Path: X-Original-To: apmail-openmeetings-dev-archive@www.apache.org Delivered-To: apmail-openmeetings-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EBDD610AB4 for ; Fri, 5 Apr 2013 07:52:19 +0000 (UTC) Received: (qmail 93215 invoked by uid 500); 5 Apr 2013 07:52:19 -0000 Delivered-To: apmail-openmeetings-dev-archive@openmeetings.apache.org Received: (qmail 93124 invoked by uid 500); 5 Apr 2013 07:52:19 -0000 Mailing-List: contact dev-help@openmeetings.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openmeetings.apache.org Delivered-To: mailing list dev@openmeetings.apache.org Received: (qmail 93112 invoked by uid 99); 5 Apr 2013 07:52:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Apr 2013 07:52:18 +0000 X-ASF-Spam-Status: No, hits=2.4 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of solomax666@gmail.com designates 209.85.192.179 as permitted sender) Received: from [209.85.192.179] (HELO mail-pd0-f179.google.com) (209.85.192.179) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Apr 2013 07:52:14 +0000 Received: by mail-pd0-f179.google.com with SMTP id x11so1877277pdj.10 for ; Fri, 05 Apr 2013 00:51:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=HeVKw4Ion1Jrfd8DWtYF9++7F7GUdAlPLoIygs1AxFs=; b=okGYXabB4VFD+46LgPmbyYJKL0JlXocpCTaX8cWeTkasEVqOsDQxfsFji00T6w95DN gBypYOK6nDE+oxxT98kpwBem5l41TJPz/5veUA85IJX9ztI7mn22oJ4J+ioPY5B11c0M ndaUKYFFNOMXCJSiXd7kTfcZw8B9s4Ke5hsLxmyR4sEb12Z7jbbAubua//X9CDz67UJj AUddDPae4if1ApHHrc1ow4xK6hJP+zScbYFnxExWiP4AaGGBjvWxn2ntMbGCb6ExmJRl i4YpsPWlHReAIQb7J8bbt//d1ZOoJFDqXMYxIQ0WDTXgN6VAkq5fMMiVYDNf5+Yuln6J xtGg== MIME-Version: 1.0 X-Received: by 10.68.226.74 with SMTP id rq10mr3438914pbc.6.1365148314190; Fri, 05 Apr 2013 00:51:54 -0700 (PDT) Received: by 10.66.81.99 with HTTP; Fri, 5 Apr 2013 00:51:54 -0700 (PDT) In-Reply-To: References: Date: Fri, 5 Apr 2013 14:51:54 +0700 Message-ID: Subject: Re: How to set attribute value to a language xml file entry From: Maxim Solodovnik To: dev Content-Type: multipart/alternative; boundary=e89a8ff253be554ad104d9985cbf X-Virus-Checked: Checked by ClamAV on apache.org --e89a8ff253be554ad104d9985cbf Content-Type: text/plain; charset=UTF-8 I believe the error is in this line: this.parent.setAttribute('errortext',canvas.getLabelName(1541)); you should write this.setAttribute('errortext',canvas.getLabelName(1541)); since in XML hierarchy 'errortext' is on the same level. parent means 'parent XML element' not 'parent class' On Fri, Apr 5, 2013 at 8:54 AM, Andun Sameera wrote: > 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, > > > > clip="true"> > > > > 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, > > > Content is Saving, Please wait. > > > Then I have changed the oninit handler of the contentSaveWindow class > like this to update the variable. > > > 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(); > > > 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, > > > Content is Saving, Please wait. > > > 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 > 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 > wrote: > > > >> Hi All, > >> > >> I have a language xml entry like this, > >> > >> > >> Content is Saving, Please wait. > >> > >> > >> I want to save this value to a attribute like this, > >> > >> 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 > -- WBR Maxim aka solomax --e89a8ff253be554ad104d9985cbf--