Dynamic binding of radiobutton's property inside table is possible ?

Hi,
As someone asked here, i am too lookig for sometime for code to bind dynamically 'keyToSelect' property of radiobutton(inside the table). someone please point out..
Thanks,
Hussian.

Hi,
Have you got one radio button in a column or more than one.
Please refer this post for my reply on same -
Re: How to bind 'keyToSelect' property of Radio button dynamically ?
Regards,
Lekha.

Similar Messages

  • Dynamic binding of items in sap.m.Table using XML views

    Dear SAPUI5 guru's,
    Let's start by saying I'm an ABAP developer who's exploring SAPUI5, so I'm still a rookie at the time of writing. I challenged myself by developing a simple UI5 app that shows information about my colleagues like name, a pic, address data and their skills. The app uses the sap.m library and most of the views are XML based which I prefer.
    The data is stored on an ABAP system and exposed via a gateway service. This service has 2 entities: Employee and Skill. Each employee can have 0..n skills and association/navigation between these 2 entities is set up correctly in the service. The data of this service is fetched from within the app using a sap.ui.model.odata.ODataModel model.
    The app uses the splitApp control which shows the list of employees on the left side (master view). If a user taps an employee, the corresponding details of the employee entity are shown on the right (detail view).
    Up till here everything is fine but I've been struggling with my latest requirement which is: show the skills of the selected employee in a separate XML view when the user performs an action (for the time being, I just created a button on the detail view to perform the action). After some hours I actually got it working but I doubt if my solution is the right way to go. And that's why I'm asking for your opinion here.
    Let's explain how I got things working. First of all I created a new XML view called 'Skills'. The content on this view is currently just a Table with 2 columns:
    <core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"
      controllerName="com.pyramid.Skills" xmlns:html="http://www.w3.org/1999/xhtml">
      <Page title="Skills"
           showNavButton="true"
           navButtonPress="handleNavButtonPress">
      <content>
      <Table
       id="skillsTable">
      <columns>
      <Column>
      <Label text="Name"/>
      </Column>
      <Column>
      <Label text="Rating"/>
      </Column>
      </columns>
      </Table>
      </content>
      </Page>
    </core:View>
    The button on the Detail view calls function showSkills:
    showSkills: function(evt) {
      var context = evt.getSource().getBindingContext();
      this.nav.to("Skills", context);
      var skillsController = this.nav.getView().app.getPage("Skills").getController();
      skillsController.updateTableBinding();
    Within 'this.nav.to("Skills", context);' I add the Skills view to the splitApp and set its bindingContext to the current binding context (e.g. "EmployeeSet('000001')"). Then I call function updateTableBinding in the controller of the Skills view which dynamically binds the items in the table based on the selected employee. So, when the ID of the selected employee is '000001', the path of the table's item binding should be "/EmployeeSet('000001')/Skills"
    updateTableBinding: function(){
      var oTemplate = new sap.m.ColumnListItem(
      {cells: [
              new sap.m.Text({text : "{Name}"}),
              new sap.m.Text({text : "{Rating}"})
      var oView = this.getView();
      var oTable = oView.byId("skillsTable");
      var oContext = oView.getBindingContext();
      var path = oContext.sPath + "/Skills";
      oTable.bindItems(path, oTemplate);
    Allthough it works fine, this is where I have my first doubt. Is this the correct way to bind the items? I tried to change the context that is passed to this.nav.to and wanted it to 'drill-down' one level, from Employee to Skills, but I couldn't manage to do that.
    I also tried to bind using the items aggregation of the table within the XML declaration (<Table id="skillsTable" items="{/EmployeeSet('000001')/Skills}">). This works fine if I hard-code the employee ID but off course this ID needs to be dynamic.
    Any better suggestions?
    The second doubt is about the template parameter passed to the bindItems method. This template is declared in the controller via javascript. But I'm using XML views! So why should I declare any content in javascript?? I tried to declare the template in the XML view itself by adding an items tag with a ColumnListItem that has an ID:
                    <items>
                        <ColumnListItem
                        id="defaultItem">
                        <cells>
                            <Text text="{Name}"/>
                            </cells>
                            <cells>
                            <Text text="{Rating}"/>
                            </cells>
                        </ColumnListItem>
                    </items>
    Then, in the updateTableBinding function, I fetched this control (by ID), and passed it as the template parameter to the bindItems method. In this case the table shows a few lines but they don't contain any data and their height is only like 1 mm! Does anyone know where this strange behaviour comes from or what I'm doing wrong?
    I hope I explained my doubts clearly enough. If not, let me know which additional info is required.
    Looking forward to your opinions/suggestions,
    Rudy Clement.

    Hi everybody,
    I found this post by searching for a dynamic binding for well acutally not the same situation but it's similar to it. I'm trying to do the following. I'm having a list where you can create an order. On the bottom of the page you'll find a button with which you're able to create another order. All the fields are set to the same data binding ... so the problem is if you've filled in the values for the first order and you'll press the button you'll get the same values in the second order. Is it possible to generate a dynamic binding?
    I'm going to post you a short code of what I'm meaning:
    <Input type="Text" value="{path: 'MyModel>/Order/0/Field1'}" id="field1">
         <layoutData>
                    <l:GridData span="L11 M7 S3"></l:GridData>
               </layoutData>
    </Input>
    As you can see I need to set the point of "0" to a dynamic number. Is there any possibility to reach this???
    Hope you can help
    Greetings
    Stef

  • Dynamic binding of items in sap.m.Table using JS views

    HI,
    I am developing a master detail page for a Purchase Order application. In master page, i display the list of Purchase Orders & on clicking the PO, i should display the detail page.
    We use different ODATA models for Master & detail page. I am able to successfully list the POs in master page & i am struggling on the part where i have to pass the selected PO number to the new ODATA service URL & then display the details in a table.
    Below is the code i use on TAP of Purchase order from master page:
    tap: function(oEvent)
          sap.ui.getCore().byId("PODetailstable_nodata_id").setVisible(false);
          var oContext=oEvent.getSource().getBindingContext();
          var odataModel_PO_detail = new sap.ui.model.odata.ODataModel(detailServiceUrl,false,  "dev_sde", "28aug@2013");
          odataModel_PO_detail.setCountSupported(false);
          var tappedPONumber= oContext.getProperty("PONumber");
          var path = "/POHeaderSet('"+tappedPONumber+"')/HDRtoITM";
          PO_DetailsPage.setBindingContext(oContext);
          sap.ui.getCore().byId("po_details_table_id").setModel(odataModel_PO_detail);
          sap.ui.getCore().byId("po_details_table_id").bindContext(path);
          sap.ui.getCore().byId("po_details_table_id").setVisible(true);
    And below is the code of my Detail page & the table: I set the bindcontext with new path at "tap" function in master page, i also do bindaggregation for the table with the new path.
    The issue is i am able to HIT the new service URL, but no data is displayed. There is also a demo application on the same, but w/o source code it doesnt help me much in resolving this issue.
    var PODetailstable_nodata = new sap.m.Table("PODetailstable_nodata_id",{title : "No Data"});
      var po_details_table =  new sap.m.Table("po_details_table_id", {
      inset: true,
             headerText: "table for Detail page",
             columns: [
                       new sap.m.Column({
                           header: new sap.m.Label({ text: "PO Number" })       }),
                       new sap.m.Column({ header: new sap.m.Label({ text: "Vendor" }) }),
                       new sap.m.Column({
                           header: new sap.m.Label({ text: "Vendor Name" })  }),
      var oTemplate = new sap.m.ColumnListItem({
                cells: [
                        new sap.m.Text({ text: "{PoNumber}" }),
                        new sap.m.Text({ text: "{Vendor}" }),
                        new sap.m.Text({ text: "{VendorName}"})
      po_details_table.bindAggregation("items", {
             path:"/POHeaderSet('"+"{PONumber}"+"')/HDRtoITM",
             template: oTemplate
      var PO_DetailsPage = new sap.m.Page("PO_DetailsPage_id",
      // title : "Purchase Order Details",
      title :  "{PoNumber}",
      content : [
               PODetailstable_nodata,
               po_details_table,
        footer : new sap.m.Bar
           contentRight: [
                          new sap.m.Button({
                          text : "Approve",
                          //press: oController.approve_pr,

    I have modified my code by referring another forum,
    on Tap, i now invoke a method from controller to update the binding i.e to pass the clicked PO number to the context.
    updateBinding: function(oEvent)
      alert("updatebinding");
      var detailServiceUrl = "http://incas1054.ind.cldsvc.accenture.com:8000/sap/opu/odata/sap/ZPURCHASE_PAY_SRV";
      var odataModel_PO_detail = new sap.ui.model.odata.ODataModel(detailServiceUrl,false,  "dev_sde", "28aug@2013");
      odataModel_PO_detail.setCountSupported(false);
      var tableView=sap.ui.getCore().byId("po_details_table_id");
      tableView.setModel(odataModel_PO_detail);
      alert(tableView.getModel());
      var oContext = tableView.getBindingContext();
      //tableView.bindContext("/POHeaderSet");
      alert(oContext);
      var path=  oContext.sPath + "/HDRtoITM";
      var oTemplate = new sap.m.ColumnListItem({
                cells: [
                        new sap.m.Text({ text: "{PoNumber}" }),
                        new sap.m.Text({ text: "{Vendor}" }),
                        new sap.m.Text({ text: "{VendorName}"})
      tableView.bindItems(path, oTemplate);
    Now, i see the PO number is set in the context, but i want to set a different context for details page as i hit different URL, Can anyone suggest on how to set a different context for details page & then pass the PO number from master to detail page?

  • Is dynamic binding of DB Control to a data source possible?

    Hi,
    To my understanding every DB Control gets bound to a Data source.
    I have 16 different DB instances (on 16 Different machines) running. The one I should contact is determined at runtime.
    Should I use 16 different DB Controls to access the machines, or is there a way I can configure my DB Control to bind to a data source at runtime?

    Hi,
    The regular way of doing this is to keep the name of the datasource constant and using the admin console point this DS to different connection pools depending on the DB to access. This works if we assume the DB to connect to does not vary to frequently.
    Programmatically I do not see any ways of setting the DS on a control.
    - Anders M.

  • Dynamic binding for table column

    Hi,
    I am using standard application and in a table (not ALV) i want to chnage the name of a column. Already a OTR is placed in it so am planning to do a dynamic bind for the text in the header. Kindly suggest ways.
    Thanks,
    Koushik

    DATA:
            l_caption          TYPE string,
            l_title            TYPE string.
      data lr_caption type ref to cl_wd_caption.
    *---Get OTR Text for Value Description
      CALL METHOD cl_wd_utilities=>get_otr_text_by_alias
        EXPORTING
          alias      = 'ZPERF_MGMT_DEV/RATING'
      language   =
        RECEIVING
          alias_text = l_title.
    lr_caption ?= view->get_element( 'TBL_VAL_HELP_DESCRIPTION_HEADER' ).
    lr_caption->set_text( value = l_title ).

  • Dynamic addition of a column to a table

    Hi All,
    I need to add one column dynamically to the existing table and also I have to populate the data dynamically. Can you help me out in this? Thanks in advance.
    Message was edited by:
            Bharath Akuthota

    Either create it a design-time invisible and make it visible if needed (probably more simply than by code), or use some code like this:
    wdDoModifyView(...)
      if (<table structure changed>)
        IWDTable table = (IWDTable) view.getElement("TableID");
        IWDTableColumn col = (IWDTableColumn) view.createElement(IWDTableColumn.class, null);
        table.addColumn(col); // NW04
        table.addGroupedColumn(col); // NW 7.0
        IWDInputField editor = (IWDInputField) view.createElement(IWDInputField.class, null);
        col.setTableCellEditor(editor);
        editor.bindValue(<attribute inside table data source that should be edited>);
    Armin

  • Pages '09: Can't use AppleScript for selected text inside tables?

    When I run get selection on selected text in a Pages document, I get something like this:
    <pre>text from character 1 to character 4 of body text of document id 9943974 of application "Pages"</pre>
    When I run get selection on selected text inside a table cell in a table in a Pages document, I get something like this:
    <pre>text from character 1 to character 4 of some table of document id 3539679 of application "Pages"</pre>
    When I run get selection on selected text inside a table cell in ANOTHER table in the same Pages document, I get the exact same thing. It still says "some" table. So there is no way to distinguish between tables if there are more than one table in the same Pages document.
    Am I correct in understanding that this means that most AppleScript commands for manipulating text are unusable inside table cells?
    For example, it seems impossible to get the properties of the selection when the selection is selected text inside "some" table. So it's impossible do anything about text styles, etc.
    Is AppleScript support in Pages ’09 really that limited, or am I missing something?

    The first script below should return the character style of any selection made in Pages ’09, whereas the second script should apply the "XXX" character style to any selection:
    --BEGINNING OF SCRIPT 1
    tell application "Pages"
    activate
    tell application "System Events" to tell process "Pages"
    -- Show the format bar:
    if not (pop up button 1 of window 1 exists) then
    click menu item "Show Format Bar" of menu 1 of menu bar item "View" of menu bar 1
    end if
    -- Show the styles drawer and character styles:
    if menu item "Show Styles Drawer" of menu 1 of menu bar item "View" of menu bar 1 exists then
    keystroke "t" using {shift down, command down}
    end if
    tell front window
    tell checkbox 1 of group 1 of drawer 1 -- “Show or hide character styles.” checkbox
    repeat until it exists
    delay 0.1 -- wait until the styles drawer is open
    end repeat
    if description is "show character style" then click
    end tell
    -- Get the row index (although it is not a property) of the character style:
    tell menu button 2 -- “Choose a character style.” menu button
    click
    set k to 0
    repeat
    set k to k + 1
    if value of attribute "AXMenuItemMarkChar" of menu item k of menu 1 exists then exit repeat
    end repeat
    keystroke return -- hide the menu
    end tell
    -- Get the character style name:
    if k > 1 then set k to k + 1
    value of static text 1 of row k of outline 1 of scroll area 2 of splitter group 1 of group 1 of drawer 1
    end tell
    end tell
    end tell
    --END OF SCRIPT 1
    --BEGINNING OF SCRIPT 2
    set myStyle to "XXX" -- the name of the character style you want to apply
    tell application "Pages"
    activate
    tell application "System Events" to tell process "Pages"
    -- Show the format bar:
    if not (pop up button 1 of window 1 exists) then
    click menu item "Show Format Bar" of menu 1 of menu bar item "View" of menu bar 1
    end if
    -- Show the styles drawer and character styles:
    if menu item "Show Styles Drawer" of menu 1 of menu bar item "View" of menu bar 1 exists then
    keystroke "t" using {shift down, command down}
    end if
    tell front window
    tell checkbox 1 of group 1 of drawer 1 -- “Show or hide character styles.” checkbox
    repeat until it exists
    delay 0.1 -- wait until the styles drawer is open
    end repeat
    if description is "show character style" then click
    end tell
    set characterStyles to value of static text 1 of rows of outline 1 of scroll area 2 of splitter group 1 of group 1 of drawer 1
    set k to 0
    repeat with thisStyle in the characterStyles
    set k to k + 1
    if thisStyle as text is myStyle then exit repeat
    end repeat
    -- Apply the character style:
    if k > 1 then set k to k - 1
    click menu button 2 -- “Choose a character style.” menu button
    click menu item k of menu 1 of menu button 2
    end tell
    end tell
    end tell
    --END OF SCRIPT 2
    I suppose that +paragraph styles+ should work the same.
    I'm beginning to know Pages ’09 a little better now.
    Message was edited by: Pierre L. (show format bar)

  • BUG: CheckBox colum inside table (ADF 11.1.2.1)

    I find a bug using CheckBox inside table, this are steps to get the bug.
    1.Create a view object from database table.
    2.Create a where clause in view Object
    3.Create a parameter form (using where clause)
    4.Create a editable table with filter enable
    -- AFTER TEST, ALL WORK
    5. Convert inputText to af:selectBooleanCheckbox
    -- AFTER TEST GET THIS ERROR:
    1- FIlter adf tabla and data is ok.
    2- Apply a filter using parameter form and same time adf:table filter. (Data is not well.)
    As I say this happend only when i change my inputText to af:selectBooleanCheckbox.
    With inputText work well, with booleanCheacBox work bad..
    Someone know if this was fix in 11.1.2.2 ??

    My attribute is not boolean but I fix it in viewRowImplementation accesor:
      public String getProgramada() {
            String dbValue= (String) getAttributeInternal(PROGRAMADA);
            if("S".equals(dbValue))
                retreturn  "true";
            else
                return  "false";       
    public void setProgramada(String value) {
            String valorSeleccionado = null;
            if("true".equals(value))
                valorSeleccionado = "S";
            else
                valorSeleccionado = "N";       
            setAttributeInternal(PROGRAMADA, valorSeleccionado);
        }Seems that change was the problem.. this code work bat generate the BUG i post here.
    SOLUTION:
    1. Revert the viewRowImpl to default accesor.
    2. Modify page definition in tis way using idea from Vinay Agarwal
    <tree IterBinding="VSiriusCorreriasUsuView1Iterator" id="VSiriusCorreriasUsuView1">
          <nodeDefinition DefName="modelo.vistas.VSiriusCorreriasUsuView" Name="VSiriusCorreriasUsuView10">
            <AttrNames>
              <Item Value="Correria"/>
              <Item Value="Descripcion"/>
              <Item Value="Instleer"/>
              <Item Value="Descargadas"/>
              <Item Value="Ejecutadas"/>
              <Item Value="Codusuario"/>
              <Item Value="Codterminal"/>
              <Item Value="Placaveh"/>
              <Item Value="Fechaprog"/>
              <Item Value="Programada" Binds="Programada"/>
            </AttrNames>
          </nodeDefinition>
        </tree>
    <button IterBinding="VSiriusCorreriasUsuView1Iterator" id="Programada" DTSupportsMRU="false" StaticList="true">
          <AttrNames>
            <Item Value="Programada"/>
          </AttrNames>
          <ValueList>
            <Item Value="S"/>
            <Item Value="N"/>
          </ValueList>
        </button>And everything Seems to work Well. Seems to be more easy than add code to accesors in viewRowImpl and work better.
    My checkbox value is get from tree component:
    <af:selectBooleanCheckbox value="#{row.bindings.Programada.inputValue}"
                                                 shortDesc="#{bindings.VSiriusCorreriasUsuView1.hints.Programada.tooltip}"
                                                 id="it7" label="#{bindings.Programada.label}" simple="true" autoSubmit="true">
    </af:selectBooleanCheckbox>

  • Dynamically binding VO Parameter from Context Switcher

    Hi guys,
    I am using ADF JSF and BC, and I have a situation here which is:
    1) My JSF page has a panel page component, inside it is a navigable form referencing a View Object.
    2) In the contextSwitcher facet of this PanelPage, i have a SelectInputText which points to a "Globals" VO, having only one row ever (similar to SRDemo)
    3) When the LOV returns value to this field, i must re-bind the navigable form VO Query to this value, and the form must show the first record of the NEW rowset.
    The solution i am writing uses a ValueChangeListener on the SelectInputText, which runs an Application Module method that gets the value from the Globals VO and re-runs the query using "vo.setWhereClause" and "vo.executeQuery".
    However, even though i debug the application and see the query being executed, the form shows strange behavior, as the page then re-runs the query, but swaps the first row of the new rowset with the row currently displayed. For example, suppose that i am seeing row "X" on the page and select a value from the LOV. The new execution fetches rows "Y" and "Z" from DB. When i scroll the page, i see that the first record is "X" again, followed by "Z"!
    Do you have any idea of what could be the problem? Maybe a form clearance issue with ADF? Or i shouldn't be using dynamic binding with UPDATEABLE fields on the page, only when i use READ-ONLY fields?
    Thanks a lot, and regards!
    Thiago

    Thiago,
    you are not showing any of your code and I can only assume that this is a coding problem of yours.
    Frank

  • How to iterator inputtext inside table

    hi i have situation where i have table inside a table i have inputtext which got emailaddress how can i iterator in order to return that email
    this is my table
    <af:table value="#{bindings.DeltMember1.collectionModel}"
                              var="row" rows="#{bindings.DeltMember1.rangeSize}"
                              emptyText="#{bindings.DeltMember1.viewable ? 'No data to display.' : 'Access Denied.'}"
                              fetchSize="#{bindings.DeltMember1.rangeSize}"
                              rowBandingInterval="0"
                              selectedRowKeys="#{bindings.DeltMember1.collectionModel.selectedRow}"
                              selectionListener="#{bindings.DeltMember1.collectionModel.makeCurrent}"
                              rowSelection="single" id="t5" width="1155"
                              partialTriggers="cb9" columnStretching="last"
                              inlineStyle="height:134px;">
                      <af:column sortProperty="Username" sortable="false"
                                 headerText="#{bindings.DeltMember1.hints.Username.label}"
                                 id="c15">
                        <af:inputText value="#{row.bindings.Username.inputValue}"
                                      label="#{bindings.DeltMember1.hints.Username.label}"
                                      required="#{bindings.DeltMember1.hints.Username.mandatory}"
                                      columns="#{bindings.DeltMember1.hints.Username.displayWidth}"
                                      maximumLength="#{bindings.DeltMember1.hints.Username.precision}"
                                      shortDesc="#{bindings.DeltMember1.hints.Username.tooltip}"
                                      id="it6">
                          <f:validator binding="#{row.bindings.Username.validator}"/>
                        </af:inputText>
                      </af:column>
                      <af:column sortProperty="Firstname" sortable="false"
                                 headerText="#{bindings.DeltMember1.hints.Firstname.label}"
                                 id="c14">
                        <af:inputText value="#{row.bindings.Firstname.inputValue}"
                                      label="#{bindings.DeltMember1.hints.Firstname.label}"
                                      required="#{bindings.DeltMember1.hints.Firstname.mandatory}"
                                      columns="#{bindings.DeltMember1.hints.Firstname.displayWidth}"
                                      maximumLength="#{bindings.DeltMember1.hints.Firstname.precision}"
                                      shortDesc="#{bindings.DeltMember1.hints.Firstname.tooltip}"
                                      id="it11">
                          <f:validator binding="#{row.bindings.Firstname.validator}"/>
                        </af:inputText>
                      </af:column>
                      <af:column sortProperty="Surname" sortable="false"
                                 headerText="#{bindings.DeltMember1.hints.Surname.label}"
                                 id="c13">
                        <af:inputText value="#{row.bindings.Surname.inputValue}"
                                      label="#{bindings.DeltMember1.hints.Surname.label}"
                                      required="#{bindings.DeltMember1.hints.Surname.mandatory}"
                                      columns="#{bindings.DeltMember1.hints.Surname.displayWidth}"
                                      maximumLength="#{bindings.DeltMember1.hints.Surname.precision}"
                                      shortDesc="#{bindings.DeltMember1.hints.Surname.tooltip}"
                                      id="it7">
                          <f:validator binding="#{row.bindings.Surname.validator}"/>
                        </af:inputText>
                      </af:column>
                      <af:column headerText="#{bindings.DeltMember1.hints.Emailaddress.label}"
                                 id="c18">
                        <af:outputText value="#{row.Emailaddress}" id="ot6"/>
                      </af:column>
                      <af:column id="c17">
                        <af:panelGroupLayout id="pgl6">
                          <af:panelFormLayout id="pfl8" rows="1" maxColumns="2">
                            <af:commandButton actionListener="#{bindings.Delete1.execute}"
                                              text="Remove" id="cb9">
                              <af:setActionListener from="{true}"
                                                    to="#{pageFlowScope.addMember.deleteAction}"/>
                            </af:commandButton>
                          </af:panelFormLayout>
                        </af:panelGroupLayout>
                      </af:column>
                    </af:table>
    something like this
        public String getCountry(){
            DCIteratorBinding it = ADFUtil.findIterator("IntUsr1Iterator");
           RowSetIterator rsi = it.getRowSetIterator();
             Row rw =   rsi.first();
             testusername = (String)rw.getAttribute("Countrycode");
            return testusername;      
    but my problem is the details are inside table not inputtextEdited by: adf009 on 2013/05/28 3:35 PM

    but the value is inside table column,
    what must i iterator
    DCIteratorBinding it = ADFUtil.findIterator("IntUsr1Iterator");
    <af:column headerText="#{bindings.DeltMember1.hints.Emailaddress.label}"
                                 id="c18">
                        <af:outputText value="#{row.Emailaddress}" id="ot6"/>
                      </af:column>
    pagedef of table
    <tree IterBinding="DeltMember1Iterator" id="DeltMember1">
          <nodeDefinition DefName="uam.model.UpdOrgDetails.DeltMember"
                          Name="DeltMember10">
            <AttrNames>
              <Item Value="Username"/>
              <Item Value="Firstname"/>
              <Item Value="Surname"/>
              <Item Value="Emailaddress"/>
            </AttrNames>
          </nodeDefinition>
        </tree>Edited by: adf009 on 2013/05/28 5:00 PM
    Edited by: adf009 on 2013/05/28 5:01 PM

  • Howto dynamicly bind XML element to a TextInput using BindingUtils?

    The question is: Howto dynamicly bind XML element to a
    TextInput component using BindingUtils?
    Now I use following codes:
    <!--
    [Bindable] private var xml: XML =
    <item><label>list1</label></item>;
    // initialize code for application's initialize event
    private function init(): void {
    BindingUtils.bindProperty(txtDemo, "text", xml, "label");
    //click event
    private function test(): void {
    xml.label = "something";
    // txtDemo.executeBindings(); //---- no use anymore
    -->
    <mx:TextInput id="txtDemo"/>
    <mx:Button label="Test" click="test()"/>
    My really idea is when bindable xml property is changed, then
    the textinput will be updated as hoped. However, no update happens
    to me when I click the Test button.
    But, if I make codes like that:
    <mx: TextInput id="txtDemo" text="{xml.label}"/>
    the text will updated when xml changs.
    So, what happened, I indeed need the dynamicly bind to the
    textinput compont.
    Help me. thanks.

    You could use an ObjectProxy since all subproperties will
    then be bindable:
    private var _xml:XML =
    <item><label>list1</label></item>;
    private var _opXML:ObjectProxy = new ObjectProxy(_xml);
    then in your init() function you declare _opXML as the host
    object with the bindable property "label"...
    // initialize code for application's initialize event
    public function init(): void {
    BindingUtils.bindProperty(txtDemo, "text", _opXML, "label");
    //click event
    private function test(): void {
    _opXML.label = "something";
    You'll notice that if you check your original _xml.label
    property with ChangeWatcher.canWatch(), it returns false. But if
    you create a dedicated object with a property that can be declared
    as bindable, canWatch() returns true. You'd probably be best off to
    write a lightweight class that can act as your model if you want to
    work with dynamic XML binding using Actionscript. This will allow
    you to use a bindable getter and setter that will give you the
    dynamic functionality you're looking for.
    Hope that helps.

  • How dynamic binding implemented?

    for exmaple
    abstract class SuperClass{
          abstract void do() {}
          class SubClass1 extends SuperClass{
          void do(){//do method implemented}
          class SubClass2 extends SuperClass{
          void do(){//do method another implemented}
          SuperClass[] array = new SuperClass[2];
               array[0] = new SubClass1();
               array[1] = new SubClass2();
               array[0].do();
               array[1].do();
    I want to know how the compiler deal with "array" during compiling time,
    and how the dynamic "do()" method was found during runing time?

    You can get some hints by studying the bytecodeof
    your example.
    Generally dynamic binding is implemented using
    indirect calls via "jump tables". Binding means
    filling in the jump tables with the startaddresses
    of
    the methods as soon as they're available.~~~~~~~~~ this mean when instantiated?
    Actually I took it to mean when the class is loaded.
    Actually as soon as they are needed which isslightly
    different. ~~~~~~~ this mean when the method invoked?Basically yes.

  • File Upload UI element is not working properly inside Table Popin container

    Hi Expert,
    I created a table with popin, i placed file-upload UI element inside table popin contatiner.
    The file upload UI element is displaying properly but, when i click the browse button to select  the file, the file open dialog box is not popping out.
    will table popin support file-upload UI element inside it?
    it not is there any other way to call a file_open dialog box from inside the table popin.
    Thanks,
    James

    If you are on NetWeaver 7.01, you can try both the ACFUpDownload UI element or try creating your own FileUpload in Adobe Flex with Flash Islands.  ACFUpDownload requires the KPRO by default (which is why the same application isn't working for you), but you can write your own handler class to act as the KPRO receiver.  Here is an eLearning on the topic:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/109b9b52-bc00-2c10-8786-e4c5e96d7e04
    and source code:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70645070-bb00-2c10-f086-f126721acdb4
    If you want an eLearning on the FlashIslands approach, you can find it here as well:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50d42644-91ef-2b10-228c-9e0ae75b274e
    and Source Code:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f044b62c-90ef-2b10-64a6-9ec25294d133
    However in both of these approaches you still have to be careful with how you handle large files.  The problem is that they are processed often a single binary string.  This makes the processing easy, but requires total amount of session memory at least as large as the file being uploaded.  In NetWeaver 7.02 ABAP adds the concept of Streams and Locators to help with the partial processing of large files.  This feature doesn't come until later this year, but if you are interested you can learn about it here:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80f983df-213e-2c10-ba89-b5a12ef178e8

  • How to assign a dynamic value to the value property of a button ?

    Hi Folks,
    I have a need, can i know how to assign a dynamic value to the value property of a button. Scenario is like follows...
    This is a struts based web application
    1. I have a file which consists of login user details (user name and his previlages) for a web application.
    2. I got those user details, into a List.
    3. When a user logged into the web app, in the home page there are few buttons. The type and number of buttons shown depends on the type of user/ user. (Buttons have different combination and the number of buttons available are not constant, they will vary from user to user).
    4. for each button, there will be a different action. I can pass the value of a button to an action class, but here button must have a dynamic value.
    Here is my test code:
    <%
    if (List != null)
    for (int i = 0; i <List.length; i++)
    %>
    <html:submit property="rduname" value= "<%=List%>" onclick="return submitRdu('<%=List[i] %>');"/>
    <%
    %>
    But my problem is how to assign a dynamic value to the value property of the button ( i know 'value= "<%=List[i]%>" ' will not work, just wanted show you guys).
    Thanks in advance,
    UV
    Edited by: UV_Dev on Oct 9, 2008 2:15 PM

    Let me try i know am not good at JSP but do we need double quotes here
    value= <%=List%>i think JSTL should help you about the dynamic thing                                                                                                                                                                                                                                                                                                                       

  • Dynamic binding doubt

    i have a a class (say class1) whi uses another class (say class 2) in class i have a public field which class 2 is accessing now i have changed class 2 such that that field is no more public & compiled , now class 1 is actually accessing a private field but it does not show any error , also i found out from some where that java -verify option will inform you that you have to compile class cos class 2 is already changed .so question is why it does not throw any run time exception why -verify option is not doccumented

    This doesn't have anything to do with dynamic binding.
    This allows you to compile one class without
    recompiling every dependent class. At runtime, when
    the other classes try to access those variables you
    should get an error.And if you're not getting the error (like your post seems to indicate), then you're probably not really using that version (with the now-private field) of the compiled class at run-time, but rather the old one because you goofed your classpath.

Maybe you are looking for

  • Change BG color of Panel using script (AS3)

    Dear, all I am a newbies in Flex. Now I have some trouble with thw sample thing. That is how can I change BackgroungColor of panel using script(AS3) I can do it by mxml BUT!! I really need to change it using AS3. Does you know what should I do NEXT.

  • Upgrade macbook pro Snow leopard v 10.6.8??

    i want to upgrade my Macbook pro (10.6.8.) when the new Mountain Lion is released. My question is : Can i do it, without having to go to the 10.7x version, and if i do it, will i lose all my applications , like Iwork? and is the IWORK for free or u h

  • Format XMl to be read in a text editor.

    Hi, I'm using ixml functions to create an xml file. Each element of my document is created using : <cl_xml_document> ->create_simple_element I then export it to a file with : <cl_xml_document>->export_to_file When the created file is opened with an x

  • Adobe Reader Freeze Problem!!!

    Why does a pdf document freeze everytime I open a it with adobe reader?

  • SAP FS-CD Interface!!

    Hi All, Does any one of you have designed interfaces involving SAP FS -CD modules(Insurance related) ? (Idoc , Payment specific or any) Thanks for your help!! Thanks, Pushkar Patel