Problem with binding  sequences to attributes

Hello everyone.
[you may directly jump to the question at the bottom of this post and if you don't understand what the heck I'm asking, feel free to read the whole post ;)]
I wanted to crate a table node where several attributes are for rows only.
Because i want it to be a CustomNode, the table should be created dynamically (one should at least be able to define different amounts of rows and columns at the initialization).
My problem is a combination of "creating dynamically" and binding attributes.
To create an arbitrary amount of rows i use a "while(i < x) CustomNode{}" loop.
To store the value of an attribute for a row i use sequences. So during the loop i do the following:
someValue: bind sequenceValue[i]
After quite some frustration i finally discovered that all the attributes will be bound to sequenceValue[last value of i].
I don't find the right words right now, so here's some code to demonstrate the problem:
package javafxtestbench;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.scene.CustomNode;
import javafx.scene.Node;
import javafx.scene.Group;
import javafx.scene.input.KeyEvent;
var t1 = [true, true, false];
Stage {
    title: "Application title"
    width: 250
    height: 500
    scene: Scene {
        content: [
            Text {
                font : Font {
                    size : 16
                x: 10
                y: 30
                content: "Application content"
            createFubar(),
function createFubar(): Group{
    var grp : Group = Group{
        content:[         
            //this works
            /*b1{ blob: bind t1[0]}
            b1{ blob: bind t1[1]}
            b1{ blob: bind t1[2]}*/
            //this doesnt
            createSomeBs(),
        onKeyPressed: function( e: KeyEvent ):Void {
            println("=== KeyPressed ===");
            if (t1[2] == true) t1[2] = false
            else t1[2] = true;
            println("new sequence value: {t1}");
    grp.requestFocus();
    return grp;
function createSomeBs(): Node[]{
    var i = 0;
    var grp : Node[];
    while(i < 3){
        insert b1{
            blob: bind t1[i]
        }into grp;
        i++;
    println("Sequence @ startup: {t1}");
    return grp;
class b1 extends CustomNode{
    public var blob = true on replace{
                println("attribute value b1.blob: {blob}");
    override function create():Node{
        Group{
}As you can see i created a CustomNode (b1) and use two different methods to add it to the scene.
First method: i add b1 thee times to the scene and set the attribute
or
2nd method: i use a loop (its index to bind the corresponding sequence entries to the attributes)
finally i added a key listener, which changes the value of the last sequence value if an arbitrary key has been hit.
output for using the "this works" block (1st method) after pressing some keys:
=== KeyPressed ===
attribute value b1.blob: true
new sequence value: truetruetrue  //contains {true, true, true}
=== KeyPressed ===
attribute value b1.blob: false
new sequence value: truetruefalse  //contains {true, true, false}and here for the "this doesnt" (2nd method) part:
=== KeyPressed ===
attribute value b1.blob: false
attribute value b1.blob: false
attribute value b1.blob: false
new sequence value: truetruetrueSo even though all elements in the sequence say "true", the attribute values of all CustomNodes will keep saying "false".
Here it's due to the fact that "i" is in the end greater than the sequence (cause by the increment at the end of the loop).
In the end all attributes will be bound to the same entry. So messing around with the index, so it doesn't get beyond the sequence size, won't help.
So to finally bring this post to an end ;P, here's my question:
How do you create an arbitrary amount of Nodes containing attributes which are bound to a list entries?
Edited by: Mr._Moe on 08.09.2009 20:17

HI
  May be  you can fetch the data from the table with  looping the table size  and catching the
index of the elements .  To be more clear .
  1 . get the size of the table .
int leadSelection=  wdcontext.node<TableName>.getLeadSelection();
    for (int i=0 ;i<n;i++)
      if(wdcontext.node<tablename>.isMultiselected(leadSelection))
        String name = wdcontext.node<tablename>.getelementatindex(leadSelection).getname();
         similarly fetch the size of the other elements from the table .
    and set to other RFC as
        ZClass  abc = new ZClass();
         abc.setName(name);
wdcontext.node<NameName>.bind(abc);
and othere thing is when  you use Abstract class you can insert only one element at a time .
or may be you may want to set the values direclty to the RFC
       AbstractList  lst = new  ZClass.ZClassList();
       ZClass cls = new ZClass();
        clas.setName(name)
  lst.add(class);
wdcontext.currentRFcNameElement.modelObject.setName(lst);
and
execute the RFC .
murali

Similar Messages

  • Problem with binding in rich:tabPanel

    I have the problem with binding in rich component. In the first request the tabPanel work fine, but in the second request the component is not displayed. When i remove binding="#{organizationController.tabPanel}" everything works well. Anybody can help me? thanks.
    <rich:tabPanel style="height : 63px; width:auto; border:0px;" id="panelOrganizationForm" binding="#{organizationController.tabPanel}" >
    <rich:tab label="Dados da organizacao" id="tab1">
                   <h:panelGrid columns="2" id="panelGridOrganizationForm">
         <h:outputText value="Id: " id="idlabel"/>
         <h:inputText value="#{organizationController.organization.organizationId}" styleClass="input" id="organizationId" required="true"/>
         <h:outputText value="Nome: " id="nameLabel"/>
         <h:inputText size="60" value="#{organizationController.organization.organizationName}"
         styleClass="input" id="organizationName"/>
         </h:panelGrid>
         </rich:tab>
    </rich:tabPanel>
    <a4j:commandButton value="Voltar" action="back" id="bot" immediate="true"/>

    Guys
    Thanks a lot, both of your replies are immensely instructive. Maybe a little background on what I'm trying to do. In the table, I have header rows with dependent line rows. When a check box is ticked in the header, I want the corresponding check boxes in the dependent lines to be checked automatically (in slave fashion and ideally without using JavaScript). My idea was to update the bound components (for the lines) from within the Bean (in response to change on the header). However, given there's only a single component for each column in the table, this of course doesn't make sense.
    I'm trying to get to the typical MVC workflow of a) user updates a View component, b) Controller detects the change and updates the Model, c) The Model fires a property change event, which the View detects and updates appropriately. What's the way to achieve this in JSF (by design)?
    Here's a simple fragment (which does not work):
            <h:dataTable value="#{bean.lines}" var="line">
              <h:column>
                <h:outputText value="#{line.id}"/>
              </h:column>
              <h:column>
                <!-- (1) This is the master and (2) should refresh on update here --/>
                <h:selectBooleanCheckbox onchange="submit()" value="#{line.lineSelected}"/>
              </h:column>
              <h:column>
                <!-- (2) This is the slave and I want this to update in response to a change of (1) above --/>
                <h:selectBooleanCheckbox value="#{line.slaveSelected}"/>
              </h:column>
            </h:dataTable>In the setter method for lineSelected, I'm setting slaveSelected to the new value but the View is not refreshing based on this. How do I get the View to update (each dependent line) based on the new values for slaveSelected?
    Thanks again
    Lance

  • Problem with binding in h:dataTable

    Hi
    I have a problem with h:dataTable, where the table rows are bound to objects (Bean$Line) nested within a backing bean (Bean).
    JSP:
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <html>
      <f:view>
        <head>
          <link href="styles.css" rel="stylesheet" type="text/css"/>
          <title>Sandbox</title>
        </head>
        <body>
          <h:form>
            <h:dataTable value="#{bean.lines}" var="line">
              <h:column>
                <h:outputText value="#{line.id}"/>
              </h:column>
              <h:column>
                <!-- using value = line.lineSelected here works (assuming boolean property Line.lineSelected) --/>
                <h:selectBooleanCheckbox binding="#{line.lineSelected}"/>
              </h:column>
            </h:dataTable>
          </h:form>
        </body>
      </f:view>
    </html>Bean:
    package com.test;
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.component.UISelectBoolean;
    public final class Bean {
      private final List<Line> lines;
      public Bean() {
        lines = new ArrayList<Line>();
        lines.add(new Line("one"));
        lines.add(new Line("two"));
        lines.add(new Line("three"));
      public List<Line> getLines() {
        return lines;
       * Nested class in order to access containing class
       * properties etc.
      public static class Line {
        //private boolean lineSelected = false;
        private UISelectBoolean lineSelected;
        private String id;
        public Line(String id) {
          this.id = id;
        /*public boolean isLineSelected() {
          return lineSelected;
        public void setLineSelected(boolean lineSelected) {
          this.lineSelected = lineSelected;
        public UISelectBoolean getLineSelected() {
          return lineSelected;
        public void setLineSelected(UISelectBoolean lineSelected) {
          this.lineSelected = lineSelected;
        public String getId() {
          return id;
        public void setId(String id) {
          this.id = id;
      } // Line
    }The setup works when I use value="#{line.lineSelected}" (assuming the property is defined as boolean in Bean$Line) but as soon as I use a binding, I get the following exception:
    com.sun.rave.web.ui.appbase.ApplicationException: javax.servlet.ServletException: javax.el.PropertyNotFoundException: Target Unreachable, identifier 'line' resolved to null
    at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:594)
    at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:325)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
    faces_config:
    <faces-config version="1.2"
                  xmlns="http://java.sun.com/xml/ns/javaee"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
      <application>
        <locale-config>
          <default-locale>en_GB</default-locale>
          <supported-locale>en_GB</supported-locale>     
        </locale-config>
      </application>
      <managed-bean>
        <managed-bean-name>bean</managed-bean-name>
        <managed-bean-class>com.test.Bean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>
    </faces-config>What am I missing here?
    Help much appreciated
    Lance

    Guys
    Thanks a lot, both of your replies are immensely instructive. Maybe a little background on what I'm trying to do. In the table, I have header rows with dependent line rows. When a check box is ticked in the header, I want the corresponding check boxes in the dependent lines to be checked automatically (in slave fashion and ideally without using JavaScript). My idea was to update the bound components (for the lines) from within the Bean (in response to change on the header). However, given there's only a single component for each column in the table, this of course doesn't make sense.
    I'm trying to get to the typical MVC workflow of a) user updates a View component, b) Controller detects the change and updates the Model, c) The Model fires a property change event, which the View detects and updates appropriately. What's the way to achieve this in JSF (by design)?
    Here's a simple fragment (which does not work):
            <h:dataTable value="#{bean.lines}" var="line">
              <h:column>
                <h:outputText value="#{line.id}"/>
              </h:column>
              <h:column>
                <!-- (1) This is the master and (2) should refresh on update here --/>
                <h:selectBooleanCheckbox onchange="submit()" value="#{line.lineSelected}"/>
              </h:column>
              <h:column>
                <!-- (2) This is the slave and I want this to update in response to a change of (1) above --/>
                <h:selectBooleanCheckbox value="#{line.slaveSelected}"/>
              </h:column>
            </h:dataTable>In the setter method for lineSelected, I'm setting slaveSelected to the new value but the View is not refreshing based on this. How do I get the View to update (each dependent line) based on the new values for slaveSelected?
    Thanks again
    Lance

  • Problem with a sequence

    Hello all,
    I have a problem with a basic sequence: it starts with 2 and y define "start with 1".
    Basic steps that I perform:
    1.- Create the sequence:
    CREATE SEQUENCE sec_empleado START WITH 1 NOCACHE ORDER; ------ also tried others configurations, (wiithout nocache order)
    2.- create table cliente
    SQL> CREATE TABLE CLIENTE (
    2 codigo_cliente NUMBER NOT NULL PRIMARY KEY ,
    3 nombre VARCHAR2(20) NOT NULL,
    4 apellido1 VARCHAR2(20) NOT NULL,
    5 apellido2 VARCHAR2(20) NULL,
    6 codigo_entidad NUMBER NOT NULL,
    7 dni NUMBER NOT NULL,
    8 letra_dni VARCHAR2(1) NOT NULL,
    9 fecha_nac DATE NOT NULL,
    10 domicilio VARCHAR2(30) NOT NULL,
    11 poblacion VARCHAR2(30) NOT NULL,
    12 codigo_postal NUMBER NULL,
    13 codigo_provincia NUMBER NULL
    14 );
    Table created.
    3.- insert a record:
    INSERT INTO CLIENTE VALUES (sec_cliente.nextval,'Nombre001','Apellido_1_1.........................);
    4.- check the table:
    select * from cliente;
    CODIGO_CLIENTE NOMBRE APELLIDO1 APELLIDO2 CODIGO_ENTIDAD .............................
    2 Nombre001 Apellido_1_1 Apellido_2_1 8765
    I can´t understand why it assigns the value 2 instead 1 to the first row.
    I know it looks really stupid, but i dont understand this behaivour.
    PS: Oracle RAC 11.2 database
    Thanks a lot
    Edited by: user3313344 on 14-Apr-2010 11:22
    Edited by: user3313344 on 14-Apr-2010 11:23

    Hi,
    it is normal behaviour, see also http://www.freelists.org/post/oracle-l/anyone-seen-this-weirdness-with-sequences-in-11gr2,6
    It is described in Metalink document 1050193.1 for 11.2.
    Herald ten Dam
    Superconsult.nl

  • DNP3: Problem with Send Poll Device Attribute Vi - Group 0

    We are using the Labview DNP3 library to test our DNP3 slave. When the DNP3 master (Labview) sends group 0 variation 248, to get the serial number (using the Send Poll
    Device attribute Vi), LabView is using qualifier code 6, instead of 0, which is incorrect. See DNP3 spec (IEEE 1815-2012) page 364.
    Is there a problem with the Vi or anything we can do the make it to send qualifier code 0?
    Thanks.

    Hi,
    I tried to reproduce it with two kinds of masters available by my side - TMW's DNP3 master and VI master, using the first to poll all attributes and using the latter to poll two attributes (product name and serial number) from a VI client, and with both TWM's built-in packet capturer and Wireshark, I found the the qualifier code for serial number is 0x0, instead of 0x6, as shown in the attached screenshots. So I think there is no error in this.
    I use DNP2.1 for the test.
    Attachments:
    dnp3 SN.JPG ‏169 KB
    dnp3 SN wireshark.JPG ‏146 KB

  • Problem with Bind Variable in 11.2

    Hi
    I have a slow statement with bind Variables. With literals it works fine. Is there a way to replace the bind by literal in advanced ? I use Release 11.2.0.2.3
    Thank you

    904062 wrote:
    I have a slow statement with bind Variables. With literals it works fine. Is there a way to replace the bind by literal in advanced ? I use Release 11.2.0.2.3This specific scenario is very much an exception to the rule - and you need to back your statement up with execution plans of the SQL with bind variables and with literals, and run stats that show the difference between these two execution plans.
    See the {message:id=9360003} from the {forum:id=75} forum's FAQ for details on how to post a SQL performance tuning question.

  • BAM: Problem with 'Binding' while creating event linkage

    Hello colleagues.
    We have an ECC 6.0  and a PI 7.1 system. I want to create a prototype using the features of BAM.
    In transaction SWF_BAM, i tried to create a binding for the OB proxy parameters and the event object parameters. Unfortunately, the proxy class no longer has the method 'EXECUTE_ASYNCHRONOUS' and hence i am unable to create the binding.
    Any pointers on how to go about this. Please also let me know if i am not doing it the right way.
    Regards,
    Keshav

    HI Keshav,
    Try writing the method which u create in the same name as the implementing class; also known as the provider class. I have faced the same problem, and when writing the method, use the operation name, which is used in PI 7.1, while creating the interface, and there shouldn't be any problem during Binding.
    Regards,
    Abhisek.

  • Problem with date format in attribute

    Hi
    I have a custom made item with a custom made attribute in a date format.
    I am told to enter data in my attribute-field in the format DD-MON-YYYY HH12:MI
    I want to enter the date/time 27-JUN-2007 01:00 PM, but i then get a document not found WWC-46000-error. Do I write the date wrong?
    If i try to write 27-JUN-2007 13:00 a get a date format error:
    Feil 10038537: Ugyldig dato angitt.
    I must add that i use a norwegian version of portal.
    Happy if anyone can helt!
    Maja R Anjer

    Serge,
    I presume you are using a <dateField> component in your table. To get it to work properly with your custom format, put a dateValidator inside it like this:
    <dateField name="date1">
      <onSubmitValidater>
        <date pattern="PATTERN" />
      </onSubmitValidater>
    </dateField>Replace PATTERN with any pattern supported by the Java SimpleDateFormat class.
    -brian
    Team JDeveloper/UIX

  • Problem with creating sequence in procedure

    I am getting the following error when trying to create a sequence inside a procedure:
    ORA-01031: insufficient privileges
    But, I have no problem creating the sequence outside the procedure, by just issuing the create sequence command.
    How can I make this work?
    Thanks.

    I am getting different result for this:
    INSERT INTO DEPNODE.SEQ_MEID (proc_id, me_id, seq_id)
    SELECT 'tstamp' AS proc_id, M.MANAGED_ENTITY_ID AS ME_ID, ROW_NUMBER () OVER (ORDER BY M.MANAGED_ENTITY_ID) AS seq_id
    FROM FDM.MANAGED_ENTITIES M, FDM.PHYSICAL_ADDRESSES P
    WHERE M.MANAGED_ENTITY_ID = P.ME_MANAGED_ENTITY_ID
    AND M.MANAGED_ENTITY_ID < 5;
    If I ran this at the prompt, I get the correct result:
    tstamp     1     1
    tstamp     2     2
    tstamp     3     3
    tstamp     4     4
    But, if its part of the procedure, I get this:
    tstamp     1     1
    tstamp     1     2
    tstamp     1     3
    tstamp     1     4
    ** the middle row is the seq_id
    Thanks.

  • Problem with binding of a selectManyCheckbox inside a dataTable

    Hi,
    first i want to point out that my english is not the best. :)
    A german version is followed at the end of the english text.
    I have a class "MyClass" with few attributes like:
    private long id;
    private String text;
    private Set<MyClass2> childs;
    An a second class "MyClass2" wich also have some attributes:
    private long id;
    private String text;
    Now i have a List with lots of objects from typ "MyClass":
    List myList = new ArrayList();
    // Sample Data!!
    for (int i=0; i<100; i++)
    MyClass1 m1 = new MyClass1();
    m1.setId(i);
    m1.setText("MyClass1 Line " + i);
    // Now add some "childs":
    for (int j=0; j<i*2; j++)
    MyClass2 m2 = new MyClass2();
    m2.setId( i );
    m2.setText("Sample "+ i);
    m1.getChilds().add(m2);
    myList.add ( m1 );
    So now i want to show the ID and text every Object of MyClass1 on my "test.jsp" (width JSF Tags).
    The Collections inside this class should display as checkboxes (value = id, label = text).
    Sample:
    ID: +1+ TEXT: MyClass1 Line 1
    CHECKBOXES:
    [x] Sample 0
    [x] Sample 1
    ID: +2+ TEXT: MyClass1 Line 2
    CHECKBOXES:
    [x] Sample 0
    [x] Sample 1
    [x] Sample 2
    [x] Sample 3
    Okay i think you know what i mean. ;-)
    I tryed it also with a dataTable to iterate in "myList" and use a selectOneMenu with selectItems to generate the checkboxes.
    Here is the code:
    <h:dataTable value="#{myBean.myList}" var="rowInstance" binding="#{myBean.dataTable}" id="dataTable">
    <h:column>
    <h:outputText value="ID: #{rowInstance.id}" />
    <h:outputText value="TEXT: #{rowInstance.text}" />
    </h:column>
    <h:column>
    <h:selectManyCheckbox id="cbox" styleClass="checkbox">
    <f:selectItems value="#{myBean.childs}"/>
    </h:selectManyCheckbox>
    </h:column>
    </h:dataTable>
    Maybe you see the that i've used childs in the selectItems.
    This is a methode like that:
    public SelectItem[] getChilds()
    MyClass1 mc1 = (MyClass1) dataTable.getRowData();
    // now i iterate the childs and make for each a SelectItem()
    Also you maybe see that i have no binding on selectManyCheckbox, because i have no idea how it works. :-)
    I've tried to bind it to a String[] but and the end this String[] always contain the last low.
    My Question is now:
    When the user pressed the submit Button how can i figure out which Checkboxen the user clicked ?
    Thank you a lot.
    Now the german version (surley better explained):
    Hallo nochmal,
    ich habe versucht auf englisch mein Problem zu schildern.
    Was mit sicherheit nicht zu 100% gelungen ist, deshalb hier noch mal eine deutschsprachige Version (maybe some germans out there).
    Wie oben abgeblidet habe ich im Prinzip zwei Klassen.
    Die erste Klasse "MyClass1" hat eine Collection die Objekte von der Klasse "MyClass2" enth�lt.
    Nun m�chte ich auf meiner JSP Seite die JSF Tags benutzt eine Liste von Objekten (die vom Typ "MyClass1" sind) abbilden.
    Die Collection innerhalb dieser Klasse soll als Checkboxen dargestellt werden.
    Ich habe es ohne gro�e Probleme hinbekommen, dass er das so anzeigt wie ich das m�chte.
    Nur habe ich z.Z. noch Probleme damit wie ich sp�ter herausfinde, welche der Checkboxen denn nun angew�hlt sind.
    Normalerweise w�rde man ja ein binding machen, so k�nnte man alle ausgew�hlten Checkboxen (getSelectedValues()) ja bekommen.
    Da aber die Anzahl der Objekte immer unterschiedlich ist kann ich nicht die entsprechenden Variablen anlegen.
    Deshalb die Frage: Wie bekomme ich mit welche der Checkboxen ausgew�hlt wurden? Wie muss das binding aussehen?
    Vielen Dank.
    Greetings from Germany. :)

    Just bind it to the row object.
    JSF<h:dataTable value="#{myBean.myDataList}" var="myData">
        <h:column>
            <h:selectManyCheckbox value="#{myData.selectedItems}">
                <f:selectItems value="#{myData.selectItems}" />
            </h:selectManyCheckbox>
        </h:column>
    </h:dataTable>MyDataprivate List<String> selectedItems; // + getter + setter
    private List<SelectItem> selectItems; // + getter

  • Problem with binding value on the UI  from a calculated column in the view

    I have calculated field "Readiness" in my db view, which gets calculated based on other columns in the same table. I have added new column to my EO using "Add from table" option and added the same column from to VO using "Add from EO" option. In my application, I will update a particular date field in the UI and this calculated column "Readiness" in the db will be set to yes or no and this logic is working fine, both date date field and calculated field are in same view object. I have added a attribute binding to this "Readiness" column in my view page. The problem is the calculated column value does not reflect the new value in the db, it shows the old value. I have tried different refresh option for the iterator and ppr option for the field binding. Even after reloading the page, the value shown on the UI page is different from the value in db, other bindings on the UI page works fine, not sure any special settings are required for the Calculated columns. any ideas are appreciated.
    Thanks for your help,
    Surya

    I tried to add soms debugging statements in the EO and getters method, the calcaulated column is not picking the value in db view. I'm not any special iterator/field settings are required at BC level. I'm a newbie, any help is appreciated.
    Thanks,
    Surya

  • Problem with bind variable in subselect

    Using the Oracle 9i JDBC Driver and a query of the form:
    select * from atable a where a.thing = ? and a.id in (select id from btable where b.something = ?)
    via a PreparedStatement, the second parameter is not being set correctly. The query executes but does not return the expected results. If I hard code the param value into the query it works fine. I think the second parameter is being set to an empty string (hence the query executes OK but no results returned). This seems to be peculiar to bind variables in sub-selects.
    Has anyone else encountered this problem?

    ps.setLong(1, along);
    ps.setString(2, astring);
    I've checked this against different driver versions. It's OK with the 10.2 driver but fails with the 10.1. So I've moved to the 10.2.

  • A problem with binding a visual control to a class property defined with a getter&setter pair

    hi,
    I am having the following problem (simplified here for
    clarity):
    I am using a class for data model with a property named
    x (using a getter & setter) as follows:
    quote:
    [Bindable]
    public class MyData
    private var _x :String;
    public function MyData()
    _x = "default value";
    public function set x(value:String):void {
    trace("setting x with: '" + value + "'");
    _x = String(value);
    public function get x():String {
    trace("getting x: '"+_x+"'");
    return _x;
    I then linked (binded) the
    x property to a TextInput, as follows:
    quote:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Script>
    <![CDATA[
    [Bindable]
    private var _data:MyData = new MyData();
    ]]>
    </mx:Script>
    <mx:TextInput id="inputX"
    text="{_data.x}" />
    </mx:Application>
    When loaded,
    inputX is set with the "default value". However, when
    changing the value of
    inputX the value of
    _data.x remains unchanged (in this sample - there are no
    trace messages from the setter).
    I have tried numerous variations using <mx:Bindind
    ...>, mx.bindinding.utils.BindingUtils, changing order of setter
    and getter, and more.
    The only solution i could find for now is to add a change
    event handler to the
    inputX control as follows:
    quote:
    <mx:TextInput id="inputX" text="{_data.x}"
    change="_data.x=inputX.text"/>
    Is there something i did wrong? or is it ... simply ... a bug
    thanx,

    hi,
    thanx for your quick reply.
    The actual problem was the that _data.x initialization should
    not be done in the MyData constructor, but after the object is
    fully created, as follows:
    [Bindable]
    private var _data:MyData = new MyData();
    // called in the application's initialize event
    public function init():void {
    _data.x = "default value";
    After this, adding the <mx:Binding> does the trick for
    the inputX.text --> _data.x binding, and there's no need to add
    "this". I simply have assumed (being a novice flex developer) that
    using <mx:TextInput id="inputX" text="{_data.x}" /> binds for
    both directions inputX.text <--> _data.x.
    thanx again,
    yaron

  • A problem with bind variables in a shuttle

    Hi
    After days of research I cannot come up with a solution to this problem which I hope will be easy to describe.
    I'm working on an apex.oracle.com workspace (4.02).
    I have a page with
    a) a region with tree which works well populated by a list of roles and users
    b) a region with a shuttle with the following sql
    List of values
    select SOB_DISPNAME, SOB_ID
    from VIEW_SYSTEMOBJECT
    order by SOB_DISPNAME
    Source
    SELECT SOB_ID FROM VIEW_OBJECTSECURITY_GRANTED WHERE U_ID = :P19_SELECTED_ID
    :P19_SELECTED_ID is a hidden textbox with the currently selected users id.
    The above works very well - I select a user from the tree and the shuttle lhs populates with unselected object names and the rhs with objects selected for the user. A submit button drives a page process which clears out and then inserts the selection into a the table (objectsecurity)
    So far so good.
    I added a list box to the shuttle region (:P19_SOB_TYPE_LIST) so that the data being worked on could be filtered by type, its driven by a LOV that produces a value or 'PAGE', 'REPORT' ... etc.
    I updated the above SQL to be
    List of Values
    select SOB_DISPNAME, SOB_ID
    from VIEW_SYSTEMOBJECT WHERE SOB_TYPE = :P19_SOB_TYPE_LIST
    order by SOB_DISPNAME
    and the source
    SELECT SOB_ID FROM VIEW_OBJECTSECURITY_GRANTED WHERE U_ID = :P19_SELECTED_ID AND SOB_TYPE = :P19_SOB_TYPE_LIST
    So now I would expect that if 'PAGE' is selected in the list box then only objects that are pages will be seen.
    However nothing at all appears.
    If I substitute the bind variable :P19_SOB_TYPE_LIST for 'PAGE' ... WHERE SOB_TYPE = 'PAGE' it works perfectly. So why does :P19_SELECTED_ID do it's job but not P19_SOB_TYPE_LIST ?
    I am probably making some ridiculously simple mistake but I just cannot spot it; is my syntax wrong?.
    The session state is persisting so that I can see the value of :P19_SOB_TYPE_LIST being set to PAGE
    Any help with this would be very much appreciated.

    Hi Dirk
    Thanks for that which looked promising!
    I added P19_SOB_TYPE_LIST as the Cascading LOV Parent Item and removed it from the where clauses of both SQL's and the result was that all types are shown; corresponding to my original position.
    I then added the where clause back to the LOV SQL and both shuttle boxes are blank again
    I added back to the source SQL and again both boxes empty
    Finally I removed the where clause from the LOV SQL (the only other combination) and again lhs box populated with all rows (not filtered) and rhs box blank.
    So unfortunately that doesn't seem to have fixed it.
    Many thanks for the help and any more will be greatly appreciated.
    Regards
    Charles

  • Problem with core data and attribute name "description"

    I have spent hours tying to figure out this problem.
    It appears that is you name an attribute "description", there can be problems at run-time.
    Perhaps, it is related to how I am doing things and letting interface builder do all the bindings.
    I create a core data application in Xcode.
    I create the entity with some attributes in Xcode and then I launch interface builder. I drag a "core data entity" object to the application window. I add a "Master/Detail View".
    I save the files and do a compile. When I click on the "add" button, something goes wrong and GDB launches and loads the stack frame into the debugger.
    I am using Xcode 3.1.2.

    description is the name of a method in the NSObject protocol; try to use another name for your attribute in CoreData, for example myDescription.

Maybe you are looking for

  • Why is my iPhone 5s heavier than it should be?

    What could be the reason for my iPhone 5s feeling heavier than my friends iPhone 5s. I weighed it and it is 4-5 grams heavier than the specified 112 grams it is meant to be. It was a replacement/refurb phone because the first one i got had some issue

  • Using icloud on os 10.6.8

    Can I run icloud - at least for email - on my macbook pro with os 10.6.8?  My laptop is not capable of upgrading to lion.  I had a mobile me account and have upgraded to icloud on my ipad and iphone.  But now my me account is disabled on the laptop. 

  • Setting ScrollBars From Child Class

    I have a JScrollPane which contains a JPanel that displays an image. I have a rubberband box which will zoom in on the image which works fine. The problem that I am having, is that I need to adjust the JScrollPane's sliders. From within the mouse lis

  • JComboBox, JTable, cellRendering CHALLENGE

    Hi all, I would like to ask a question of the resident guru concerning a Netbeans/MYSQL application. I based it on a tutorial found here: [http://www.netbeans.org/kb/61/java/gui-db-custom.html]. I have two seperate JDialogs that write data to a maste

  • How can I customize Tile Page (what's this page) to cycle on a folder?

    I love how the Tile Page ("what's this page") feature looks. But I rarely use it because it auto-populates with URLs (most visited or recent) I already have sorted in my bookmarks under folders and in the Bookmark Toolbar. I don't need a screen shot