cancel
Showing results for 
Search instead for 
Did you mean: 

access widget value

alfdeveloper1
Champ in-the-making
Champ in-the-making
how do i access my custom widget value?
I have extended Alfresco.ConsolePanelHandler where I have put a widget as follows in the onLoad() function:

parent.widgets.createButton = Alfresco.util.createYUIButton(parent, "test-button1", parent.onTestClick1);
parent.widget.nameP = Dom.get(parent.id+"-test-text1");

In the onTestClick function i want to access the nameP widget's value and display it using

Alfresco.util.PopupManager.displayMessage({
                text: this.msg(?????)
            });


HOW DO I DO IT?

thank you in advance!!
3 REPLIES 3

zladuric
Champ on-the-rise
Champ on-the-rise
What is the <em>parent</em> assigned to in your case?

Also, I think (but check this first) that widgets usually have a
.widgets
object, but not
.widget.
So you would put
nameP
in
parent.widgets
, not
parent.widget
.

The PopupManager in your
onTestClick
method should (usually) take the
this.widgets
or
this.options
without issues.

sorry for the typo…it is actually "widgets" that i tried…i tried putting in this.widgets.nameP.value but it didnt work!!

it worked..i was actually passing the wrong variable name…sorry..my bad!! 🙂