Select to view content in your preferred language

set a value on HeaderController...textbox

596
4
06-06-2014 05:44 AM
NatashaManzuiga
Regular Contributor
Hi, I'm trying to set a value in text box inside the Header Controller from the SearchWidget:

var id:Number = ViewerContainer.getInstance().widgetManager.getWidgetId("HeaderController");    
var bWidget:IBaseWidget = ViewerContainer.getInstance().widgetManager.getWidget(id, true) as IBaseWidget;

It works for other widgets...but I get nothing with HeaderController....
Can u help me?

Naty
Tags (2)
0 Kudos
4 Replies
NatashaManzuiga
Regular Contributor
Nobody can help me?
I still try but no success... 😞
Naty
0 Kudos
RayCrew
Frequent Contributor
Are you just looking for the to change the search prompt text?To do that, you just need to add the following:

<labels>
     <searchprompt>Search Prompt Text</searchprompt>
</labels>
0 Kudos
NatashaManzuiga
Regular Contributor
Are you just looking for the to change the search prompt text?To do that, you just need to add the following:

<labels>
     <searchprompt>Search Prompt Text</searchprompt>
</labels>


It is not the Search Prompt Text..My problem is that on runtime I need to get a value from Search Results and I want to set it in the input box of the HeaderController....And I'm trying and trying without success....:confused:
I hope someone can help me...

Naty
0 Kudos
NatashaManzuiga
Regular Contributor
It is not the Search Prompt Text..My problem is that on runtime I need to get a value from Search Results and I want to set it in the input box of the HeaderController....And I'm trying and trying without success....:confused:
I hope someone can help me...

Naty


I used this function and I got the widget..
Naty

   //=====================================================================
   // Get UI Widget by Label.....,. (Make controlContainer PUBLIC)
   //=====================================================================
   public function getUIWidget(widgetLabel:String):IBaseWidget
   {
    for (var x:Number = 0; x < controlContainer.numElements; x++)
    {
     var widget:IBaseWidget = controlContainer.getElementAt(x) as IBaseWidget;
     if (widget.widgetTitle.toUpperCase() == widgetLabel.toUpperCase())
      return widget;
    }
   
    return null;
   }
0 Kudos