Getting the ExplicitWidth of a DataGridColumn

Please see the code provided. It is a simplified version of
what I am trying to do. I need to be able to programmatically
determine if a DataGridColumn's width attribute has been explicitly
set; for example, columns A and C.
In the debug panel in Flex Builder I can see that each
DataGridColumn has a explicitWidth property but it is a Protected
property so I cannot access it. Is there a way to get() this
property or is there another way to determine if a DataGridColumn's
width has been explicit set?
Thanks.

Adobe Newsbot hopes that the following resources helps you.
NewsBot is experimental and any feedback (reply to this post) on
its utility will be appreciated:
Flex 3 - Automatically generating database applications:
The Flex Builder project's WebContent directory contains
directories to be ... listed table fields to exclude them from the
generated Flex DataGrid control.
Link:
http://livedocs.adobe.com/flex/3/html/data_3.html
Flex Builder 2.0.1 DataGrid Woes...:
The following example was compiled on my machine in Flex
Builder 2.0. Youll notice that you can close the DataGrid to any
width including zero.
Link:
http://asserttrue.com/articles/2007/01/12/flex-builder-2-0-1-datagrid-woes
Flex 3 - Application coding:
However, there are some techniques that a Flex developer can
use to ..... For example, a DataGrid control that contains both
text and graphics inside a cell
Link:
http://livedocs.adobe.com/flex/3/html/performance_08.html
2007 August archive at Flex Examples:
The following example demonstrates how you can create a Flex
DataGrid .... Well, the answer is you have to download the public
Flex Builder beta from
Link:
http://blog.flexexamples.com/2007/08/
FLEX{er} datagrid:
To make it crystal clear follow the example bellow Having the
[] Popularity: 55% ... Touka: They are using AJAX for the builder
interface.
Link:
http://www.flexer.info/tag/datagrid/
Using a custom context menu with the Flex DataGrid control at
Flex:
This page works fine in FireFox, but when I just run the
example code in FireFox from Flex Builder I get the strange
behavior. Im using FireFox 2.
Link:
http://blog.flexexamples.com/2007/08/20/using-a-custom-context-menu-with-the-flex-datagrid -control/
Disclaimer: This response is generated automatically by the
Adobe NewsBot based on Adobe
Community
Engine.

Similar Messages

  • How to get the DataGridColumn Value

    Hi All,
    I have a problem with DataGridColumn . In that "How to get
    the DataGridColumn value when the application loads"(here am not
    using anyother event).
    In my code i have three columns.I want to get the first
    datagridcolum(Name) values(all rows values).
    here i will send my code please refer ...
    <?xml version="1.0"?>
    <!-- DataGrid control example. -->
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="init()">
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    ]]>
    </mx:Script>
    <mx:XMLList id="employees">
    <employee>
    <name>Christina Coenraets</name>
    <phone>555-219-2270</phone>
    <email>[email protected]</email>
    <active>true</active>
    </employee>
    <employee>
    <name>Joanne Wall</name>
    <phone>555-219-2012</phone>
    <email>[email protected]</email>
    <active>true</active>
    </employee>
    <employee>
    <name>Maurice Smith</name>
    <phone>555-219-2012</phone>
    <email>[email protected]</email>
    <active>false</active>
    </employee>
    <employee>
    <name>Mary Jones</name>
    <phone>555-219-2000</phone>
    <email>[email protected]</email>
    <active>true</active>
    </employee>
    </mx:XMLList>
    <mx:Panel title="DataGrid Control Example" height="100%"
    width="100%"
    paddingTop="10" paddingLeft="10" paddingRight="10">
    <mx:Label width="100%" color="blue"
    text="Select a row in the DataGrid control."/>
    <mx:DataGrid editable="true" id="dg" width="50%"
    height="60%"
    itemEditEnd="Alert.show('hi')" doubleClickEnabled="true"
    doubleClick="dg.editable=true" rowCount="5"
    dataProvider="{employees}">
    <mx:columns>
    <mx:DataGridColumn id="nam" dataField="name"
    headerText="Name"/>
    <mx:DataGridColumn dataField="phone"
    headerText="Phone"/>
    <mx:DataGridColumn dataField="email"
    headerText="Email"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:Form width="100%" height="100%">
    <mx:Text text="Employe Details" fontSize="18"/>
    <mx:FormItem label="Name :">
    <mx:Label text="{dg.selectedItem.name}"/>
    </mx:FormItem>
    <mx:FormItem label="Email :">
    <mx:Label text="{dg.selectedItem.email}"/>
    </mx:FormItem>
    <mx:FormItem label="Phone :">
    <mx:Label text="{dg.selectedItem.phone}"/>
    </mx:FormItem>
    </mx:Form>
    </mx:Panel>
    <mx:Script>
    <![CDATA[
    private function init():void{
    var name:String=nam.dataField;
    Alert.show("values: "+name);
    ]]>
    </mx:Script>
    </mx:Application>
    Thanks in Advance,
    Premdas.

    This code may help:

  • How to get the selectedIndex from a combobox made by classFactory?

    Dear All,
    I am trying to get the selectedIndex or selecetedItem.banda_id when changing a combobox that is created by classFactory and it is inside a datagrid.
    The code I have is:
    MXML:
    <mx:DataGrid width="100%" height="100%" id="salas_fin_dg" editable="true">
         <mx:columns>
    <mx:DataGridColumn headerText="Titulo" dataField="titulo" editable="false" width="250"/>
    <mx:DataGridColumn headerText="Data" dataField="start_dt" editable="false"/>
    <mx:DataGridColumn headerText="Dur" dataField="duration" editable="false" width="40"/>
    <mx:DataGridColumn headerText="Banda" dataField="banda_nome" editable="true" itemEditor="{combofac}"/>
    <mx:DataGridColumn headerText="$ Ensaio" dataField="total_ensaio" editable="true" itemEditor="controls.NumericInput"/>
    <mx:DataGridColumn headerText="$ Bar" dataField="total_bar" editable="true" itemEditor="controls.NumericInput"/>
    <mx:DataGridColumn headerText="$ Loja" dataField="total_loja" editable="true" itemEditor="controls.NumericInput"/>
    <mx:DataGridColumn headerText="$ CC" dataField="total_cc" editable="true" itemEditor="controls.NumericInput"/>
    <mx:DataGridColumn headerText="$ CH" dataField="total_ch" editable="true" itemEditor="controls.NumericInput"/>
    <mx:DataGridColumn headerText="$ DI" dataField="total_di" editable="true" itemEditor="controls.NumericInput"/>
    <mx:DataGridColumn headerText="$ Pend" dataField="total_pend" editable="true" itemEditor="controls.NumericInput"/>
         </mx:columns>
    </mx:DataGrid>
    Script:
    private function getSalasFinHandler(event:ResultEvent):void
    salas_fin_lst = new ArrayCollection(event.result as Array);
    salas_fin_dg.dataProvider = salas_fin_lst;
    myservice.getBandas();
    combofac=new ClassFactory(ComboBox);
         combofac.properties={dataProvider:bandas_lst, labelField:"banda_nome", prompt:"Selecione"};
    I am using Remote Object to get the data from a DB, and it is working properly.
    As I will update the datagrid cell values, I would like to update them on the DB.
    In order to do that, I would need to access the banda_id value, that is part of the combofac dataprovider, I mean that this dataprovider has 2 columns, being banda_nome and banda_id.
    The question is how to get the banda_id value, when I change the comobobox?
    Many thanks in advance,
    Gines

    Dear harUI and kolinitcom,
    Thanks for the your prompt response and guidelines.
    I went to research a little bit more on the itemEditEnd and found a way to access the data inside the combobox.
    The code for all application goes below. If you click on the button, it will show you all the datagrid data, plus the ID of the combobox when changed.
    Thanks again,
    Gines
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
            layout="vertical"
            verticalAlign="middle"
            backgroundColor="white" initialize="init();">
            <mx:Script>
               <![CDATA[
               import mx.utils.ObjectUtil;
               import mx.controls.ComboBox;
               import mx.controls.Alert;
               import mx.events.DataGridEvent;
               import mx.events.*;
          [Bindable]
          private var combofac:ClassFactory;
      public var newVal:String;
          private function init():void
            combofac=new ClassFactory(mx.controls.ComboBox);
            combofac.properties={dataProvider:arrcombo, prompt:"Selecione", labelField:"label"};      
                public function getCellInfo(event:DataGridEvent):void {
                    var myEditor:ComboBox = ComboBox(event.currentTarget.itemEditorInstance);
                    newVal = myEditor.selectedItem.data;
    public function mostra():void
    var dados:Object = new Object;
    dados.nome = dataGrid.selectedItem.label;
    dados.score = dataGrid.selectedItem.score;
    dados.score_id = newVal;
    Alert.show(ObjectUtil.toString(dados));
           ]]>
        </mx:Script>
        <mx:TextArea id="cellInfo" width="300" height="150" />
                <mx:ArrayCollection id="arrcombo">
            <mx:source>
                <mx:Array>
                    <mx:Object label="1" data="A1"/>
                    <mx:Object label="2" data="A2"/>
                    <mx:Object label="3" data="A3"/>
                    <mx:Object label="4" data="A4"/>
                    <mx:Object label="5" data="A5"/>
                    <mx:Object label="6" data="A6"/>
                    <mx:Object label="7" data="A7"/>
                    <mx:Object label="8" data="A8"/>
                    <mx:Object label="9" data="A9"/>
                </mx:Array>
            </mx:source>
        </mx:ArrayCollection>
        <mx:ArrayCollection id="arrColl">
            <mx:source>
                <mx:Array>
                    <mx:Object label="Student A" score="8" />
                    <mx:Object label="Student B" score="4" />
                    <mx:Object label="Student C" score="7" />
                    <mx:Object label="Student D" score="8" />
                    <mx:Object label="Student E" score="2" />
                    <mx:Object label="Student F" score="6" />
                    <mx:Object label="Student G" score="7" />
                    <mx:Object label="Student H" score="7" />
                    <mx:Object label="Student I" score="9" />
                    <mx:Object label="Student J" score="8" />
                    <mx:Object label="Student K" score="4" />
                    <mx:Object label="Student L" score="7" />
                </mx:Array>
            </mx:source>
        </mx:ArrayCollection>
        <mx:DataGrid id="dataGrid"
                dataProvider="{arrColl}"
                editable="true"
                rowCount="8"
                itemEditEnd="getCellInfo(event);">
            <mx:columns>
                <mx:DataGridColumn dataField="label"
                        editable="false" />
                <mx:DataGridColumn dataField="score"
                        editable="true"
                        itemEditor="{combofac}"/>
    <mx:DataGridColumn headerText="Salvar" width="50">
    <mx:itemRenderer>
    <mx:Component>
    <mx:VBox width="100%" height="100%">
    <mx:Button label="See the values" click="outerDocument.mostra();"/>
    </mx:VBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
            </mx:columns>
        </mx:DataGrid>
    </mx:Application>

  • How can I get the text value of an XML element  in MXML ?

    Hi,
    I have the following XML loaded into a variable of type XML :
    <properties>
         <comment>RIMpro Data Collector Configuration</comment>
         <entry key="server.pear.username"/>
         <entry key="server.apple.retry.times">5</entry>
         <entry key="rdc.proxy.host">http://192.168.1.2:8080</entry>
    /properties>
    I can easily get the key attribute displayed in a DataGridColumn by setting the dataProvider to my variable and the dataField to "@key".  But I do not know how to get the text value in a second column...  Is there a way or do I need to change my XML to something like this :
    <properties>
         <comment>RIMpro Data Collector Configuration</comment>
         <entry key="server.pear.username"/>
         <entry key="server.apple.retry.times" value="5"></entry>
         <entry key="rdc.proxy.host" value="http://192.168.1.2:8080"></entry>
    /properties>
    Many thanks in advance.
    Marc

    yes, you'd better modify your XML structure to fit the DataGrid internals.
    Since dataField pattern require each grid row item to have a named property to be displayed, otherwise you'll be forced to overcome this pattern using custom labelFunction for the particular column which will implement your custom actions on how to extract appropriate data for that column out of grid row item. It will be much more complicated than just rearranging your xml structure.

  • How do I get the value of a comboBox item that is in a grid?

    Hi all,
    I have a data grid that has comboBoxes in two of its columns.
    What I need to do is get the values of those bombo boxes when a user highlights the row of the grid NOT when the user uses the comboBox. I understand how to pull the values out once the change handler is invoked on the comboBox, but I'm not seeing a way to get at the comboBoxes that belong to the currently highlighted gridRow.
    I'm sure it's really straight forward, but I'm just not able to find any reference on how it's done. Any help greatly appreciated.

    This code shows how you can do it if you know the dataProvider fields for the ComboBox data.
    If this post answered your question or helped, please mark it as such.
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
       initialize="initData()">
       <mx:Script>
       <![CDATA[
        import mx.events.ListEvent;
          import mx.collections.*;
          private var DGArray:Array = [
             {Artist:'Pavement', Album:'Slanted and Enchanted', Price:11.99, combo1: [1,2,3], combo2: [100,200,300]},
             {Artist:'Pavement', Album:'Brighten the Corners', Price:11.99, combo1: [2,4,6], combo2: [200,400,600]}];
          [Bindable] public var initDG:ArrayCollection;
          public function initData():void {
             initDG=new ArrayCollection(DGArray);
          private function dgChangeHandler(event:ListEvent):void{
           var ac:ArrayCollection = event.currentTarget.dataProvider;
           txt.text = "";
           txt.text += ac.getItemAt(event.rowIndex).combo1 + "\n";
           txt.text += ac.getItemAt(event.rowIndex).combo2;
       ]]>
       </mx:Script>
       <mx:DataGrid id="myGrid" width="350" height="200"
          dataProvider="{initDG}" change="dgChangeHandler(event);">
          <mx:columns>
             <mx:DataGridColumn dataField="Artist" />
             <mx:DataGridColumn dataField="Album" />
             <mx:DataGridColumn dataField="Price" />
             <mx:DataGridColumn dataField="combo1">
              <mx:itemRenderer>
               <mx:Component>
                <mx:VBox>
                 <mx:ComboBox dataProvider="{data.combo1}"/>
                </mx:VBox>
               </mx:Component>
              </mx:itemRenderer>
             </mx:DataGridColumn>
             <mx:DataGridColumn dataField="combo1">
              <mx:itemRenderer>
               <mx:Component>
                <mx:VBox>
                 <mx:ComboBox dataProvider="{data.combo2}"/>
                </mx:VBox>
               </mx:Component>
              </mx:itemRenderer>
             </mx:DataGridColumn>
          </mx:columns>
       </mx:DataGrid>
       <mx:TextArea id="txt" width="100%" height="100%"/>
    </mx:Application>

  • How to get the zero of phone number eg. 0612345678

    Dear Adobe Flex Builder Professionals,
    I've got a problem with getting the zero of a phone number eg. 0612345678
    If I enter the folowing phone number as input:
    0612345678
    I will get the phone number as output:
    612345678
    The application has been written in Adobe Flex Builder 3.
    The code of the MXML file is:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
    creationComplete="init()"
    horizontalScrollPolicy="off" verticalScrollPolicy="off">
    <mx:Metadata>
      [Event(name="customerSaveEvent", type="events.CustomerEvent")]
      [Event(name="customerCancelEvent", type="flash.events.Event")]
    </mx:Metadata>
    <mx:Script>
      <![CDATA[
       import util.ComboBoxUtil;
       import mx.controls.Alert;
       import events.CustomerEvent;
       import mx.collections.ArrayCollection;
       import mx.core.Application;
       import valueObject.Customer;
       import mx.validators.Validator;
       import mx.validators.PhoneNumberValidator;
       private var phoneCheck:PhoneNumberValidator;
       [Bindable]
       public var selectedCustomer:Customer;
       private function init():void{
        //this.cretePhoneValidator();
        if(this.selectedCustomer == null){
         this.clearForm(null);
       private function cretePhoneValidator():void{
        phoneCheck = new PhoneNumberValidator();
        phoneCheck.source = phoneNumber;
        phoneCheck.property = "text";
       private function validateForm():void {
        //var validatorList:Array = new Array(emailCheck, phoneCheck);
        //Validator.validateAll(validatorList);
       private function cancelClickHandler():void{
        var cancelManageCustomerObj:Event = new Event("customerCancelEvent");
        dispatchEvent(cancelManageCustomerObj);
       private function saveCustomer():void {
        //validateForm();
         var c:Customer = null;
         var selCust:Customer = Application.application.selectedCustomer;
         if(selCust != null){
          c = selCust;
         } else {
          c = new Customer();          
         c.setLastName(lastName.text);
         c.setFirstName(firstName.text);
         c.setStreet(street.text);
         c.setPostal(postal.text);
         c.setCity(city.text);
         c.setEmail(email.text);
         c.setPhoneNumber(new Number(phoneNumber.text));
         c.setMailing(mailing.selectedItem.data);
         c.setComment(comment.text);
         var modified: Customer = Application.application.customerService.createOrUpdate(c);
        var customerEventObj:CustomerEvent = new CustomerEvent("customerSaveEvent", modified);
        dispatchEvent(customerEventObj);
        this.clearForm(selCust);
        private function clearForm(selCust:Customer):void{
         if(selCust == null){
          this.lastName.text = "";
          this.firstName.text = "";
          this.street.text = "";
          this.postal.text = "";
          this.city.text  = "";
          this.phoneNumber.text = "";
          this.email.text = "";
          this.mailing.selectedIndex = 0;
          this.comment.text  = "";
         focusManager.setFocus(lastName);
      ]]>
    </mx:Script>
    <!--mx:EmailValidator id="emailCheck" source="{email}" property="text"
      trigger="{save}" triggerEvent="click"/-->
    <mx:Form id="manageCustomerForm">
      <mx:FormItem label="Achternaam:">
       <mx:TextInput id="lastName" text="{selectedCustomer.getLastName()}"/>
      </mx:FormItem>
      <mx:FormItem label="Voorletters:">
       <mx:TextInput id="firstName" text="{selectedCustomer.getFirstName()}"/>
      </mx:FormItem>
      <mx:FormItem label="Straat:">
       <mx:TextInput id="street" text="{selectedCustomer.getStreet()}"/>
      </mx:FormItem>
      <mx:FormItem label="Postcode:">
       <mx:TextInput id="postal" text="{selectedCustomer.getPostal()}"/>
      </mx:FormItem>
      <mx:FormItem label="Stad:">
       <mx:TextInput id="city" text="{selectedCustomer.getCity()}"/>
      </mx:FormItem>
      <mx:FormItem label="Telefoonnummer:">
       <mx:TextInput id="phoneNumber" text="{selectedCustomer.getPhoneNumber()}"/>
      </mx:FormItem>
      <mx:FormItem label="E-mail:">
       <mx:TextInput id="email" text="{selectedCustomer.getEmail()}"/>
      </mx:FormItem>
      <mx:FormItem label="Opmerkingen:" >
       <mx:TextArea id="comment" text="{selectedCustomer.getComment()}"
         width="447" height="144"/>
      </mx:FormItem>
      <mx:FormItem label="Mailing:">
       <mx:ComboBox id="mailing" dataProvider="{Application.application.comboBoxUtil.yesNo}"
        selectedIndex="{ComboBoxUtil.getIndex(selectedCustomer.getMailing())}"/>
      </mx:FormItem>
      <mx:HBox id="manageButtonBox">  
       <mx:Button id="save" label="Opslaan" click="saveCustomer()" />  
       <mx:Button id="resetButton" label="Wis" click="clearForm(null)" />  
       <mx:Button id="cancelButton" label="Annuleer" click="cancelClickHandler()" />
      </mx:HBox> 
    </mx:Form>
    </mx:Canvas>
    The code of the SQL file is:
    create table customer (
    id integer not null primary key autoincrement,
    lastName VARCHAR(50),
    firstName VARCHAR(50),
    street VARCHAR(50),
    city VARCHAR(50),
    postal VARCHAR(10),
    phoneNumber INT(10),
    email VARCHAR(50),
    mailing boolean default false,
    comment VARCHAR(255)
    create table treatment (
    id integer not null primary key autoincrement,
    date Date,
    treatment varchar(255),
    customerId integer not null,
    constraint fk_customer foreign key(customerId) references customer(id)
    create table user (
    id integer not null primary key autoincrement,
    loginName varchar(50) not null,
    lastName varchar(50) not null,
    firstName varchar(50) not null,
    password varchar(50) not null,
    active boolean not null default true,
    accessright varchar(10) not null
    create table agenda (
    id integer not null primary key autoincrement,
    userId integer not null,
    date Date,
    hour integer,
    minute integer,
    description varchar(50),
    constraint fk_user foreign key(userId) references user(id)
    create table license (
    id integer not null primary key autoincrement,
    key varchar(50),
    val varchar(50)
    I hope someone can help me with this problem.

    Customer List?
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="
    http://www.adobe.com/2006/mxml
    initialize="init()">
    <mx:Metadata>
      [Event(name="selectCustomerEvent", type="events.CustomerEvent")]
    </mx:Metadata>
    <mx:Script>
      <![CDATA[
       import mx.core.Application;
       import service.CustomerService;
       import events.CustomerEvent;
       import valueObject.Customer;
       import mx.events.ListEvent;
       import mx.collections.ArrayCollection;
       [Bindable]
       public var customerData:ArrayCollection;
       private var customerService:CustomerService;
       private function init():void{
        this.customerService = new CustomerService();
        this.customerData = this.customerService.getCustomers();
        if(this.customerData == null){
         this.customerData = new ArrayCollection();
       private function itemClickHandler(event:ListEvent):void {
        if(event.columnIndex != 0){
         var customerData:Customer;
         customerData = event.itemRenderer.data as Customer;
         var customerEventObj:CustomerEvent = new CustomerEvent("selectCustomerEvent", customerData);
         dispatchEvent(customerEventObj);
       public function deleteCustomer(id:int):void{
        var cust:Customer = new Customer();
        cust.setId(id);
        this.customerService.deleteCustomer(cust);
        this.customerData.removeItemAt(customerGrid.selectedIndex);
      ]]>
    </mx:Script>
    <mx:DataGrid id="customerGrid" dataProvider="{customerData}" height="100%"
      itemClick="itemClickHandler(event)" width="340">
      <mx:columns>
       <mx:DataGridColumn deactivate="true" dataField="id" headerText=" " width="15">
              <mx:itemRenderer>
                <mx:Component>
                  <mx:Image source="images/delete.jpg" click="outerDocument.deleteCustomer(data.id)"
                   buttonMode="true" height="15" width="15"/>
                </mx:Component>
              </mx:itemRenderer>
            </mx:DataGridColumn>
       <mx:DataGridColumn dataField="lastName" headerText="Achternaam" />
       <mx:DataGridColumn dataField="firstName" headerText="Voorletters" />
      </mx:columns>
    </mx:DataGrid>
    </mx:Canvas>

  • I am having macbook air recently my iphotos did not open and was showing report apple and reopen but i came to know that by pressing alt and iphotos i open an new photo library and stored the pics but now how can i get the pics which i had in the earlier

    i am having macbook air recently my iphotos did not open and was showing report apple and reopen but i came to know that by pressing alt and iphotos i open an new photo library and stored the pics but now how can i get the pics which i had in the earlier photo please help me to recover my photos

    Well I'll guess you're using iPhoto 11:
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  
    Regards
    TD

  • Unable to get the values from ISearchResultList

    Hi,
    I am working on KM Indexmanagemnt API for searching with TREX, to build a search similar to msn or google.
    I am following the example of Thilo Brandt, and after building the query, I am unable to retrieve the result from ISearchResultList, the results size its displaying is zero. But session.getTotalNumberResultKeys() is retrieving a value 20.
    Here is the code I am using, please tell me where I am doing wrong.
    public class SearchComponetOne extends AbstractPortalComponent {
         public void doContent(IPortalComponentRequest request,     IPortalComponentResponse response) {
      com.sap.security.api.IUser nwUser =
                   UMFactory.getAuthenticator().getLoggedInUser();
    com.sapportals.portal.security.usermanagement.IUser user = null;
    try {
          user = WPUMFactory.getUserFactory().getEP5User(nwUser);
         } catch (UserManagementException e) {
                   response.write(e.getMessage());
       response.write("<html><head><title>Search</title></head><body>");
      ResourceContext c = new ResourceContext(user);
      try {
        IIndexService indexService = (IIndexService) ResourceFactory
                             .getInstance()
                             .getServiceFactory()
                             .getService(
                             IServiceTypesConst.INDEX_SERVICE);
       SearchQueryListBuilder sqb = new SearchQueryListBuilder();
       sqb.setSearchTerm("sap");
      IQueryEntryList qel = sqb.buildSearchQueryList();
      // get an instance of federated search
    IFederatedSearch federatedSearch =
                   (IFederatedSearch) indexService.getObjectInstance(
              IWcmIndexConst.FEDERATED_SEARCH_INSTANCE);
         List indexList = new ArrayList();
         String index = null;
         if (index != null && index.length() > 0) {
              // take a specified index from index= parameter
              indexList.add(indexService.getIndex(index));
         } else {
              // take all available indexes
              indexList = indexService.getActiveIndexes();
         // it is recommended to use a search session object
         // for searching execution
         ISearchSession session = null;
         if (session == null)
         session = federatedSearch.searchWithSession(qel, indexList, c);
    response.write("Inside doContent session.getNumberResultKeys() => " + session.getNumberResultKeys()); // output as 20
         this.renderResultHeader(response, session, indexList);
         // get all results from the search session
    ISearchResultList results =     session.getSearchResults(1, session.getTotalNumberResultKeys());
    response.write(" from session => " + results.size() + " and size is : " + results.toString());  // I am getting the results.size() as zero
    Thanks

    I think the problem is UME related. I had the same problem once. Try using a system user for searching, instead of the logged on user.
    Like this:
    com.sapportals.portal.security.usermanagement.IUser user = WPUMFactory.getUserFactory().getUser("cmadmin_service");
    Please reward the points if this helps.

  • How to get the values from popup window to mainwindow

    HI all,
       I want to get the details from popup window.
          i have three input fields and one search button in my main window. when i click search button it should display popup window.whenever i click on selected row of the popup window table ,values should be visible in my main window input fields.(normal tables)
       now i am able to display popup window with values.How to get the values from popup window now.
       I can anybody explain me clearly.
    Thanks&Regards
    kranthi

    Hi Kranthi,
    Every webdynpro component has a global controller called the component controller which is visible to all other controllers within the component.So whenever you want to share some data in between 2 different views you can just make it a point to use the component controller's context for the same. For your requirement (within your popups view context) you will have have to copy the component controllers context to your view. You then will have to (programmatically) fill this context with your desired data in this popup view. You can then be able to read this context from whichever view you want. I hope that this would have made it clear for you. Am also giving you an [example|http://****************/Tutorials/WebDynproABAP/Modalbox/page1.htm] which you can go through which would give you a perfect understanding of all this. In this example the user has an input field in the main view. The user enters a customer number & presses on a pushbutton. The corresponding sales orders are then displayed in a popup window for the user. The user can then select any sales order & press on a button in the popup. These values would then get copied to the table in the main view.
    Regards,
    Uday

  • How to get the values from a html form embedded in a swing container

    Hi all,
    I am developing an application in which i have to read a html file and display it in a swing container.That task i made it with the help of a tool.But now i want to get the values from that page.ie when the submit button is clicked all the values of that form should be retrived by a servlet/standalone application.I don't know how to proceed further.Any help in this regard will be very greatful
    Thanks in advance,
    Prakash

    By parsing the HTML.

  • How can i get the all values from the Property file to Hashtable?

    how can i get the all values from the Property file to Hashtable?
    ok,consider my property file name is pro.PROPERTIES
    and it contain
    8326=sun developer
    4306=sun java developer
    3943=java developer
    how can i get the all keys & values from the pro.PROPERTIES to hashtable
    plz help guys..............

    The Properties class is already a subclass of Hashtable. So if you have a Properties object, you already have a Hashtable. So all you need to do is the first part of that:Properties props = new Properties();
    InputStream is = new FileInputStream("tivoli.properties");
    props.load(is);

  • Get the values from a table comparing fields of different data types

    Hi Experts,
    I want to fetch AFVC-AUFPL and AFVC- APLZL by passing WBS element from a ztable.
    select aufpl aplzl
      from  afvc
      into TABLE gt_afvc
      FOR ALL ENTRIES IN gt_boq
      where projn = gt_boq-posid.
    AFVC-PROJN - NUMC 8  (WBC ELEMENT)
    ZTABLE-POSID - CHAR24 (WBC ELEMENT)
    How to get aufpl and aplzl by comparing those 2?
    Regards
    Mani

    WBS element does have an conversion routine at the domain level. So sometimes you work with one format (8 digits) and sometimes with 24 digits.
    You use FMs
    CONVERSION_EXIT_ABPSP_INPUT
    CONVERSION_EXIT_ABPSP_OUTPUT
    to convert between values. Do your conversion before your select and do not forget to use a large enough data element for the field, which gets the 24-digits long value of the field.

  • Get the values from Exception class

    Hi all ..
    In class i have raised one exception
    when i catch this exception in my program i m able to get the
    error message but i need to get all the parameters that i pass
    when i raise the exception ...
    i have raised like this
          RAISE EXCEPTION TYPE cx_bapi_error
            EXPORTING
              textid = cx_bapi_error=>cx_bo_error
              class_name = 'ZHS_'
              log_no = wa_bapi_return-log_no
              log_msg_no = wa_bapi_return-log_msg_no
              t100_msgid = wa_bapi_return-id
              t100_msgno = wa_bapi_return-number
              t100_msgv1 = wa_bapi_return-message_v1
              t100_msgv2 = wa_bapi_return-message_v2
              t100_msgv3 = wa_bapi_return-message_v3
              t100_msgv4 = wa_bapi_return-message_v4
              STATUS = lt_status
    and caught the exception like this in my program
        CATCH cx_bapi_error INTO go_error.
          gd_text = go_error->get_text( ).
          EXIT.
      ENDTRY.
    in this i m just getting the class name which i have passed in exception
    i need all other parameters that i have passed ..
    if u have any idea pls let me know ..
    Thanks in advance ...

    Hello Jayakumar
    Usually the attributes of standard exception classes are defines as <b>public</b> and <b>read-only</b>. Thus, you should be able to use the following coding:
    DATA:
      go_error   TYPE REF TO cx_bapi_error.  " specific exception class !!!
    TRY.
    RAISE EXCEPTION TYPE cx_bapi_error
    EXPORTING
    textid = cx_bapi_error=>cx_bo_error
    class_name = 'ZHS_'
    log_no = wa_bapi_return-log_no
    log_msg_no = wa_bapi_return-log_msg_no
    t100_msgid = wa_bapi_return-id
    t100_msgno = wa_bapi_return-number
    t100_msgv1 = wa_bapi_return-message_v1
    t100_msgv2 = wa_bapi_return-message_v2
    t100_msgv3 = wa_bapi_return-message_v3
    t100_msgv4 = wa_bapi_return-message_v4
    STATUS = lt_status.
    CATCH cx_bapi_error INTO go_error.
    gd_text = go_error->get_text( ).
    WRITE: go_error->t100_msgid,  " perhaps the attributes have different name
                go_error->t100_msgno, " check attribute names in SE24
    EXIT.
    ENDTRY.
    Regards
      Uwe

  • When I login to my bank, I get the message: 403 - Forbidden: Access is denied. You do not have permission to view this directory or page using the credentials that you supplied. Have new MacBook Air with Yosemite. How to solve this problem?

    When I try to login to the website of my bank, I get the following error message:
    403 - Forbidden: Access is denied.
    You do not have permission to view this directory or page using the credentials that you supplied.
    I have a new MacBook Air with OS Yosemite installed.
    What is the problem and how can I solve it?

    Some websites require a special client certficate for access. If you don't have that certficate, you'll have to contact the site operator to find out how to get one.
    Sometimes the problem is caused by a web server that is configured to request an optional client certificate. Safari treats the request as mandatory. In that case, other browsers such as Firefox and Chrome may be able to connect to the site, because they ignore the request.
    The first time you were prompted for a certificate, you may have clicked through a dialog that requested access to the Apple certificate in your keychain that is used to secure the iMessage service. In that case, you may be able to regain access to the site in Safari by doing as follows.
    Back up all data.
    Double-click anywhere in the line below on this page to select it:
    com.apple.idms.appleid.prd
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the Keychain Access application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Keychain Access in the icon grid.
    Paste into the search field in the Keychain Access window by clicking in it and pressing the key combination command-V. An item may appear in the list of keychain items. The Name will begin with string you searched for, and the Kind will be "certificate."
    Delete the item by selecting it and pressing the delete key. It will be recreated automatically the next time you launch the Messages or FaceTime application.
    The next time you visit a site that prompts for an optional client certificate, cancel out of the prompt. You may have to do this several times before the server stops asking.
    Credit for this idea to Christian Braukmueller of SAP.

  • I'm trying to get the ios 4.2.1 on my second generation iPod . Is there a way to install it directly on my iPod touch because my iTunes on my computer is not working. Please help Apple! I need the update. Just give me a link.

    Im trying to get the ios 4.1.2 on my iPod touch 2nd generation. Can I install it directly on my iPod . My iTunes on my computer isn't working!

    you have to have itunes installed but check out http://support.apple.com/kb/ht4623.

Maybe you are looking for

  • MM related table

    Hi All,       In which table Purchasing data is available. ( Important TABLE for MM) Thanks in advance. Asim

  • Sytsem cannot find the specified file

    I installed apo2011 to clean my registry and when I tried to log back into firefox it was gone, I tried to download it and I keep getting this message once it unzip (system cannot find the file specified)

  • How to send data to an already open excel sheet

    I have a simple VI that opens a closed excel file, writes data to it and closes it. I want to modify it to write data, unconcerned of whether the file is open or closed. how to do it.. I have attached the VI here.. thanks.. Attachments: Save to Excel

  • D51wkdmp::::Trying to run on corrupt file, ""workbook.Item dependency

    Hi ALL I am trying to run that following dump utility on my corrupt DIS File, I am not successful , but if run that following command on my correct file (Working File) it gives me the result. d51wkdmp "C:\XX DISCOVERER REPORT.DIS" c:\PA_EXP_DUMP.TXT

  • In MBEW table, all these worth values represents which currencny?

    Hi Experts, I hv seen all the worth values of a materail in MBEW table.........but, I did NOT find any CURRENCY in that table..........so, In which currency all these values are representing?? Say, for material 12345678, the standard price in MBEW-ST