Data binding - Arraycollection and Datasource

Hi All
1. Can any one paste a snippet of .MXML code and relevant WDA code (get_Attributes) for an ArrayCollection(Flex) and Datasource(WDA) data binding ?
2. What is the procedure to set default values for the flex components at application initialisation. Already tried setting the relevant attributes in the WDODOINIT methods of  View and Componenet controller.  Also tried raising an event just after the FlashIsland.Register (this) delcaration in MXML but the event is not fired however subsequent events raised based on user clicks are raised properly. Any pointers as to what is being missed ?
Thanks in advance
ksQ

Hi All
1. Can any one paste a snippet of .MXML code and relevant WDA code (get_Attributes) for an ArrayCollection(Flex) and Datasource(WDA) data binding ?
2. What is the procedure to set default values for the flex components at application initialisation. Already tried setting the relevant attributes in the WDODOINIT methods of  View and Componenet controller.  Also tried raising an event just after the FlashIsland.Register (this) delcaration in MXML but the event is not fired however subsequent events raised based on user clicks are raised properly. Any pointers as to what is being missed ?
Thanks in advance
ksQ

Similar Messages

  • Where is detailed description of what data binding language can do?

    Where in the documentation does it clearly spell out exactly what you can do with
    the data binding language (the stuff between "{...}")? I'm trying to understand
    what is happening in the SamplesApp, in the "repeaterTag" module, in XMLString.jsp
    and repeaterTagController.jpf.
    In particular, in XMLString.jsp, it references an expression like this:
    <netui-data:repeater dataSource="{pageContext.xml.employee}">
    I can't figure out how this is working. I can see that the "callPageFlow" tag
    just before this is putting the result of "getXMLStr()" into the "xml" variable.
    This string looks like this:
    <employees>
    <employee title=\"CEO\"><first>Mary</first><last>Smith</last></employee>
    <employee title=\"President\"><first>Mark</first><last>Jones</last></employee>
    <employee title=\"Vice President\"><first>Matt</first><last>Nelson</last></employee>
    <employee title=\"Salesperson\"><first>John</first><last>Doe</last></employee>
    <employee title=\"Office Manager\"><first>Jane</first><last>Doe</last></employee>
    </employees>
    This usage of the data binding language is a little unusual, but I would assume
    it's documented somewhere, right?

    I had already read that description. It has just about one sentence that covers
    the ability to reference elements of an XML string, but without giving any usable
    details. I was already convinced that this and direct variable references were
    worth avoiding, I just wanted to understand the extent of the available features
    first. I guess the lack of any documentation on referencing elements in XML strings
    will make it easier to deprecate :) .
    Eddie O'Neil <[email protected]> wrote:
    David--
    A general data binding description is here:
    http://edocs.bea.com/workshop/docs81/doc/en/workshop/guide/netui/guide/conDatabindingXScript.html
    This help topic describes the NetUI data binding contexts and how
    properties / objects are
    accessed using them. As far as property binding, a question that came
    up in the group earlier,
    public properties always win over JavaBean properties, so if you expose
    data on any Java object
    (page flow, global app, form bean, repeated data item) like this:
    ::::: Controller.jpf
    public String foo = "foo";
    private String anotherFoo = "another foo";
    public String getFoo()
    return anotherFoo;
    and bind to this in a JSP:
    <netui:label value="{pageFlow.foo}"/>
    the value "foo" will display in your page because it is a public property.
    The specific example that you mention below is a sample of using the
    XScript capabilities in the
    8.1 NetUI data binding language to bind directly to parts of an XML document
    without having turned
    the document itself into a JavaBean.
    Frankly, I'd encourage you to use a JavaBean centric approach as we
    will likely deprecate this
    feature in the future in favor of a more XMLBean / JavaBean centric binding
    model. The JavaBean
    property binding model is also much more in-line with the JSP 2.0 expression
    language.
    In the same vein, I'd also suggest following the best practice of
    exposing JavaBean properties on
    your objects instead of using direct binding to fields.
    If you have additional specific questions, feel free to post them
    here and we can address them as
    they come up.
    Hope that helps...
    Eddie
    David Karr wrote:
    Where in the documentation does it clearly spell out exactly what youcan do with
    the data binding language (the stuff between "{...}")? I'm tryingto understand
    what is happening in the SamplesApp, in the "repeaterTag" module,in XMLString.jsp
    and repeaterTagController.jpf.
    In particular, in XMLString.jsp, it references an expression like this:
    <netui-data:repeater dataSource="{pageContext.xml.employee}">
    I can't figure out how this is working. I can see that the "callPageFlow"tag
    just before this is putting the result of "getXMLStr()" into the "xml"variable.
    This string looks like this:
    <employees>
    <employee title=\"CEO\"><first>Mary</first><last>Smith</last></employee>
    <employee title=\"President\"><first>Mark</first><last>Jones</last></employee>
    <employee title=\"Vice President\"><first>Matt</first><last>Nelson</last></employee>
    <employee title=\"Salesperson\"><first>John</first><last>Doe</last></employee>
    <employee title=\"Office Manager\"><first>Jane</first><last>Doe</last></employee>
    </employees>
    This usage of the data binding language is a little unusual, but Iwould assume
    it's documented somewhere, right?

  • Data binding working ... now a question about the variables

    I wrote a small app based on the example (below) from sapui5.hana.ondemand.com.
    My question pertains to anyone else that has data binding working and has tried to do something like the text in red.
    When stringing together "variables" like the ones highlighted in below ... if I do something similar all I get on the screen is the actual text, ie {Width} instead of the value that should replace that.  If I get rid of the extra text and just have the variable in " " I get the correct value displayed for the "variable"
    Anyone else ran across this?
    -Mike
    var header = new sap.m.ObjectHeader({
      title : "{Name}",
      number : "{Price}",
      numberUnit : "{CurrencyCode}",
      statuses : [
      new sap.m.ObjectStatus({
      text : "Some Damaged",
      state : "Error"
      new sap.m.ObjectStatus({
      text : "In Stock",
      state : "Success"
      attributes : [
      new sap.m.ObjectAttribute({
      text : "{WeightMeasure} {WeightUnit}"
      new sap.m.ObjectAttribute({
      text : "{Width} x {Depth} X {Height} {DimUnit}"
      new sap.m.ObjectAttribute({
      text : "{Description}"
      new sap.m.ObjectAttribute({
      text : "www.sap.com",
      active : true,
      press : function () {
      sap.m.URLHelper.redirect("http://www.sap.com", true);

    Thanks for the reply Chandra,
    To clarify a bit more, I have a list object and have successfully been able to bind a model to it.  When I create a list item to put in the list I can display the correct values using the same syntax as above, ie {Width}
    So I am not binding the model to the items in the list rather to the list itself then referring to fields that are available in the model using the syntax {Width} ... and this works fine ... until I try and add some additional text like {StgeBin} in the example below (I am including myHeader in the list that has a model bound to it):
    var myHeader = new sap.m.ObjectHeader({
            title : "Bin # {StgeBin}",   //This shows the text --> Bin # {StgeBin}  ... rather then Bin # 123  (which is what I want)
            //title : "{StgeBin}",        This works and will show the bin number as I expected ie 123
            statuses : [
              new sap.m.ObjectStatus({
                text : "Some Damaged",
                state : "Error"
              new sap.m.ObjectStatus({
                text : "In Stock",
                state : "Success"
            attributes : [
              new sap.m.ObjectAttribute({
                text : "{StgeLocDesc}"
              new sap.m.ObjectAttribute({
                text : "{Material}"
              new sap.m.ObjectAttribute({
                 text : "{MaterialDesc}"
    I took this example right from the SAPUI5 documentation and it works great, just can't add additional text inline with my variables.

  • Context Mapping and data binding

    Hi,
    Please explain about the context mapping and data dinding
    and also differences
    Thank's & Regard's.
    Sri

    Hi Sridevi Sudunaguntla ,
    context mapping-> means mapping between different contexts
    ie suppose if we are creating a node in the component controllet and if we want to use that node in view a and view b, then  we have to map this node from component controller to the required view.. this mapping of context nodes is called context mapping..for context mapping, create nodes in compcontroller.. tehn go to view-> context-> tehn drag and drop required node from component controller to the view ..
    data binding-> means binding the data from nopde to the ui elements or viceversa... after the nodes are created in indudual views or after context mapping.. we have to bind these nodes to the ui elements... suppose we have an input field and we want to read that,, so we have to bind the input field to an attribute in the node.. this binding is called.. data binding.
    Regards
    Sarath

  • Date Effective SDO and named bind variable

    Hi.
    I have a problem with named bind variable in date effective ADF Business Component (:Bind_SysEffectiveDate).
    Service interface of my EmployeeHistorySDO has next methods:
    getEmployeeHistoryView1
    updateEmployeeHistoryView1
    findEmployeeHistoryView1
    createEmployeeHistoryView1
    deleteEmployeeHistoryView1
    If I invoke getEmployeeHistoryView1 method I'm getting next SQL statement:
    [332] EmployeeHistoryView1 ViewRowSetImpl.doSetWhereClause(-1, SysEffectiveDateBindVar, null)
    [333] EmployeeHistoryView1 ViewRowSetImpl.doSetWhereClause(-1, SysEffectiveDateBindVar, null)
    [334] Column count: 7
    [335] EmployeeHistoryView_0_findByKey_ ViewRowSetImpl.doSetWhereClause(-1, SysEffectiveDateBindVar, null)
    [336] EmployeeHistoryView_0_findByKey_ ViewRowSetImpl.setWhereClauseParams caused params changed
    [337] EmployeeHistoryView1 ViewRowSetImpl.doSetWhereClause(-1, SysEffectiveDateBindVar, null)
    [338] EmployeeHistoryView_0_findByKey_ ViewRowSetImpl.setWhereClauseParams caused params changed
    [339] EmployeeHistoryView_0_findByKey_ ViewRowSetImpl.setWhereClauseParams caused params changed
    [340] EmployeeHistoryView_0_findByKey_ ViewRowSetImpl.setWhereClauseParams caused params changed
    [341] EmployeeHistoryView_0_findByKey_ ViewRowSetImpl.doSetWhereClause(-1, SysEffectiveDateBindVar, null)
    [342] EmployeeHistoryView_0_findByKey_ ViewRowSetImpl.setNamedWhereClauseParam(SysEffectiveDateBindVar, null)
    [343] EmployeeHistoryView_0_findByKey_ ViewRowSetImpl.doSetWhereClause(-1, fbkKy__0, null)
    [344] EmployeeHistoryView_0_findByKey_ ViewRowSetImpl.setNamedWhereClauseParam(fbkKy__0, 3)
    [345] EmployeeHistoryView_0_findByKey_ ViewRowSetImpl.setNamedWhereClauseParam(SysEffectiveDateBindVar, 2010-10-01)
    [346] EmployeeHistoryView_0_findByKey_ ViewRowSetImpl.doSetWhereClause(-1, SysEffectiveDateBindVar, 2010-10-01)
    [347] EmployeeHistoryView_0_findByKey_ ViewRowSetImpl.doSetWhereClause(-1, fbkKy__0, 3)
    [348] EmployeeHistoryView_0_findByKey_ ViewRowSetImpl.execute caused params to be "un"changed
    [349] Column count: 7
    [350] EmployeeHistoryView_0_findByKey_ ViewRowSetImpl.doSetWhereClause(-1, SysEffectiveDateBindVar, 2010-10-01)
    [351] EmployeeHistoryView_0_findByKey_ ViewRowSetImpl.doSetWhereClause(-1, fbkKy__0, 3)
    [352] executeQueryForCollection ViewObject:EmployeeHistoryView_0_findByKey_, RowSet:EmployeeHistoryView_0_findByKey_
    [353] ViewObject: [com.test.sdo.dateeffective.employee.history.EmployeeHistoryView]EmplHistoryAppModule.EmployeeHistoryView_0_findByKey_ close prepared statements...
    [354] ViewObject: [com.test.sdo.dateeffective.employee.history.EmployeeHistoryView]EmplHistoryAppModule.EmployeeHistoryView_0_findByKey_ Created new QUERY statement
    [355] EmployeeHistoryView_0_findByKey_>#q computed SQLStmtBufLen: 403, actual=380, storing=410
    [356] SELECT EmployeeHistory.HISTORY_ID,         EmployeeHistory.POSITION,         EmployeeHistory.WAGE,         EmployeeHistory.EMPL_ID,         EmployeeHistory.START_DATE,         EmployeeHistory.END_DATE FROM EMPLOYEE_HISTORY EmployeeHistory WHERE (EmployeeHistory.HISTORY_ID = :fbkKy__0) AND (:SysEffectiveDateBindVar BETWEEN EmployeeHistory.START_DATE AND EmployeeHistory.END_DATE)
    [357] pStmt = conn.prepareStatement("SELECT EmployeeHistory.HISTORY_ID, EmployeeHistory.POSITION, EmployeeHistory.WAGE, EmployeeHistory.EMPL_ID, EmployeeHistory.START_DATE, EmployeeHistory.END_DATE FROM EMPLOYEE_HISTORY EmployeeHistory WHERE (EmployeeHistory.HISTORY_ID = :fbkKy__0) AND (:SysEffectiveDateBindVar BETWEEN EmployeeHistory.START_DATE AND EmployeeHistory.END_DATE)"); // JBO-JDBC-INTERACT
    [358] Bind params for ViewObject: [com.test.sdo.dateeffective.employee.history.EmployeeHistoryView]EmplHistoryAppModule.EmployeeHistoryView_0_findByKey_
    [359] Binding param "SysEffectiveDateBindVar": 2010-10-01
    [360] // ERROR: Unknown data type oracle.jbo.domain.Date // JBO-JDBC-INTERACT
    [361] pStmt.setObjectAtName(SysEffectiveDateBindVar, "2010-10-01"); // JBO-JDBC-INTERACT
    [362] Binding param "fbkKy__0": 3
    [363] // ERROR: Unknown data type oracle.jbo.domain.Number // JBO-JDBC-INTERACT
    [364] pStmt.setObjectAtName(fbkKy__0, "3"); // JBO-JDBC-INTERACT
    Environment successfully binds today date to :SysEffectiveDateBindVar.
    But if I try to invoke updateEmployeeHistoryView1 method environment binds already the variable that doesn't presents in SQL query, so I have an exception:
    [606] EmployeeHistoryView_1_findByKey_ ViewRowSetImpl.doSetWhereClause(-1, SysEffectiveDateBindVar, 2010-10-01)
    [607] EmployeeHistoryView_1_findByKey_ ViewRowSetImpl.doSetWhereClause(-1, Bind_SysEffectiveDate, 2010-10-01 00:00:00.0)
    [608] EmployeeHistoryView_1_findByKey_ ViewRowSetImpl.doSetWhereClause(-1, fbkKy__0, 3)
    [609] executeQueryForCollection ViewObject:EmployeeHistoryView_1_findByKey_, RowSet:EmployeeHistoryView_1_findByKey_
    [610] ViewObject: [com.test.sdo.dateeffective.employee.history.EmployeeHistoryView]EmplHistoryAppModule.EmployeeHistoryView_1_findByKey_ close prepared statements...
    [611] ViewObject: [com.test.sdo.dateeffective.employee.history.EmployeeHistoryView]EmplHistoryAppModule.EmployeeHistoryView_1_findByKey_ Created new QUERY statement
    [612] EmployeeHistoryView_1_findByKey_>#q computed SQLStmtBufLen: 403, actual=380, storing=410
    [613] SELECT EmployeeHistory.HISTORY_ID,         EmployeeHistory.POSITION,         EmployeeHistory.WAGE,         EmployeeHistory.EMPL_ID,         EmployeeHistory.START_DATE,         EmployeeHistory.END_DATE FROM EMPLOYEE_HISTORY EmployeeHistory WHERE (EmployeeHistory.HISTORY_ID = :fbkKy__0) AND (:SysEffectiveDateBindVar BETWEEN EmployeeHistory.START_DATE AND EmployeeHistory.END_DATE)
    [614] pStmt = conn.prepareStatement("SELECT EmployeeHistory.HISTORY_ID, EmployeeHistory.POSITION, EmployeeHistory.WAGE, EmployeeHistory.EMPL_ID, EmployeeHistory.START_DATE, EmployeeHistory.END_DATE FROM EMPLOYEE_HISTORY EmployeeHistory WHERE (EmployeeHistory.HISTORY_ID = :fbkKy__0) AND (:SysEffectiveDateBindVar BETWEEN EmployeeHistory.START_DATE AND EmployeeHistory.END_DATE)"); // JBO-JDBC-INTERACT
    [615] Bind params for ViewObject: [com.test.sdo.dateeffective.employee.history.EmployeeHistoryView]EmplHistoryAppModule.EmployeeHistoryView_1_findByKey_
    [616] Binding param "SysEffectiveDateBindVar": 2010-10-01
    [617] // ERROR: Unknown data type oracle.jbo.domain.Date // JBO-JDBC-INTERACT
    [618] pStmt.setObjectAtName(SysEffectiveDateBindVar, "2010-10-01");  // JBO-JDBC-INTERACT
    [619] Binding param "Bind_SysEffectiveDate": 2010-10-01 00:00:00.0
    [620] // ERROR: Unknown data type java.sql.Timestamp // JBO-JDBC-INTERACT
    [621] pStmt.setObjectAtName(Bind_SysEffectiveDate, "2010-10-01 00:00:00.0");  // JBO-JDBC-INTERACT
    [622] ViewObject: [com.test.sdo.dateeffective.employee.history.EmployeeHistoryView]EmplHistoryAppModule.EmployeeHistoryView_1_findByKey_ close single-use prepared statements
    [623] pStmt.close(); // JBO-JDBC-INTERACT
    [624] QueryCollection.executeQuery failed...
    [625] java.sql.SQLException: Attempt to set a parameter name that does not occur in the SQL: Bind_SysEffectiveDate
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:263)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:271)
         at oracle.jdbc.driver.OraclePreparedStatement.setObjectAtName(OraclePreparedStatement.java:11178)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.setObjectAtName(OraclePreparedStatementWrapper.java:815)
         at weblogic.jdbc.wrapper.PreparedStatement_oracle_jdbc_driver_OraclePreparedStatementWrapper.setObjectAtName(Unknown Source)
         at oracle.jbo.server.OracleSQLBuilderImpl.bindParamValue(OracleSQLBuilderImpl.java:4655)
         at oracle.jbo.server.BaseSQLBuilderImpl.bindParametersForStmt(BaseSQLBuilderImpl.java:3645)
         at oracle.jbo.server.ViewObjectImpl.bindParametersForCollection(ViewObjectImpl.java:19288)
    In Fusion Developer's Guide for Oracle Application Development Framework 11g Release 1 (11.1.1) at chapter 5.2 says that environmnet uses :Bind_SysEffectiveDate bind variable for passing effective date for Date Effective Business Components. But I see that in my case :SysEffectiveDateBindVar bind variabe is used for get method and both variables are used in update method.
    Why environment trying to bind :Bind_SysEffectiveDate if only :SysEffectiveDateBindVar is present in the query ? How can I solve this problem ?
    I'm using
    Oracle JDeveloper Studio Edition Version 11.1.1.3.0
    WebLogic Server Version: 10.3.3.0
    Oracle SOA Suite 11.1.1.
    Edited by: user2975420 on 01.10.2010 6:26

    As I understood ApplicationModule.EFF_DT_PROPERTY_STR is used to pass the value of SysEffectiveDate. This means that this value will bind to variable that present in query filter (:Bind_SysEffectiveDate).
    If this property is not set, the current date value binds to :Bind_SysEffectiveDate variable.
    But the reason of my problem is another.
    When I create date effective entity and date effective view object for this entity the query of VO is next (I see this query in query editor in JDeveloper):
    SELECT EmployeeHistory.HISTORY_ID,
    EmployeeHistory.POSITION,
    EmployeeHistory.WAGE,
    EmployeeHistory.EMPL_ID,
    EmployeeHistory.START_DATE,
    EmployeeHistory.END_DATE
    FROM EMPLOYEE_HISTORY EmployeeHistory
    WHERE (:Bind_SysEffectiveDate BETWEEN EmployeeHistory.START_DATE AND EmployeeHistory.END_DATE)
    But when I invoke getEmployeeHistoryView1 method of view object service interface, the query which I see in log is next:
    SELECT EmployeeHistory.HISTORY_ID,
    EmployeeHistory.POSITION,
    EmployeeHistory.WAGE,
    EmployeeHistory.EMPL_ID,
    EmployeeHistory.START_DATE,
    EmployeeHistory.END_DATE
    FROM EMPLOYEE_HISTORY EmployeeHistory
    WHERE (EmployeeHistory.HISTORY_ID = :fbkKy__0)
    AND (:SysEffectiveDateBindVar BETWEEN EmployeeHistory.START_DATE AND EmployeeHistory.END_DATE)
    Bind variable for SysEffectiveDate has *:SysEffectiveDateBindVar* name now instead of *:Bind_SysEffectiveDate*. But method invokes successfully.
    When I invoke updateEmployeeHistoryView1 environmet already tryes to bind *:Bind_SysEffectiveDate* variable that doesn't present in query. So I have exception:
    java.sql.SQLException: Attempt to set a parameter name that does not occur in the SQL: Bind_SysEffectiveDate
    I'm not understanding why environment binds :Bind_SysEffectiveDate parameter which doesn't present in query.

  • How to bind dynamic row data to submit it by HTTP submit (PHP) - addInstance and Data Binding

    Hi,
    i have got a problem with submit HTTP all data (variables) from PDF to submit.php.
    I have got table with dynamic add/remove Table Row button. When i add it their names are Table.Row[0] , Table.Row[1], Table.Row[2] etc. Only Table.Row is real, and every other row is create dynamically by addInstance script command.
    When i fill "Data Binding" box like this: "Use name(Row)" then after submiting it do PHP i will see only last Table.Row data. For example if last would be Table.Row[3] then i will see only this on my submit.php and the others will be replaced by this value. This is happen becouse of replacing value by value with the same name (data binding is seeing only one Table.Row without instance name:"[1]", "[2]", "[3]" etc.).
    I guess that if i would change something to get addInstance command with Row names like Row1, Row2, Row3 then all will be ok.
    Another way it`s to change something in the "Data Binding" box (Object > Binding Tab) to get relative name like Row[*] instead of "Use name(Row)".
    I don`t know how to solve it and i need your help

    Create a binding for your dataTable.
    In the binding create a UIData element with gettters and setters.
    You can manipulate rows and columns from it.

  • Data Binding using DataSet and ComboBox

    Hi guys, hope someone can help me with this. Seems it should
    be simple, but it's not, that's why I'm here. I have data loading
    into a DataSet component. I have a ComboBox on the stage with
    predefined values and lables, so it's not dynamic at all. After
    loads into the DataSet I have the value Bound to the the Combobox,
    but nothing is being selected. I know the ComboBox is a little bit
    trickier, unlike the Textfield or TextInput wich work right away.
    Again, hope someone can help.

    Hi,
    I think the data binding concept you asked for Dropdown listboxes and RadioButtonGroups .If My Guess Correct follow the links provided here you may get useful information,
    [http://help.sap.com/SAPHELP_NW70EHP1/helpdata/EN/bb/69b441b0133531e10000000a155106/content.htm]
    for Example refer this link,
    [http://help.sap.com/saphelp_nw04/helpdata/en/74/450e8af57065468e88e4b86de47e4b/frameset.htm]
    Hope This information Useful for you.
    Regards,
    Raghava Channooru.

  • Data binding and screen communication

    It seems to me that the "backing bean" concept for a view is becoming the common way to implement JSF pages. I just wanted to get some feedback on something I was thinking about concerning the data that the components bind to and communication between screens. I think there are two options:
    1) Create a "ViewDataBean" more or less a "sister-bean" to the backing bean, and is stored in session scope. All of the components in the backing bean are bound to the data in the ViewDataBean. That ViewDataBean would also be used to communicate from one screen to the other (binding related pages to the ViewDataBean attributes).
    2) Eliminate the "ViewDataBean" and put the actual data in the backing bean itself, binding the components in the backing bean to the data. Communication between screens would then be done by binding components in one backing bean to the data in a different backing bean. This means that all backing beans would be in session scope and I would need to figure out a way to clean them up. Other than that I think this would be a good solution.
    I asked this same question during the "Q&A" portion of the "Meet the JSF Expert group", and didn't get a lot of feedback. What do you guys think of this?
    Dave

    I beleive Adam Winer just said there are some problems in using session beans.
    That why many experts will say: "keep session storage to a reasonable minimum."
    Inside "blueprints solutions" you can find rules:
    Request scope
    Information in this scope is created some time after the request is received and is disposed of some time before the response is complete. It is a good practice to have the backing beans for pages be in the request scope where possible, and maintain separate beans that store only the information that will not need to be continually passed between the client and server.
    The following types of information are good candidates for storing in the request scope:
    Value bindings (e.g. <h:inputText value="#{MyBean.lastName}" /> should always be stored in request scope since they are automatically restored on every request.
    Component bindings (e.g. <h:inputText binding="#{MyBean.lastNameComponent}" />) should always be stored in request scope since their value is no longer valid after a request has been processed anyway. The component tree is reconstituted during each incoming request, changing the physical instances these component bindings will point to.
    References to database resources such as connections, statements, and result sets should be properly closed and discarded before a request is complete (see the section on resource management below for details).<>
    <>Caches of database query results - see section on caching database query results for details.
    <>Temporary results of calculations used for rendering the current view.
    Session scope
    Information in this scope is created some time after the current user's first request is received and is disposed of after a configurable period of inactivity (i.e. when a request has not been received in a certain period of time), or when a session is explicitly invalidated by the application. It is also disposed of when the application is undeployed. Depending on the robustness of the application server, it may also be disposed of when the application server is shut down or crashes.
    The following types of information are good candidates for storing in the session scope:
    Navigational context, for example the album the user is currently editing in a music catalog application. This type of information could potentially be carefully passed back and forth via hidden input fields, but this is error prone and can be difficult to manage together with form validation and when forms are shared between different parts of an application.
    Information that is specific to this session, but temporary, such as short-lived shopping carts. The information can be made persistent by also updating a database table. The recommended way to do this is via entity EJBs, but this can be done by manually coding database-aware JavaBeans as well.
    Security sensitive information that should not be continuously sent back and forth between the client and server.
    Caches of database query results - see section on caching database query results for details.
    Application scope
    Information in this scope is created some time after the application starts and is discarded some time before the application is undeployed. Depending on the robustness of the application server, it may also be disposed of when the application server is shut down or crashes.
    The following types of information are good candidates for storing in the application scope:
    Information that transcends particular users or sessions, such as application settings.
    Caches of database query results - see section on caching database query results for detai
    I'm sure we just have to make real JSF application, not some kind of jsp or html pages.
    Rules for creating real JSF application:
    1) using only native JSF navigation
    2) using only JSF tags
    3) easy way to exchange information between beans
    (probably suggestion Adam Winer about input and output parameters for action is good idea in this direction)
    4) using only good jsf components
    In good JSF application using session scope can't be problem at all.

  • Xcontrols and Data Binding

    Hi
    Is it possible to bind specific controls in a Xcontrol to e.g. a Shared Variable programmatically? I have tried using the Bind to Network Path method, but I only manage to bind the Xcontrol it self. When I try to bind a controller inside the Xcontrol, nothing happens. I have tried applying the method in both Init.vi and under Exec State Change in Facade.vi.
    Regards gelmin
    Message Edited by gelmin on 03-06-2007 11:46 AM

    Hi Nick_CH.
    Thank you for your reply. I have actually looked at this example, but unfortunately it doesn't help me as I want to bind the control inside the Xcontrol, and not the Xcontrol it self. The reason why I'm looking in to this is that I need a way to dynamically both read and write several shared variables inside a Xcontrol. With data binding of controls I could sort of do something like this.
    The most obvious way to achieve this though is to use Datasocket, but I'm afraid this will affect performance as I will have a lot of variables to manage. I have read somewhere that one should only use Datasocket when dealing with less than 30 variables or so. Are there some clever way to dynamically read/write Shared Variables whit out loss of performance?
    Best regards gelmin

  • How to find and replacing the path (url) given for data binding from type 'datasocket'

    Hi everyone,
    I'm sorry to pose this question as my own knowledge is still very limited.
    I have an assignment (bachelor level). We were asked to adjust a plc program in step7 so that multiple of an existing sequence could be run indepently.
    The settings for that sequence are controlled by labview. Sensor data is also viewed in labview.
    There is an existing labview VI that was made by someone else before us. It uses 'Datasocket' type for data binding. Because we would like to adjust this VI to be used with the other sequences, we would like to change the original path or URL quickly, as in a 'Find&Replace' solution. Yet the find and replace only works for objects or text, not entries in the properties.
    Can someone please tell me if there is a way to do is, without having to use shared variables, as we are not at all known with this type.
    Many thanks,
    Niels

    Dear Niels,
    Please find the attached example. I placed 5 controls on the front panel, all with a data socket URL (control 1 = URL1, control 2 = URL2 etc). Through property nodes I did the following;
    - I got a reference to the front panel
    - with this reference we can get an array of references to the controls on this front panel
    - one by one we will read the references and check the data socket URL from the control, we compare this with the URL we are searching
    - if found, stop we will use the reference to write a new URL to the control.
    Please notice the default values of the controls; it is set to search for URL3 and replace this with URL10, run the VI once and you will see that happening. I also included a sting indicator which will show you the label of the control which we find. Also a Boolean indicator in case we were not able to find the URL.
    I downsaved the VI to 8.6, I'm not sure in which version you are working, if you have 8.6 or higher you are able to open it. Hope this brings you further,
    Best regards,
    Martijn S
    Applications Engineer
    NI Netherlands
    Attachments:
    findURLexample.vi ‏12 KB

  • Gumbo FlexGlobals.topLevelApplication data binding issues

    Hi
    what is the reccomended way to bind a datasource of a sub-component to a Bindable collection in the top level application location.
    in 3, for this I would use {Application.application.instance_of_bindable_variable}, now I get a warning saying that data binding will not be able to detect assingments to  {FlexGlobals.topLevelApplication.instance_of_bindable_variable}
    so, how do i bind a data source of a sub-component to a variable instantiated at the Application level in Flex 4?
    Thanks,
    Jed

    Hi Alex, thanks for the reply.
    i added an import statement to mx.core.Application to the component and cast the FlexGlobals.topLevelApplication call, as you suggested, and it will not find the property now : "Eror 1119, access of possibly undefined property."
    I am trying to bind to a public ArrayCollcection that is marked with metadata as bindable in the toplevelApplication mxml file. as such
    ## index.mxml
    [Bindable]
    public var myArrayCollection:ArrayCollection;
    ## myComponent.mxml
    <myComponent source = "{Application(FlexGlobals.topLevelApplication).myArrayCollection}" />
    The project is imported from a Flex 3.x project and we are trying to move it over. Would it matter if the namespace for the script tag is mx vs fx, eg <mx:Script> | <fx:Script> ?
    any help would be much appreciated. Thanks in advance.

  • How can I set the data binding between Web Dynpro & Database table

    Dear friend,
    I am a beginner of Web Dynpro. I want to develop my simple project like these:
    1. Create my own database table via Dictionary Project such as TAB_USER and have 3 fields: USER_ID, USER_NAME, USER_POSITION and I have already deployed & archived it.
    2. Create my own Web Dynpro Project, and create the input fields as User ID, User name, User position and icon 'Save' on the selection screen and I have deployed it already.
    For the process, I want to input data at the screen and save the data in the table, please give me the guide line like these:
    1. How can I set the data binding between Web Dynpro and Database table ?
    2.  Are there any nescessary steps that I will concern for this case?
    Sorry if my question is simple, I had try  to find solution myself, but it not found
    Thanks in advances,
    SeMs

    Hi,
    You can write your own connection class for establishing the connection with DB.
    Ex:
    public class  ConnectionClass {
    static Connection con = null;
    public static Connection getConnection() {
    try{
    Context ctx = new InitialContext();
    DataSource ds = (DataSource) ctx.lookup("jdbc/TSPAGE");
    con = ds.getConnection();
    return con;
    }catch(Exception e){
    return null;
    You can place the above class file in src folder and you can use this class in webdynpro.
    You can have another UserInfo class for reading and writing the data into the DB .
    Regards, Anilkumar
    PS : Refer
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/java/simple java bean generator for database.pdf
    Message was edited by: Anilkumar Vippagunta

  • Using a repeater in a custom FileInfo Panel --data binding error

    When I developed a custom FileInfo panel in Flex Builder 3, I could use an array to populate a checkBox control inside a repeater, and it worked.
    Now, using Flash Builder 4, data binding with <mx:Repeater> doesn't seem to work, resulting in an empty fileInfo panel.
    When I remove the dataProvider from the <mx:Repeater> tag, my panel displays, but without the repeater. How can I specify the dataProvider in a different way that works?
    Thanks
    The code:
    <fi:XMPForm
              xmlns:mx="http://www.adobe.com/2006/mxml"
              xmlns:fi="com.adobe.xmp.components.*" width="100%" height="100%"
              label="TestPanel2_1" xmlns:s="library://ns.adobe.com/flex/spark" >
         <!-- Each namespace prefix that is used within an xmpPath-attribute,
              MUST BE registered at the top of EACH panel where it is referenced -->
         <fi:XMPNamespaces>
              <fi:XMPNamespace prefix="dc" value="http://purl.org/dc/elements/1.1/"/>
         </fi:XMPNamespaces>
         <mx:Script>
              <![CDATA[
                   import mx.collections.ArrayCollection;
                   [Bindable] public var newArray:Array =["One", "Two", "Three", "Four", "Five"];         
              ]]>
         </mx:Script>
         <fi:XMPFormItem>
              <mx:VBox id="primaryFrame" width="800">    
                   <mx:Repeater id="myRep" dataProvider="{newArray}">
                        <mx:Label text="{myRep.currentItem}"/>                  
                   </mx:Repeater>
              </mx:VBox>
         </fi:XMPFormItem
    </fir:XMPForm>

    Okay, I may have been making a rookie mistake. I see online reports that you can't bind an array to a repeater (even though it has worked for me).
    I've added the following variable to make my array an array collection:
    [Bindable] public var newArray2:ArrayCollection = new ArrayCollection(newArray);
    After changing the binding of the repeater to the new array and running the build, the fileInfo panel still does not function.
    Any thoughts?

  • Help: Data binding using uix:choice

    I have a uix jsp page with the following code snippets (trying to make a simple drop down list):
    <jbo:DataSource id="ds2" appid="PubModuleDef" viewobject="PubModule.FOAOIDGroupsVO" />
    and further down:
    <uix:choice>
    <uix:contents>
    <jbo:RowsetIterate datasource="ds2">
    <uix:option text="<%= ds2.getRowSet().getCurrentRow().getAttribute(\"Name\") %>" />
    </jbo:RowsetIterate>
    </uix:contents>
    </uix:choice>
    I am looking for a more elegant way to do this. Particularly I would like to eliminate the <%= ... %> code but I simply have not been able to figure out how to use Data Binding...
    Any advice?
    Claus

    Hi Matthias,
    I hope this is what you are looking for:
    http://help.sap.com/saphelp_erp2004/helpdata/en/fb/fbb84c20df274aa52a0b0833769057/frameset.htm
    Regards,
    Rainer

  • Simple example of a combobox displaying data from a CF datasource

    Can anyone point me to a simple example of a Flex 3 combobox that displays data from a ColdFusion datasource?  I cannot seem to find a simple example.  As always, thanks!

    Thanks for the response, but the example you provided is more complex than I need.  For example, I have a simple table accessed through ColdFusion.  The table has one filed with 7 records.  I need a flex page to display that data in DataGrid, ComboBox and List controls.  The Datagrid displays the 7 records but the ComboBox and List are blank.  How do I get the values from the database to display in the BomboBox and List controls?
    Below is my code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
                    creationComplete="initComponent()">
        <mx:Script>
        <![CDATA[
            import mx.collections.ArrayCollection;
            import mx.rpc.events.ResultEvent;
            import mx.rpc.remoting.RemoteObject;
             private var currentIndex:int = 0;
            private var _key:Object;
            [Bindable]
            public function get key():Object
                    return this._key;
            public function set key(key:Object):void
                    this._key = key;
             private function initComponent():void
                    refreshList(null);
             public function refreshList(event:Event):void
                    this.dataManager.getRoles(this.key);
            private function getRoles_result(event:ResultEvent):void
                    this.roleList.dataProvider = event.result as ArrayCollection;
                     this.roleList.selectedIndex = this.currentIndex;
        ]]>
        </mx:Script>
            <mx:RemoteObject
                id="dataManager"
                showBusyCursor="true"
                destination="ColdFusion"
                source="ifqgtfuses.com.vwRoles">
                <mx:method name="getRoles" result="getRoles_result(event)" />
            </mx:RemoteObject>
       <mx:Canvas width="100%" height="100%" x="0" y="0">
            <mx:DataGrid id="roleList"
                x="10" y="10">
                <mx:columns>
                    <mx:DataGridColumn dataField="vchar_role" headerText="Role" />
                </mx:columns>
            </mx:DataGrid>
            <mx:ComboBox x="10" y="160" id="rolesComboBox" dataProvider="{roleList.selectedIndex}"/>
            <mx:List x="120" y="10" id="rolesList" dataProvider="{roleList.selectedIndex}"/>
       </mx:Canvas>
    </mx:Canvas>

Maybe you are looking for

  • Push notifications. on and off questions?

    i have couple of questions regarding push notifications, after installing an app, example facebbok, a pop up comes up and ask if i allow for push notifications. in all cases i mostly say no. now that i want to turn them on i can find a way to do it!

  • Issue Invoking 10.1.2 BPEL Process from 10.1.3 Embedded server.

    Hi All, I am trying to connect to BPEL 10.1.2 from 10.1.3 embedded server. When I run following code in debug it just stays at Locator locator = new Locator("default","bpel",jndi); line. It does not give any error message. Please help. Let me know if

  • Maximum Storage Size of Sky Drive Pro

    I have a requirement to allocate 6-7 GB of data for each user but my user count is approx. 150,000. Would it be possible to allocate or purchase this much space for each user which can be increase later based on usage. How we calculate this . Please

  • Sure Signal

    Just wondering if anyone has had the same problem, I have had a vodafone sure signal box since November and it has worked brilliantly with BT infinity until about a week ago when phones started to come up with a congestion message and all the lights

  • Timer Event

    i have a timeline with a transition of images fading together and have the following code to make the timeline stop for 4 secs on the first image. this.stop(); var timelinePause:Timer = new Timer(4000,1); timelinePause.addEventListener(TimerEvent.TIM