JavaBean - how to bind with datastructure

Hi,
After importing javabean, how to user javabean in structure.

Hi Sandy,
How to use context in JWD is explained in this simple tutorial:
https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/979de990-0201-0010-429c-d1c522d8a32a
You can find others tutorials here:
https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#program
Hope this help you.
Vito

Similar Messages

  • Clientgen with JAXWS -- how to bind with JAXB?

    I'm using WLS 10.0 "clientgen" to generate Java classes from my WSDL files. All goes well for the simpler WSDL files. Since I'm new to JAXB, I don't quite understand now how to bind the output files using JAXB. It seems this would have been done in the 'clientgen' process, but I don't see any parameters for this in the documentation/help output.
    Here's the ant snippet:
    <target name="wsdl2java" depends="init" >
    <clientgen
    type="JAXWS"
    wsdl="${sitedata.wsdl.file}"
    destDir="${generated.class}"
    serviceName="SiteData"
    packageName="${output.package}.sitedata"/>
    </target>
    How can this be done?

    The <binding> child element of the WLS 10.0 wsdlc Ant task, does in fact allow you to pass a .xjb file to the wsimport Ant task. wsdlc calls wsimport internally.
    When you do this, you want to do all of your namespace-to-Java-package mapping in the .xjb file, and not specify the packageName attribute on the wsdlc Ant task. In fact, doing the latter will override the mapping specified in the .xjb file.
    Here's a sample Ant target that shows what this looks like:
    <target name="run-wsdlc" depends="clean">
    <taskdef name="wsdlc" classname="weblogic.wsee.tools.anttasks.WsdlcTask" classpathref="compile.classpath" />
    <mkdir dir="${src.dir}"/>
    <property name="client.binding" value="custom-client.xjb"/>
    <wsdlc
    type="JAXWS"
    srcWsdl="etc/${wsdl.file.name}.wsdl"
    destJwsDir="WebContent/WEB-INF/lib"
    destImplDir="${src.dir}"
    explode="false"
    verbose="${verbose}"
    debug="${debug}"
    failonerror="true"
    >
    <binding dir="etc" includes="${client.binding}"/>
    <classpath>
    <path refid="compile.classpath"/>
    </classpath>
    </wsdlc>
    </target>
    And here's the contents of the custom-client.xjb file:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <bindings
    xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
    xmlns="http://java.sun.com/xml/ns/jaxws"
    wsdlLocation="DataStagingService2.wsdl"
    >
    <bindings
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    node="wsdl:definitions"
    >
    <package name="services.datastaging">
    <jxb:javadoc>
    <![CDATA[<body>Package level documentation for generated package services.datastaging.</body>]]>
    </jxb:javadoc>
    </package>
    <jxb:schemaBindings>
    <jxb:package name="com.acmeworld.irad.services.datastaging"/>
    </jxb:schemaBindings>
    </bindings>
    </bindings>
    The targetNamespace attribute for the DataStagingService is http://www.acmeworld.com/irad/services/datastaging. The above .xjb file says to map this to the services.datastaging Java package, but the skeleton JAX-WS service endpoint implementation class that wsdlc generates, doesn't currently honor this. The JAXB generated classes will be as specified in the .xjb file, but you'll need to manually refactor the Java package name of the wsdlc generated JAX-WS skeleton class, to be services.datastaging.
    I'll be publishing a series of articles on using JAXB and JAX-WS with WebLogic 10.0, so look out for them in the coming months :-)
    HTH,
    Mike Wooten

  • How to bind with  LOV In method parameters

    Hi,
    My requirement is I have one method with parameters in data controll. Some of the parameters want to link with LOVS(input combo box list of values ).
    I tried with direct dragging with single selection choice list and select one list box. This is creating performance problem. So i am trying to bind with input combo box list of values.
    Then i want to cascade with each other.
    Anybody having any idea please guide me
    Regards
    Bijesh k

    employeeDataProvider.getValue("EMPLOYEE.NUMBER0")
    gives an error .What is the error? Does red x appears in the margin in the Java source editor? If so, when you place the curson over the red x, the tooltip shows the error. What does it say.
    Is it a runtime error? Does a page show with a stacktrace? If so, what is the error? When you look at the stack trace do you find your page mentioned anywhere. If so, it shows a line number. What does that code look like (that is pointed to by the line number)?

  • How to Bind a Combo Box so that it retrieves and display content corresponding to the Id in a link table and populates itself with the data in the main table?

    I am developing a desktop application in Wpf using MVVM and Entity Frameworks. I have the following tables:
    1. Party (PartyId, Name)
    2. Case (CaseId, CaseNo)
    3. Petitioner (CaseId, PartyId) ............. Link Table
    I am completely new to .Net and to begin with I download Microsoft's sample application and
    following the pattern I have been successful in creating several tabs. The problem started only when I wanted to implement many-to-many relationship. The sample application has not covered the scenario where there can be a any-to-many relationship. However
    with the help of MSDN forum I came to know about a link table and managed to solve entity framework issues pertaining to many-to-many relationship. Here is the screenshot of my application to show you what I have achieved so far.
    And now the problem I want the forum to address is how to bind a combo box so that it retrieves Party.Name for the corresponding PartyId in the Link Table and also I want to populate it with Party.Name so that
    users can choose one from the dropdown list to add or edit the petitioner.

    Hello Barry,
    Thanks a lot for responding to my query. As I am completely new to .Net and following the pattern of Microsoft's Employee Tracker sample it seems difficult to clearly understand the concept and implement it in a scenario which is different than what is in
    the sample available at the link you supplied.
    To get the idea of the thing here is my code behind of a view vBoxPetitioner:
    <UserControl x:Class="CCIS.View.Case.vBoxPetitioner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:v="clr-namespace:CCIS.View.Case"
    xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
    mc:Ignorable="d"
    d:DesignWidth="300"
    d:DesignHeight="200">
    <UserControl.Resources>
    <DataTemplate DataType="{x:Type vm:vmPetitioner}">
    <v:vPetitioner Margin="0,2,0,0" />
    </DataTemplate>
    </UserControl.Resources>
    <Grid>
    <HeaderedContentControl>
    <HeaderedContentControl.Header>
    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
    <TextBlock Margin="2">
    <Hyperlink Command="{Binding Path=AddPetitionerCommand}">Add Petitioner</Hyperlink>
    | <Hyperlink Command="{Binding Path=DeletePetitionerCommand}">Delete</Hyperlink>
    </TextBlock>
    </StackPanel>
    </HeaderedContentControl.Header>
    <ListBox BorderThickness="0" SelectedItem="{Binding Path=CurrentPetitioner, Mode=TwoWay}" ItemsSource="{Binding Path=tblParties}" />
    </HeaderedContentControl>
    </Grid>
    </UserControl>
    This part is working fine as it loads another view that is vPetioner perfectly in the manner I want it to be.
    Here is the code of vmPetitioner, a ViewModel:
    Imports Microsoft.VisualBasic
    Imports System.Collections.ObjectModel
    Imports System
    Imports CCIS.Model.Party
    Namespace CCIS.ViewModel.Case
    ''' <summary>
    ''' ViewModel of an individual Email
    ''' </summary>
    Public Class vmPetitioner
    Inherits vmParty
    ''' <summary>
    ''' The Email object backing this ViewModel
    ''' </summary>
    Private petitioner As tblParty
    ''' <summary>
    ''' Initializes a new instance of the EmailViewModel class.
    ''' </summary>
    ''' <param name="detail">The underlying Email this ViewModel is to be based on</param>
    Public Sub New(ByVal detail As tblParty)
    If detail Is Nothing Then
    Throw New ArgumentNullException("detail")
    End If
    Me.petitioner = detail
    End Sub
    ''' <summary>
    ''' Gets the underlying Email this ViewModel is based on
    ''' </summary>
    Public Overrides ReadOnly Property Model() As tblParty
    Get
    Return Me.petitioner
    End Get
    End Property
    ''' <summary>
    ''' Gets or sets the actual email address
    ''' </summary>
    Public Property fldPartyId() As String
    Get
    Return Me.petitioner.fldPartyId
    End Get
    Set(ByVal value As String)
    Me.petitioner.fldPartyId = value
    Me.OnPropertyChanged("fldPartyId")
    End Set
    End Property
    End Class
    End Namespace
    And below is the ViewMode vmParty which vmPetitioner Inherits:
    Imports Microsoft.VisualBasic
    Imports System
    Imports System.Collections.Generic
    Imports CCIS.Model.Case
    Imports CCIS.Model.Party
    Imports CCIS.ViewModel.Helpers
    Namespace CCIS.ViewModel.Case
    ''' <summary>
    ''' Common functionality for ViewModels of an individual ContactDetail
    ''' </summary>
    Public MustInherit Class vmParty
    Inherits ViewModelBase
    ''' <summary>
    ''' Gets the underlying ContactDetail this ViewModel is based on
    ''' </summary>
    Public MustOverride ReadOnly Property Model() As tblParty
    '''' <summary>
    '''' Gets the underlying ContactDetail this ViewModel is based on
    '''' </summary>
    'Public MustOverride ReadOnly Property Model() As tblAdvocate
    ''' <summary>
    ''' Gets or sets the name of this department
    ''' </summary>
    Public Property fldName() As String
    Get
    Return Me.Model.fldName
    End Get
    Set(ByVal value As String)
    Me.Model.fldName = value
    Me.OnPropertyChanged("fldName")
    End Set
    End Property
    ''' <summary>
    ''' Constructs a view model to represent the supplied ContactDetail
    ''' </summary>
    ''' <param name="detail">The detail to build a ViewModel for</param>
    ''' <returns>The constructed ViewModel, null if one can't be built</returns>
    Public Shared Function BuildViewModel(ByVal detail As tblParty) As vmParty
    If detail Is Nothing Then
    Throw New ArgumentNullException("detail")
    End If
    Dim e As tblParty = TryCast(detail, tblParty)
    If e IsNot Nothing Then
    Return New vmPetitioner(e)
    End If
    Return Nothing
    End Function
    End Class
    End Namespace
    And final the code behind of the view vPetitioner:
    <UserControl x:Class="CCIS.View.Case.vPetitioner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
    mc:Ignorable="d"
    Width="300">
    <UserControl.Resources>
    <ResourceDictionary Source=".\CompactFormStyles.xaml" />
    </UserControl.Resources>
    <Grid>
    <Border Style="{StaticResource DetailBorder}">
    <Grid>
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="Auto" />
    <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <TextBlock Grid.Column="0" Text="Petitioner:" />
    <ComboBox Grid.Column="1" Width="240" SelectedValuePath="." SelectedItem="{Binding Path=tblParty}" ItemsSource="{Binding Path=PetitionerLookup}" DisplayMemberPath="fldName" />
    </Grid>
    </Border>
    </Grid>
    </UserControl>
    The problem, presumably, seems to be is that the binding path "PetitionerLookup" of the ItemSource of the Combo box in the view vPetitioner exists in a different ViewModel vmCase which serves as an ObservableCollection for MainViewModel. Therefore,
    what I need to Know is how to route the binding path if it exists in a different ViewModel?
    Sir, I look forward to your early reply bringing a workable solution to the problem I face. 
    Warm Regards,
    Arun

  • How to insert a null value to combobox which is bind with datasource

    Hi,
    i am working on c# winforms application. I have 2 comboboxes one is CustomerCbBox and another is OrderCbBox. CustomerCbBox is bind with data source.
    on CustomerCbBox SelectedIndexChanged event data is populated in OrderCbBox from data source. 
    i want to add a null or empty field in CustomerCbBox. all I want is that when the user don't Select Customer Name and OrderNo null or empty data enter in database. but when i click Insert Button it generate error "Object reference is not "object
    reference not set to an instance of an object".
    here is my code.
      private void MainForm_Load(object sender, EventArgs e)
    production pd = new production();
    CustomerCbBox.DataSource = pd.Customer();
    CustomerCbBox.DisplayMember = "Cust";
    CustomerCbBox.ValueMember = "CustId";
     private void CustomerCbBox_SelectedIndexChanged(object sender, EventArgs e)
                      try
                          string PartyName = CustomerCbBox.SelectedIndex.ToString();
                           PONum1.DataSource = pd.GetPOnumActive(PartyName1);
                              PONum1.DisplayMember = "PONum";
                              PONum1.ValueMember = "PONum";
                      catch (Exception ex)
                          MessageBox.Show(ex.Message);
         Please help me to solve this problem thanks.      

    Hello,
    We could check whether the user has selected any items before adding that to database.
    if (CustomerCbBox.SelectedIndex > -1)
    // do something
    }else{//add dbnull to database}
    And for adding null to databse, we could pass DBNull.Value instead.
    Regards,
    Carl
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to create a page  to bind with spreadsheet

    Hi ,
    Am using jdev 11.1.2.2.0. I need to create the custom spreadsheet to integrate with fusion application. currently am referring one document which i got in google. find the link below:
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/jdev/obe11jdev/ps3/tutorial_adfdi/adfdinewtutorial/jdtut_11r1_59_1.html
    In this example they have taken the workspace ADFdi_BC.jws . But i need the process for developing this ADFdi_BC application. And then it is very clear in the document to bind with excel.
    Can you pls share this document to create ADFdi_BC application.
    Thanks in advance!!!!!

    Hi,
    I guess, this application is a simple Employee-Department application using the HR schema.You can search for a simple ADF BC application in google to get step-by-step tutorial for that.
    -Arun

  • How to bind UI component to a view object which is created from a SQL query

    I am using JDeveloper 11.1.1.2.
    I created a method in my ApplicationModule to create an instance of ViewObject dynamically based on a "voCode" passed in :
    public ViewObject loadVO(String voCode) {
    ViewObject viewObject = findViewObject(voCode);
    if (viewObject == null) {
    viewObject = createViewObject(programCode);
    return viewObject;
    I created a Client interface for this method and refreshed the data control of the ApplicationModule.
    From the "Oracle JDeveloper 11g Handbook", I should be able to create a tree binding and a methodIterator executable for the "loadVO" method via the data control of the AM.
    I tried to add the binding manually to the page definition of my jspx page as I like to see if I can replace an existing binding with this new binding.
    I was not able to add the binding as the "Create Tree Binding" required both the "Root Data Source" and "Tree Level Rules" to be specified.
    I could specify the "Root Data Source" to point to the "loadVO" and corresponding parameter but not able to add any rule.
    When I clicked on the "+" icon to add rule, nothing happened that allowed me to specify the rule (if I know what rule I need to add).
    How should I bind the application module method "loadVO" so that it can be exposed in the Data Control to provide the data for a UI component like dynamic table?
    On the other hand, I could create the "methodIterator" first for the AM method "loadVO" but I wasn't able to create a tree binding to reference the "methodIterator".
    Is it possible to invoke the loadVO method with specific parameter value via the "methodIterator" from a bean method?
    Edited by: pyin_amec on Jan 25, 2010 3:57 PM
    I corrected the subject line and change my question to better reflect the problem I tried to solve.
    Edited by: pyin_amec on Jan 26, 2010 7:41 AM

    Hi,
    This worked for me .. I created a inputtext area where I can enter a query and execute ..
    Hope it helps..
    AM Impl
         public void createVoWithQuery( String pQuery )
              ViewObjectImpl vo = null;
              if( findViewObject( "DemoVo" ) != null )
                   findViewObject( "DemoVo" ).remove();
              vo = ( ViewObjectImpl )createViewObjectFromQueryStmt( "DemoVo", pQuery );
              //  vo.setKeyAttributeDefs( new int[]{0} );
              vo.executeQuery();
         @Override
         protected void prepareSession( Session session )
              super.prepareSession( session );
              if( findViewObject( "DemoVo" ) == null )
                   createViewObjectFromQueryStmt( "DemoVo", "Select 1 from dual" );
         }Page Def
    <executables>
        <variableIterator id="variables">
          <variable Type="java.lang.String" Name="createVoWithQuery_pQuery" IsQueriable="false"/>
        </variableIterator>
        <iterator Binds="DemoVo" RangeSize="25" DataControl="AppModuleDataControl"
                  id="ViewObj1Iterator" Refresh="deferred"/>
      </executables>
      <bindings>
        <tree IterBinding="ViewObj1Iterator" id="ViewObj1">
          <nodeDefinition Name="Dummy">
          </nodeDefinition>
        </tree>
        <methodAction id="createVoWithQuery" RequiresUpdateModel="true" Action="invokeMethod"
                      MethodName="createVoWithQuery" IsViewObjectMethod="false"
                      DataControl="AppModuleDataControl"
                      InstanceName="AppModuleDataControl.dataProvider">
          <NamedData NDName="pQuery" NDType="java.lang.String"
                     NDValue="${bindings.createVoWithQuery_pQuery}"/>
        </methodAction>
        <attributeValues IterBinding="variables" id="pQuery">
          <AttrNames>
            <Item Value="createVoWithQuery_pQuery"/>
          </AttrNames>
        </attributeValues>
      </bindings>page
    <af:panelStretchLayout id="psl1" startWidth="0" topHeight="100px" bottomHeight="0">
              <f:facet name="center">
                <af:table rows="#{bindings.ViewObj1.rangeSize}"
                          fetchSize="#{bindings.ViewObj1.rangeSize}"
                          emptyText="#{bindings.ViewObj1.viewable ? 'No data to display.' : 'Access Denied.'}"
                          var="row" rowBandingInterval="0"
                          value="#{bindings.ViewObj1.collectionModel}"
                          selectedRowKeys="#{bindings.ViewObj1.collectionModel.selectedRow}"
                          selectionListener="#{bindings.ViewObj1.collectionModel.makeCurrent}"
                          rowSelection="single" id="t1" partialTriggers="::cbEx">
                  <af:forEach items="#{bindings.ViewObj1Iterator.attributeDefs}" var="def">
                    <af:column headerText="#{def.name}" sortable="true" sortProperty="#{def.name}"
                               id="c1">
                      <af:outputText value="#{row[def.name]}" id="ot1"/>
                    </af:column>
                  </af:forEach>
                </af:table>
              </f:facet>
              <f:facet name="bottom"/>
              <f:facet name="top">
                <af:panelFormLayout id="pfl1">
                  <af:inputText value="#{bindings.pQuery.inputValue}"
                                label="#{bindings.pQuery.hints.label}"
                                required="#{bindings.pQuery.hints.mandatory}"
                                columns="60"
                                maximumLength="#{bindings.pQuery.hints.precision}"
                                shortDesc="#{bindings.pQuery.hints.tooltip}" id="it1" rows="2">
                    <f:validator binding="#{bindings.pQuery.validator}"/>
                  </af:inputText>
                  <af:commandButton actionListener="#{bindings.createVoWithQuery.execute}"
                                    text="ExecuteQuery"
                                    disabled="#{!bindings.createVoWithQuery.enabled}" id="cbEx"/>
                </af:panelFormLayout>
              </f:facet>
            </af:panelStretchLayout>

  • How to bind a UI element to the context

    Hi Experts,
               I have a problem binding UI element to the context. In my code i have to create TabStrips dynamically and under this tabstrip number of UI elements would be there. For this i have a code like this..
    IWDTransparentContainer theActionContainer =(IWDTransparentContainer)view.getElement("RootUIElementContainer");
         IWDTabStrip ts = (IWDTabStrip) view.createElement(IWDTabStrip.class,"TabStrip");
              IWDTab tab1 = (IWDTab) view.createElement(IWDTab.class,"Tab1");
              IWDInputField in = (IWDInputField) view.createElement(IWDInputField.class,"in");
              IWDCaption header1 = (IWDCaption) view.createElement(IWDCaption.class,"Header1");
              header1.setText("Tab1");
              tab1.setContent(in);
              ts.addTab(tab1);
              IWDTab tab2 = (IWDTab) view.createElement(IWDTab.class,"Tab2");
              IWDInputField in2 = (IWDInputField) view.createElement(IWDInputField.class,"in2");
              IWDCaption header2 = (IWDCaption) view.createElement(IWDCaption.class,"Header2");
              header2.setText("Tab2");
              tab2.setHeader(header2);
              ts.addTab(tab2);
              theActionContainer.addChild(ts);
    <b>when i run this code it is giving following exceptions..</b>
    The initial exception that caused the request to fail, was:
       com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Property 'value' of AbstractInputField with id 'in' in view 'LoginView' must be bound to the context
        at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.AbstractInputField.getValue(AbstractInputField.java:1260)
        at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.InputFieldAdapter.getValue(InputFieldAdapter.java:582)
        at com.sap.tc.ur.renderer.ie6.InputFieldRenderer.render(InputFieldRenderer.java:56)
        at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:435)
        at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:134)
        ... 63 more
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Property 'value' of AbstractInputField with id 'in' in view 'LoginView' must be bound to the context
         at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.AbstractInputField.getValue(AbstractInputField.java:1260)
         at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.InputFieldAdapter.getValue(InputFieldAdapter.java:582)
         at com.sap.tc.ur.renderer.ie6.InputFieldRenderer.render(InputFieldRenderer.java:56)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:435)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:134)
         at com.sap.tc.ur.renderer.ie6.TabStripRenderer.renderTabStripItemContentFragment(TabStripRenderer.java:1867)
         at com.sap.tc.ur.renderer.ie6.TabStripRenderer.renderTabStripFragment(TabStripRenderer.java:838)
    From these exceptions what  i understood is, i need to bind these UI elements to context.
       Can any body tell me how to bind a UI element to the context if I understood the exceptions correct..
    Thanks in Advance,
    Murthy.

    HI,
    lets say Ctx is your context attribute,
    IWDAttributeInfo attrInfo = wdContext.getNodeInfo.getAttribute("Ctx");
    then , as per your code,
    IWDInputField in = (IWDInputField) view.createElement(IWDInputField.class,"in");
    <b>in.bindValue(attrInfo);</b>
    if your contex attribute is child of some other node then do like this,
    IWDAttributeInfo attrInfo = wdContext.getNodeInfo.getChildNode("SalesOrder",0)getAttribute("Ctx");
    //this is when Ctx is child of node SalesOrder, and we are taking Ctx from its 0th element
    then ,
    IWDInputField in = (IWDInputField) view.createElement(IWDInputField.class,"in");
    <b>in.bindValue(attrInfo);</b>
    include this in your code ,
    let me know if you face any problem
    regards
    reward points if it helps

  • How to bind an aggregated list to a variable in an IN or ANY clause

    Hello, and thank you for helping -
    I have a process that involves a parameter assertion, the result of which is a string for an IN or ANY clause. I am not able to figure out how to bind the result of the assertion to to executable SQL. The actual business process is long and laborious and, I decided, not worth explaining for the purpose of this forum. I have abstracted the process into some dummy data. The goal is to bind v_any_condition to :a. I could certainly build the SQL without the binding, but I would be very interested to know just the same what I am missing here (I'm sure something simple, or just a basic SQL rules that I have missed).
    Thanks!
    DECLARE
    -- The goal is to bind v_any_condition in an ANY clause
    v_any_condition VARCHAR2(30) DEFAULT '4,9,d'; -- the three rows to return from the sample data
    -- v_any_condition VARCHAR2(30) DEFAULT DBMS_ASSERT.ENQUOTE_LITERAL('4')||','||
    -- DBMS_ASSERT.ENQUOTE_LITERAL('9')||','||
    -- DBMS_ASSERT.ENQUOTE_LITERAL('d');
    v_sql varchar2(2048);
    -- We'll create a simple cursor of VARCHAR2(1) just like DUAL.DUMMY
    rc sys_refcursor;
    rc_record dual%ROWTYPE;
    v_counter NUMBER DEFAULT 0;
    BEGIN -- Build the SQL. In this example, we decompose an aggregated string
    -- containing the first 16 hex numbers. The result is a simple 16-row table
    -- from which we will attempt to return the three rows by binding
    -- v_any_condition to ANY in the SQL below.
    v_sql := '
    SELECT token
    FROM ( -- materialize the list
    WITH t AS (SELECT ''0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f'' AS txt FROM DUAL)
    -- then decompose the list into rows
    SELECT REGEXP_SUBSTR (txt, ''[^,]+'', 1, LEVEL) AS token
    FROM t
    CONNECT BY LEVEL <= LENGTH(REGEXP_REPLACE(txt,''[^,]*''))+1
    /* WHERE token = ANY(''4'',''9'',''d'') */ -- hardcoding works
    WHERE token = ANY(:a) -- binding does not work; the goal is to get this to work '
    OPEN rc FOR v_sql USING v_any_condition; -- when binding, we never even enter the loop
    LOOP
    v_counter := v_counter + 1;
    FETCH rc INTO rc_record;
    EXIT WHEN rc%NOTFOUND;
    DBMS_OUTPUT.PUT_LINE (v_counter || ': '||rc_record.dummy);
    END LOOP;
    END;
    Edited by: ltps on Jan 9, 2012 4:28 PM

    Superb. Thank you very much.
    For anyone who is interested in the solution I chose, here is the revised SQL that accepts a list as a bind variable after casting the list as a table. The "split string" code is below that. (What look like double quotes in the block below are actually consecutive single quotes.)
    DECLARE
    v_any_condition VARCHAR2(30) DEFAULT '4,9,d';
    v_sql varchar2(2048);
    rc sys_refcursor;
    rc_record dual%ROWTYPE;
    v_counter NUMBER DEFAULT 0;
    BEGIN
    v_sql := '
    SELECT token
    FROM (
    WITH t AS (SELECT ''0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f'' AS txt FROM DUAL)
    -- then decompose the list into rows
    SELECT REGEXP_SUBSTR (txt, ''[^,]+'', 1, LEVEL) AS token
    FROM t
    CONNECT BY LEVEL <= LENGTH(REGEXP_REPLACE(txt,''[^,]*''))+1
    , TABLE(CAST(XX_SPLIT_STRING(:a,'','') AS XX_SPLIT_TABLE)) cst
    WHERE cst.column_value = token'
    OPEN rc FOR v_sql USING v_any_condition;
    LOOP
    v_counter := v_counter + 1;
    FETCH rc INTO rc_record;
    EXIT WHEN rc%NOTFOUND;
    DBMS_OUTPUT.PUT_LINE (v_counter || ': '||rc_record.dummy);
    END LOOP;
    END;
    -- And the main SQL, just for clarity:
    SELECT token
    FROM (
    WITH t AS (SELECT '0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f' AS txt FROM DUAL)
    SELECT REGEXP_SUBSTR (txt, '[^,]+', 1, LEVEL) AS token
    FROM t
    CONNECT BY LEVEL <= LENGTH(REGEXP_REPLACE(txt,'[^,]*'))+1
    , TABLE(CAST(XX_SPLIT_STRING('4,9,d',',') AS XX_SPLIT_TABLE)) cst
    WHERE cst.column_value = token;
    CREATE OR REPLACE FUNCTION XX_SPLIT_STRING (
    p_string VARCHAR2
    , p_delimiter VARCHAR2 DEFAULT ','
    RETURN XX_SPLIT_TABLE PIPELINED
    IS
    l_idx PLS_INTEGER;
    l_string VARCHAR2(32767) := p_string;
    l_value VARCHAR2(32767);
    BEGIN
    LOOP
    l_idx := INSTR ( l_string, p_delimiter );
    IF l_idx > 0 THEN
    pipe ROW ( SUBSTR ( l_string, 1, l_idx - 1 ) );
    l_string := SUBSTR ( l_string, l_idx + LENGTH (p_delimiter) );
    ELSE
    PIPE ROW ( l_string);
    EXIT;
    END IF;
    END LOOP;
    RETURN;
    END XX_SPLIT_STRING;

  • How to bind the value of slider from C# code in windows phone 8.1..?

    Hi, I want to bind a custom seek bar to the position of media element.
    I think from XAML we can achieve it by 
         Value="{Binding ElementName=mediaElement, Path=Position, Mode=TwoWay, Converter={StaticResource FormatConverter}}"
    where FormatConverter is a converter class written to convert mediaElement object to slider value during binding.
    But I am creating the media element from code, so I want to write C# code to achieve the above. How to do it..?

    You can create the same binding in C# by instantiating a
    Binding class and setting its Path, Source, etc. properties. See the remarks in the Binding class docs and
    Creating bindings in code in the
    Data binding with XAML docs.
    That said, the Position updates significantly more frequently than you want to update the seek bar, so you may want to use polling rather than binding for this specific use (especially since you're already in the code behind rather than in the Xaml).

  • How to bind korean parameters in XSQL????

    Hi,
    I am binding english parameters in XSQL very well.
    But when I am trying to bind japaneese or korean it is not displaying rows.
    I am giving the sample code.
    hello.xsql
    <?xml version="1.0" encoding="euc-kr"?>
    <xsql:query connection="scs" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:xsql="urn:oracle-xsql" row-element="ADDRESSES_ROW">
    select * from emp where name='{@name}'
    </xsql:query>
    Request: http://hello.xsql?name=JOHN ::: working fine
    Request: http://hello.xsql?name=koreanName :::Not working
    Please help me in this regard.
    How to bind name in korean in XSQL servlet..
    Regards,
    sudhi

    Do you have nlscharset_12.jar in your classpath?
    what web server are you using XSQL with?
    Have you tried using real bind variables like this:
    <xsql:query bind-params="name">
    select * from emp where ename = ?
    </xsql:query>
    Does a query like:
    <xsql:query bind-params="name">
    select * from emp
    </xsql:query>
    return the korean data to the browser correctly?

  • How to bind Dimension data to SDK Component

    Hi Guys,
    I am trying to create a Cascading box component with the help of SDK development using eclipse.
    I don't know how can I get the dimension data to my component.
    when I am using data binding property type as "resultCellList" then I am able to bind the Measures' data to the component.
    Can anybody suggest me how to bind dimension data to my SDK component?

    In the menu under Help Contents, there is an SDK section with examples that spell this out for you.
    There is also an easier to read and print PDF on the SAP Help site here:
    http://help.sap.com/businessobject/product_guides/AAD14/en/ds14SP02_dev_guide_en.pdf
    Also premade samples here:
    http://help.sap.com/businessobject/product_guides/AAD14/en/DS_14SP02_SDK_SAMPLES.zip
    Main DS Help Site:
    SAP BusinessObjects Design Studio 1.4 SP02 – SAP Help Portal Page
    SDK Community Site with other examples and Open Source links:
    SCN Design Studio SDK Development Community

  • I created new table in database and want to bind with system form

    Hi All,
    1) i created new table in database and want to bind with system form .
    2) How i bind this field to system form sale order where i added new folder tab in that i added some fields that fields i want to bind with database. when i click on the next ,previous ,first and last button
    bind value should change.
    Awaiting soon reply
    Rajkumar G.

    hi,
    try this
    Public Sub BindDataToForm()
            Dim oItem As SAPbouiCOM.Item
            Dim oEdit As SAPbouiCOM.EditText
            Dim oComboBox As SAPbouiCOM.ComboBox
            '// getting the matrix column by the UID
            'oItem = oForm.Items.Item("docname")
            'oComboBox = oItem.Specific
            'oComboBox.DataBind.SetBound(True, "OSRI", "BaseType")
            'oItem = oForm.Items.Item("docno")
            'oEdit = oItem.Specific
            'oEdit.DataBind.SetBound(True, "OSRI", "BaseEntry")
            oColumn = oColumns.Item("Code")
            'oColumn.DataBind.SetBound(True, "", "DSCardCode")
            oColumn.DataBind.SetBound(True, "OSRI", "ItemCode")
            oColumn = oColumns.Item("Serial")
            oColumn.DataBind.SetBound(True, "OSRI", "IntrSerial")
            Try
                oColumn = oColumns.Item("Inspection")
                oColumn.DataBind.SetBound(True, "OSRI", "U_Inspection")
            Catch ex As Exception
                MessageBox.Show(ex.Message)
            End Try
            oColumn = oColumns.Item("Quality")
            oColumn.DataBind.SetBound(True, "OSRI", "U_Quality")
            oColumn = oColumns.Item("Status")
            oColumn.DataBind.SetBound(True, "OSRI", "U_Status")
            oColumn = oColumns.Item("Finish")
            oColumn.DataBind.SetBound(True, "OSRI", "U_Finish")
            oColumn = oColumns.Item("Thickness")
            oColumn.DataBind.SetBound(True, "OSRI", "U_Thickness")
            oColumn = oColumns.Item("uom")
            oColumn.DataBind.SetBound(True, "OSRI", "U_NetUOM")
            oColumn = oColumns.Item("length")
            oColumn.DataBind.SetBound(True, "OSRI", "U_Length")
            oColumn = oColumns.Item("height")
            oColumn.DataBind.SetBound(True, "OSRI", "U_Height")
            oColumn = oColumns.Item("sqf")
            oColumn.DataBind.SetBound(True, "OSRI", "U_sqf")
            oColumn = oColumns.Item("sqm")
            oColumn.DataBind.SetBound(True, "OSRI", "U_sqm")
        End Sub

  • How to bind complex input/output types in web service data control

    Hi,
    I have created data control using external web service for simple input & output data type and its working fine.
    But I don't know how it can be done for complex data types.
    My external Web services have complex input & output types. Such as java object which contains another java object again it contains another java object or arry or java collection etc.
    Each my service has one complex input data type and for this no user input is require so how I can do it without using any component for it.
    I want to bind my page components with this input & output type.
    What is the best approach to do this and how to bind screen component.
    Regards,
    Devang

    Hi,
    Thanks frank.
    I already check this link before posting this so if you have any other link then kindly reply.
    Regards,
    Devang

  • How to bind list data to XML Web service request

    How do I bind specific columns in a DataGrid to the Web
    service request? I'm having trouble finding any documentation that
    addresses that specific pattern, i.e. sending a complex list to the
    server via a Flex Web service send() command. I'm fairly new to
    Flex programming and don't know if what I want to do is possible.
    Here what I've been able to do so far.
    1. Using a Web service called a service on the server and
    retrieved a complex list.
    2. Poplulated a DataGrid with the result
    3. The user has selected multiple rows from the DataGrid
    using a checkbox column
    4. The user pressed a button that calls a Web service send().
    This Web service should only send data from only two columns and
    only for those rows the user has checked.
    5. I can loop over the DataGrid and find the selected rows
    and put them in another ArrayCollection called 'selectedRows'.
    The issue is that I don't know how to bind 'selectedRows' to
    the Web service. Right now I'm reading up on "Working with XML" in
    the Programming with ActionScript 3.0 chapter. But I'm just fishing
    here. No bites yet.

    Don't bind. Build the request object programatically, as you
    are doing with your selectedRows AC, and send(myObject) that.
    Tracy

Maybe you are looking for

  • Launching Swing apps in foreground remotely

    We have an agent that runs on our machines waiting to start and stop java applications, but there is a problem when the application has a GUI element to it. We are using the RunTime classes and it executes applications in the background which means t

  • S.M.A.R.T. FW400 bridge boards vs FW800 bridge boards

    I am building a 4 bay case with ATA drives for storage. It will be connected via with FW400 or FW800. I see the FW400 bridgeboards are available as S.M.A.R.T., just like the drive in my computr. I do not see any FW800 S.M.A.R.T. available. How inport

  • Why is there only one Operating Concern defined in GBI?

    Hi all, I have the following question: when looking at the CO structure of the GBI case study, why is there only one, global operating concern defined? According to the definition of an OC, it is the level whereupon profitability analysis is performe

  • IDocs without PI or Adapter - Part 1

    Hi All, I would like to be able to send IDocs to SAP ECC without using PI or a Java Adapter. Essentially, I would like it to be as simple as possible involving: 1) configuring the IDoc receiver on ECC, 2) delivering an IDoc text file to a port on ECC

  • HT1386 Accessing mp3 files I syned from PC to my IPad

    Hi, I am trying to access the mp3 files I synced from my PC to my IPad 2, but I can't see them there. (the tabs in the "music" section only refer to content I can buy, not mine. I can see my content in ITunes on my PC - please can you help? thanks a