access widget value

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2013 10:00 PM
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!!
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!!
Labels:
- Labels:
-
Archive
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2013 02:23 PM
What is the <em>parent</em> assigned to in your case?
Also, I think (but check this first) that widgets usually have a
The PopupManager in your
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.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2013 06:22 PM
sorry for the typo…it is actually "widgets" that i tried…i tried putting in this.widgets.nameP.value but it didnt work!!

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2013 08:03 PM
it worked..i was actually passing the wrong variable name…sorry..my bad!! 🙂
