Datagrid displays null when only single item in xml via httpService

Hi folks, I googled around for this but no luck. I've a
datagrid populated with via httpService. The problem I'm having is
that when there is only one item returned via the httpService, the
datagrid doesn't display anything. However, when as soon as I add a
second item, everything displays properly. Has anyone else
experienced this issue? Attached is my code.
Thanks for any help!

"azilaga" <[email protected]> wrote in message
news:gmq6l9$imj$[email protected]..
> Hi folks, I googled around for this but no luck. I've a
datagrid
> populated
> with via httpService. The problem I'm having is that
when there is only
> one
> item returned via the httpService, the datagrid doesn't
display anything.
> However, when as soon as I add a second item, everything
displays
> properly.
> Has anyone else experienced this issue? Attached is my
code.
Try setting the result format on the HTTPService to "e4x"

Similar Messages

  • Datagrid displaying NULL integers as 0

    Hello,
    The data for a given table is displayed in the Flex datagrid as 0 when the integer/double has a NULL value.  Is there a way to properly display NULL without making a label function for every field (with 49 tables and 15/20 fields per table, this would be a tedious exercise)?  The real problem I am faced with is that all NULL values for integers/doubles are overwritten with a 0 value once the given row is edited.  Since the user still sees the same value, they are none-the-wiser.
    In the separate form for editing, I use the DG.selectedItem.[FieldName] to populate each formItem so using labelfunctions would probably not be the best solution.  I am saving the record using the current text in each field (converted if necessary).
    Hopefully that is enough info and thanks in advance!
    Calculoso

    Hi,
    Datagrid columns has a label function like = labelFunction="formatNumber"
    formatNumber will be the place that you can do the format as 0 if it's null.
    private function formatNumber(item:Object, dc:DataGridColumn):String
                    if (item==null)){
                        return "0";
                    }else{
                        return item[dc.dataField] //here you can also use formatter for number if you like it.
    i hope this help.
    rgds
    Johnny

  • Display Null when the column has a particular date value

    Experts,
    I have write the below query in Date column,
    CASE WHEN Table.Column='Bad A'
    THEN CAST(Null as "Table"."Date")
    WHEN Table.Column='Bad b'
    THEN CAST(Null as "Table"."Date")
    ELSE "Table"."Date"END
    but I am getting *" Invalid Alias Format : Table_name.Column_name required"*
    Please let me know where I did mistake.
    Thanks in Advance.
    Thanks,
    Balaa...

    Is that Table withe data column that you are using to replace the values in the main column using the case statement is an alias table or physical table? If it is alias table, you might want to try to use physical table instead.
    Thanks,
    -Amith

  • Display nulls when duplicate record

    Hi,
    Im taking emp table as example to tell my requirement.
    In emp we have the data like below
    select deptno, empno from emp order by emp;
    deptno empno
    10 10001
    10 10005
    10 10034
    10 10043
    20 10045
    20 10089
    30 10088
    30 10067
    30 10009
    But i want to display the data like below
    deptno empno
    10 10001
    null 10005
    null 10034
    null 10043
    20 10045
    null 10089
    30 10088
    null 10067
    null 10009
    can any one help to write the query
    Thanks in Advance
    Edited by: Mr. Murali on Apr 15, 2011 6:22 AM

    Often it's a matter of the end user tool to format the results:
    SQL> select * from emp;
                  DEPTNO                EMPNO
                      10                10001
                      10                10005
                      10                10034
                      10                10043
                      20                10045
                      20                10089
                      30                10088
                      30                10067
                      30                10009
    9 rows selected.
    SQL> break on deptno
    SQL>
    SQL> select * from emp order by deptno;
                  DEPTNO                EMPNO
                      10                10001
                                        10005
                                        10034
                                        10043
                      20                10045
                                        10089
                      30                10088
                                        10067
                                        10009
    9 rows selected.

  • "Page cannot be displayed" error when attempting to download large dataset.

    In the following code, can anybody please tell me at what point the data actually starts to get transferred and the popup "download file" box appears? I'm thinking that the dialog box should appear on the first outputstream.write and start transferring data. However, I think it's not transferring the data until the while loop has finished! That's bad because this is a real long process and I eventually get "Page cannot be displayed" error. On a smaller dataset (shorter while loop) everything seems to work correctly. Is there some sort of a web server configuration that tells it to write out the data ONLY if outputstream closes? I really need it to write out the data as it's coming in. Code is below and thanks in advance.
    response.setHeader("Expires", "0");
    response.setHeader("Content-disposition","inline;filename=Download.csv");
    response.setContentType("application/x-msdownload");
    outputStream = response.getOutputStream();
    bufferInBytes = this.getData();
    while (bufferInBytes != null)
    outputStream.write(bufferInBytes, 0, bufferInBytes.length);
    outputStream.flush();
    bufferInBytes = this.getData();
    outputStream.close();

    Hi All,
    Thanks for all your help.
    Seems I already found out the issue.
    Since we are using "Personal Home Page" for the system profile option "Self Service Personal Home Page Mode" I checked oracle note and found out
    that 11i did not support this mode. Maybe this is the problem that is why we are getting page cannot be displayed error when only 1 responsibility is active.
    The way to fix this, is to use mode 'Framework Only' instead of 'Personal Home Page' as Oracle are phasing out mod_plsql based UI and it will not be present in future releases. No maintenance is being performed (i.e. bug fixes) to the mod_plsql based UI technology.
    Please check this note for more clearer explanation:
    Is The 'Personal Home Page' Mode Supported In Oracle 11i Applications? [ID 368628.1]
    Again, thank you for your help!

  • Page cannot be displayed error when login to EBS home page

    Hi All,
    I have some problem login to EBS page, if only one responsibility is active to user it will get error Page cannot be Displayed error 404 on the Main Menu.
    However if 2 or more responsibilities are active no error will come up and it will show all responsibilities.
    Below is the log I got from apache.
    [Thu Apr 28 15:58:26 2011] [warn] mod_plsql: Stale Connection due to Oracle error 6502
    [Thu Apr 28 15:58:26 2011] [error] mod_plsql: /pls/XXX/OracleNavigate.menuBypass ORA-6502
    ORA-06502: PL/SQL: numeric or value error: hex to raw conversion error
    ORA-06512: at "APPS.ICX_CALL", line 1077
    ORA-06512: at "APPS.ORACLENAVIGATE", line 2358
    ORA-06512: at line 28
    Appreciate if someone can share something about this.
    Database Server
    RDBMS : 10.2.0.2.0
    Oracle Applications : 11.5.10.2
    Thanks a lot

    Hi All,
    Thanks for all your help.
    Seems I already found out the issue.
    Since we are using "Personal Home Page" for the system profile option "Self Service Personal Home Page Mode" I checked oracle note and found out
    that 11i did not support this mode. Maybe this is the problem that is why we are getting page cannot be displayed error when only 1 responsibility is active.
    The way to fix this, is to use mode 'Framework Only' instead of 'Personal Home Page' as Oracle are phasing out mod_plsql based UI and it will not be present in future releases. No maintenance is being performed (i.e. bug fixes) to the mod_plsql based UI technology.
    Please check this note for more clearer explanation:
    Is The 'Personal Home Page' Mode Supported In Oracle 11i Applications? [ID 368628.1]
    Again, thank you for your help!

  • I have only a single texbox.i want to display names , date,priortiy in the same textbox when i typed @ names should be display names like when u type comment in facebook for particular person it will display name. when i type ! date should be display and

    i have only a single texbox.i want to display<big style="margin:0px;padding:0px;border:0px;color:#111111;font-family:'Segoe
    UI', Arial, sans-serif;line-height:normal;"> names , date,priortiy </big>in the same textbox <big
    style="margin:0px;padding:0px;border:0px;color:#111111;font-family:'Segoe UI', Arial, sans-serif;line-height:normal;">when i typed @ names should be display names</big> like
    when u type comment in facebook for particular person it will display name. when i type ! date should be display and when i type * priority should be display in same textbox like
    example <big style="margin:0px;padding:0px;border:0px;color:#111111;font-family:'Segoe UI', Arial, sans-serif;line-height:normal;">@
    names !today date or tomorrow date etc * priority high,low ,medium etc</big>

    This is my first time posting here, so I'm sorry, I re-read my post several times and honestly did think I provided enough information, but you're right, it wasn't the right kind. So please (continue to) bear with me, I'm really not trying to be ignorant. I honestly assumed the issue was something I was doing wrong in Bridge, nothing to do with my computer specs.
    I am using a late-2008 Macbook, running Yosemite 10.1.1 (screenshot below)
    On the Mac I am using Bridge CC 6.1.1.115 and Photoshop CC 2014 (2014.2.1 release, 20141014.r.257 x64)
    Here is a link to the System Info from Photoshop on the Mac
    Here is a screenshot of my System Overview on the Mac
    Here is a screenshot of my Photoshop performance preferences on the Mac
    I am also using a Dell desktop with Windows 8, running Photoshop CC 2014 (2014.2.1 release, 20141014.r.257 x32) and Bridge CC 6.1.0.116 x32 (on a separate CC account with separate files that I don't try to sync or anything)
    Here is a link to the System Info from Photoshop on the Windows computer.
    Here is a screenshot of the system overview on the Windows
    Here is a screenshot of my Photoshop Performance preferences on the Windows computer
    I work with jpg, psd, ai, svg, and pdf files. Most of my stacks are three different file types of the same image, usually jpg, psd/ai, and pdf.
    I have not recieved any error messages
    I am not having issues opening raw files, I am not having printing issues, I have listed the troubleshooting steps I have taken.
    Is there any information you need that I missed? I'm trying not to be a dingus, but I'll have to ask you to be patient with me in the meantime. I haven't ever looked up half the hardware/software details that were suggested and I don't know how to off the top of my head, so I provided what I already knew how to

  • C#: when adding listview items the screen flashes and only single listview column loads?

    When adding listview items, the listview1 items flash and only the first listview column loads (there are 5 columns in all)?
    Background...
    I was having cross-threading issues on 3 form components which I was able to resolve (see
    code here). Now I think the soluiton which involves creating a delegate and performing an "InvokeRequired" check (see
    what I used), I'm having an issue passing 5 values for each column. Below is the code involved calling this invoking check for each and their methods.
    Before having the cross-thread issue the "listview1.Items.Add(values.text) add the comma separated string values to the appropriate columns, but that doesn't happen through the cross-thread fix required.
    The "Loading()" method is handled through and async/await method causing the initial cross-thread issue.
    private void Loading()
    int t = 1;
    foreach (string line in scripts)
    string[] listValues = line.Split(',');
    ListViewItem values = new ListViewItem(listValues);
    if (t == 1)
    AddColumn("Script Name", 200); // Creates column headings
    AddColumn("Date and Time", 150);
    AddColumn("SID", 75);
    AddColumn("Environment", 75);
    AddColumn("Client", 75);
    t++;
    else
    if ((values.Text != "") && (values.Text != "Script Name"))
    //listView1.Items.Add(values);
    AddItem(values.Text);
    if (!dictScript.Contains(values.Text))
    dictScript.Add(values.Text);
    //cbxScriptList.Items.Add(values.Text);
    AddScript(values.Text);
    private void AddItem(object o)
    if (this.listView1.InvokeRequired)
    AddItemCallback d = new AddItemCallback(AddItem);
    this.Invoke(d, new object[] { o });
    else
    { // code that adds item to listView (in this case $o)
    listView1.Items.Add(o.ToString());
    private void AddScript(object o)
    if (this.listView1.InvokeRequired)
    AddCBXCallback d = new AddCBXCallback(AddScript);
    this.Invoke(d, new object[] { o });
    else
    { // code that adds item to listView (in this case $o)
    cbxScriptList.Items.Add(o.ToString());
    private void AddColumn(object o1, object o2)
    if (this.listView1.InvokeRequired)
    AddColCallback d = new AddColCallback(AddColumn);
    this.Invoke(d, new object[] { o1, o2 });
    else
    { // code that adds item to listView (in this case $o)
    listView1.Columns.Add(o1.ToString(), (int)o2); // Creates column headings
    SV

    Ok, I still have the flickering issue, I could use some guidance on that. And I should note that before I had the code-threading issue, I never had any flickering, it all appeared simultaneously.
    However, I was able to populate all columns (5 in all).  I had two corrections to make.
    1) My method should not have been passing the parameter as text but as the object ListViewItem:
    // Not This...
    AddItem(values.text)
    // This is Correct...
    AddItem(values)
    2) Then I needed to cast my object as a ListViewItem in my method call:
    private void AddItem(object o)
    if (this.listView.InvokeRequired)
    AddItemCallback d = new AddItemCallback(AddItem);
    this.Invoke(d, new object[] { (ListViewItem)o });
    else { // code that adds item to listView (in this case $o)
    listView1.Items.Add((ListViewItem)o);
    SV

  • Conditional read only radiogroup item losing value when saving

    Apex 3.2
    I have a radiogroup item that is set to read only after it's populated and the user is not in the ADMIN Role. When non ADMIN users edit the page, it shows the value and they cannot change it, but if they save the page, it loses the value. Works fine if the user has ADMIN role.
    This is the Pl/SQL function in the "Item is read only when" section
    begin
    if :p3_event_detail_id is not null and :p3_notification_period_id != -1 and not apex_util.public_check_authorization('ADMIN') then
    return true;
    else
    return false;
    end if;
    end;
    There is also a Not Null validation on this radiogroup item.
    I changed the item type to select list and it works fine, but user like the radiogroup button.
    Any ideas?

    It's using a shared component LOV cleverly called LOV_YN which consists of a static LOV with
    1 Display=Yes, Return=Y
    2 Display=No, Return=N
    The settings in the LOV section on the item iteself:
    Named LOV: LOV_YN
    Display Extra values: No Dynamic translation: Not translated
    Number of columns: 2 Display null: No
    Null display value is blank as is null return value
    Item was setup as a radio group and was only converted over to a select list to work around this issue. Let me know what else you need and thanks again.
    Rgds/Mark M.

  • SDO_UTIL.EXTRACT fail when single item in geometry collection

    Hi folks,
    Didn't we have a discussion a while back on whether geometry collections are valid when they only contain a single item? Darned if I can find it with the OTN search function. I think back then the issue was either a multipolygon or multistring with a single item.
    Anyhow this time around I have a 2004 geometry collection that for no particular reason happens to only contain a single point. This collection geometry with one item validates TRUE. Just like with multipolygons and multistrings when I attempt to EXTRACT the result I just get back the input geometry (the 2004 in this case) rather than the component part (the 2001). I think this is because there is a test in the EXTRACT routine that checks if there is but one element and if so then returns the original input assuming the original input was gtype 1,2 or 3. Unlike a multipolygon or multistring where I can just assume the output is a polygon or string respectively, with a geometry collection I am rather stumped to figure it out short of inspecting the SDO_ELEM_INFO array. At that point I am kind of writing my own EXTRACT function. I guess I have to do that.
    Anyhow, this would lead one to believe that a geometry collection with only one element is not really valid for Oracle Spatial. Or is this a bug in SDO_UTIL.EXTRACT? I have no recollection if that previous conversation ever decided this question. I might humbly suggest that either SDO_UTIL.EXTRACT should successfully unpack the single item or SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT should report an error for this type of collection.
    I looked over metalink and cannot find anything logged on the issue. The results are the same on 10gR2 and 11gR2.
    If anyone remembers the previous discussion please post the link.
    Cheers,
    Paul
    SELECT
    SDO_UTIL.EXTRACT(
       SDO_GEOMETRY(
          2004,
          8265,
          NULL,
          SDO_ELEM_INFO_ARRAY(
             1,
             1,
             1
          SDO_ORDINATE_ARRAY(
             -100.515216953125005261426849756389856339,
             39.98440002562352191262107226066291332245
       1
    FROM
    dual

    Ok,
    Let's make a quick distinction between the SDO_GTYPE (all four digits) and the lower-case "gtype" meaning the last digit - e.g. the "type of geometry" per the Oracle Spatial book.
    I submitted the above SDO_UTIL.EXTRACT issue to Oracle support yesterday and as I rather expected the response was that this is "expected behavior". The analyst noted that my what I called a collection per its gtype was not a collection but a point. He made the distinction between the gtype and the "geometry definition". I assume by that he means the elem_info_array. So in fact djonio (user 633187) back in November 2009 under Matt's thread had the best answer. I don't see anyway to credit him. :) Hey djonio if you post a response I will give this answer to you.
    So the gtype is in truth a kind of convenience marker or fancy hat "hinting" at the contents of the geometry object, but by no means defining it. A point wearing a 2004 hat is still a point and a valid Oracle Spatial point at that. If you want to "really" know what a geometry is you need to unpack and inspect the elem_info_array. So those of us writing code which is only inspecting the gtype are going down the wrong road particularly when our data might be of suspect quality. As djonio says the gtype is a performance shortcut. In my defense I think lots of folks (e.g. certain software from California) work off the gtype alone. So its not like we can just set the gtypes all to be "9999" and say the heck with it all. :) So incorrect gtypes are bad as they hose the performance shortcut that the gtype allows (and certain software demands) but a bad gtype is NOT an invalid geometry. I am not sure I am entirely sold on that idea as VALIDATE_GEOMETRY certainly looks at the gtype when doing its evaluation. Alas, I suppose its all shades of gray here as validate geometry is just responding to my gtype "hint" to give me the best feedback on my input. Perhaps there is a distinction between "good", "bad" and "imprecise" gtypes.
    My next question is if the gtype system is just a fancy hat, then how best to catalog basic geometry types? Both multi-points and point clouds share gtype 5 but the elem_info marks them as being unique data types that really require unique handling (I never use point clouds so feel free to argue that point). So rather than just mumbling "5" over and over to myself, what vocabulary might be used? Is it GML time? Hmm, does GML even have a point cloud datatype? I suppose I just make something up? Does anyone else have a system they are using?
    Thanks for reading this rambling, feel free to shoot down everything I say. I clearly need more coffee this morning.
    Paul

  • How to enable a button only when a tilelist item is selected

    Simple question but it seems quite awkward to me. How do I enable a button only when an item within a tilelist is currently selected?
    For example lets say if I have a button called button1 that is disabled by default and a tilelist called tilelist1 what would I have to add into the brackets of the following code (enabled property of the button) to ensure that the button is only enabled when an item in the tilelist is currently selected but disabled when no items are selected:-
    enabled="{}"

    enabled="{tilelist1.selectedItem}"
    that should do it, it's making an implicit comparision with null (tilelist1.selectedItem == null) which will result in a boolean.
    SelectedItem is null when nothing is selected , not null when something is.

  • Display document in the Single Document web item -authorization problem.

    Hi Gurus,
    I have a problem.
    I have two types of users, users for display document in the Single
    Document web item and users who can maintain and create new comment in
    the Single Document web item.
    My problem is I can't create users that can only display documents (all
    users who can display the query can add new comment).
    We use the new 7.0 Authorization.
    The authorization object S_RS_ADMWB doesnu2019t influence about the
    activity in the Single Document web item.
    In the new authorization method, in PFCG or in RSECADMIN there is no
    functionality that we can separate between the two types of users I
    mention before.we used S_RS_COMP & S_RS_COMP1.
    Please advice
    Sharon.

    Hi Sankar,
    this may be helpful
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/e3/ae133bdca84047e10000000a11402f/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/e3/ae133bdca84047e10000000a11402f/content.htm</a>
    Pavel

  • Windows Phone 8.1 xaml, c# ComboBox does not display selection when first item is selected from full page list.

    I have 3 comboboxes on a xaml page and most of the time when I select the first item on the full page list displayed when the number of items are > 5, the screen returns to the combobox and the box is blank. The combobox.SelectedItem is valued but it
    does not display.  This does not happen every time and I have seen this using the emulator and my windows 8.1 phone.  If I select any other item in the list they always display but when I go back and select the first item the box is blank. 
    Does anyone know what I could be doing that is causing this?

    Thanks for your help.  When I run the code below and the page is displayed, I select an item from the page list and it displays fine and then I select the first item from the page list and I do not see that selected item in the box. 
    If I remove the SelectedIndex=0 it all works fine except I do not have an item selected for the initial display.  Below should show problem and should work copy/paste in universal blank app.
    ScrollViewer x:Name="scrollViewer1">
            <StackPanel x:Name="stackPanel1" Background="Transparent">
                <ComboBox x:Name="comboBoxTestTypes" Margin="20,117.75,0,465.25" SelectedValuePath="ItemDescription" Width="310" Height="Auto" FontSize="17"
           ItemsSource="{Binding}" HorizontalAlignment="Left" VerticalAlignment="Center">
                <ComboBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding ItemDescription}" />
                    </DataTemplate>
                </ComboBox.ItemTemplate>
            </ComboBox>
     </StackPanel>
        </ScrollViewer>
    public sealed partial class MainPage : Page
            public ObservableCollection<ItemDetail> itemDetail;
            public MainPage()
                this.InitializeComponent();
                this.NavigationCacheMode = NavigationCacheMode.Required;
                this.itemDetail = new ObservableCollection<ItemDetail>();
            protected override void OnNavigatedTo(NavigationEventArgs e)
                PageLoad();
            public class ItemDetail
                public string ItemDescription { get; set; }
                public string ItemName { get; set; }
            private async void PageLoad()
                await initializeTypes();
                var comboBoxTestTypesItemsSource = await GetTestTypes();
                comboBoxTestTypes.ItemsSource = comboBoxTestTypesItemsSource;
                comboBoxTestTypes.SelectedIndex = 0;
            private async Task initializeTypes()
                await addTestType("Item1");
                await addTestType("Item2");
                await addTestType("Item3");
                await addTestType("Item4");
                await addTestType("Item5");
                await addTestType("Item6");
            private async Task<ObservableCollection<ItemDetail>> GetTestTypes()
                //ObservableCollection<ItemDetail> list = new ObservableCollection<ItemDetail>();
                //Random rnd = new Random();
                //for (int i = 0; i < 50; i++)
                //    list.Add(new ItemDetail() { ItemDescription = "hello" + rnd.Next(0, 1001), ItemName = rnd.Next(0, 101).ToString() });
                await getSaveDataFileDataAsync("get");
                return itemDetail;
            private async Task addTestType(string description)
                int newIdAdd = 0;
                if (itemDetail != null && itemDetail.Count > 0)
                    newIdAdd = itemDetail.Max(mT => Convert.ToInt32(mT.ItemName)) + 1;
                var addTestType = new ItemDetail();
                addTestType.ItemName = newIdAdd.ToString();
                addTestType.ItemDescription = description;
                itemDetail.Add(addTestType);
                await getSaveDataFileDataAsync("save");
            private async Task getSaveDataFileDataAsync(string getSave)
                try
                    DataContractJsonSerializer jsonSerializer1 = null;
                    string dataFileName1 = "testFileName";
                    jsonSerializer1 = new DataContractJsonSerializer(typeof(ObservableCollection<ItemDetail>));
                    if (jsonSerializer1 != null && getSave == "get")
                        using (var stream1 = await ApplicationData.Current.LocalFolder.OpenStreamForReadAsync(dataFileName1))
                            itemDetail = (ObservableCollection<ItemDetail>)jsonSerializer1.ReadObject(stream1);
                    if (jsonSerializer1 != null && getSave == "save")
                        using (var stream1 = await ApplicationData.Current.LocalFolder.OpenStreamForWriteAsync(dataFileName1, CreationCollisionOption.ReplaceExisting))
                                jsonSerializer1.WriteObject(stream1, itemDetail);
                catch

  • Need programming help: Three Items selected, only one item displays.

    All the code is below.
    My client has a beach-wear website. It is VERY simple with three pages: Index, Order, and Invoice Page. If customers select the checkbox in front of three items, only one item is displayed on the invoice page. Why aren't all three displayed? I am new to programming:
    //INDEX PAGE:
    <title>Beachwear Title</title>
    <body bgcolor="#FFFFFF">
    <p> </p>
    <form name="form1" method="get" action="jserv/Search.jsp">
    <table width="52%" border="1">
    <tr>
    <td width="20%">Enter Color:</td>
    <td width="80%">
    <input type="text" name="txtColor" size="30" maxlength="20">
    </td>
    </tr>
    </table>
    <p>
    <input type="submit" name="Submit" value="Color">
    </p>
    </form>
    <p> </p>
    //SEARCH PAGE:
    <%@page language="java" import="java.sql.*"%>
    <%@ include file="../Connections/connBeachwear.jsp" %>
    <%
    String rsBeachwear__varColor = "%";
    if (request.getParameter ("txtColor") !=null) {rsBeachwear__varColor = (String)request.getParameter ("txtColor");}
    %>
    <%
    Driver DriverrsBeachwear = (Driver)Class.forName(MM_connBeachwear_DRIVER).newInstance();
    Connection ConnrsBeachwear = DriverManager.getConnection(MM_connBeachwear_STRING,MM_connBeachwear_USERNAME,MM_connBeachwear_PASSWORD);
    PreparedStatement StatementrsBeachwear = ConnrsBeachwear.prepareStatement("SELECT ID, Item, Color, Size FROM Beachwear WHERE Color LIKE '%" + rsBeachwear__varColor + "%';");
    ResultSet rsBeachwear = StatementrsBeachwear.executeQuery();
    boolean rsBeachwear_isEmpty = !rsBeachwear.next();
    boolean rsBeachwear_hasData = !rsBeachwear_isEmpty;
    Object rsBeachwear_data;
    int rsBeachwear_numRows = 0;
    %>
    <%
    int Repeat1__numRows = 10;
    int Repeat1__index = 0;
    rsBeachwear_numRows += Repeat1__numRows;
    %>
    <title>Beachwear Title</title>
    <body bgcolor="#FFFFFF">
    <p> </p>
    <p> 
    <form name="form2" method="post" action="Invoice.jsp">
    <table width="75%" border="1">
    <% while ((rsBeachwear_hasData)&&(Repeat1__numRows-- != 0)) { %>
    <tr>
    <td width="18%"><%=(((rsBeachwear_data = rsBeachwear.getObject("ID"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    <td width="20%"><%=(((rsBeachwear_data = rsBeachwear.getObject("Item"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    <td width="21%"><%=(((rsBeachwear_data = rsBeachwear.getObject("Color"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    <td width="5%"><%=(((rsBeachwear_data = rsBeachwear.getObject("Size"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    <td width="16%">
    <input type="checkbox" name="valueCheckbox" value="<%=(((rsBeachwear_data = rsBeachwear.getObject("ID"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%>">
    </td>
    </tr>
    <%
    Repeat1__index++;
    rsBeachwear_hasData = rsBeachwear.next();
    %>
    </table>
    <p>
    <input type="submit" name="Submit" value="Submit">
    </p>
    </form>
    <%
    rsBeachwear.close();
    ConnrsBeachwear.close();
    %>
    //INVOICE PAGE:
    <%@page language="java" import="java.sql.*"%>
    <%@ include file="../Connections/connBeachwear.jsp" %>
    <%
    String rsBeachwear__varCheckbox = "1";
    if (request.getParameter ("valueCheckbox") !=null) {rsBeachwear__varCheckbox = (String)request.getParameter ("valueCheckbox")   ;}
    %>
    <%
    Driver DriverrsBeachwear = (Driver)Class.forName(MM_connBeachwear_DRIVER).newInstance();
    Connection ConnrsBeachwear = DriverManager.getConnection(MM_connBeachwear_STRING,MM_connBeachwear_USERNAME,MM_connBeachwear_PASSWORD);
    PreparedStatement StatementrsBeachwear = ConnrsBeachwear.prepareStatement("SELECT ID, Item, Color, Size FROM Beachwear WHERE ID IN (" + rsBeachwear__varCheckbox + ")");
    ResultSet rsBeachwear = StatementrsBeachwear.executeQuery();
    boolean rsBeachwear_isEmpty = !rsBeachwear.next();
    boolean rsBeachwear_hasData = !rsBeachwear_isEmpty;
    Object rsBeachwear_data;
    int rsBeachwear_numRows = 0;
    %>
    <%
    int Repeat1__numRows = 10;
    int Repeat1__index = 0;
    rsBeachwear_numRows += Repeat1__numRows;
    %>
    <title>Beachwear Title</title>
    <body bgcolor="#FFFFFF">
    <p> </p>
    <p> 
    <p><br>
    INVOICE<br>
    <br>
    </p>
    <table width="75%" border="1">
    <% while ((rsBeachwear_hasData)&&(Repeat1__numRows-- != 0)) { %>
    <tr>
    <td width="18%"><%=(((rsBeachwear_data = rsBeachwear.getObject("ID"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    <td width="20%"><%=(((rsBeachwear_data = rsBeachwear.getObject("Item"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    <td width="21%"><%=(((rsBeachwear_data = rsBeachwear.getObject("Color"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    <td width="5%"><%=(((rsBeachwear_data = rsBeachwear.getObject("Size"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    </tr>
    <%
    Repeat1__index++;
    rsBeachwear_hasData = rsBeachwear.next();
    %>
    </table>
    <p>  </p>
    <%
    rsBeachwear.close();
    ConnrsBeachwear.close();
    %>

    Hi, Brad,
    I appreciate your help! I am a beginning Java student, so this code is more complex than what I can handle alone.
    A copy of the compilation error is at the very bottom of this message.
    I added " int chkValues[]; " to the beginning of your code, and then inserted the whole code snippet to the detail (Invoice) page as shown:
    <%@page language="java" import="java.sql.*"%>
    <%@ include file="../Connections/connBeachwear.jsp" %>
    <%
    String rsBeachwear__varCheckbox = "1";
    if (request.getParameter ("valueCheckbox") !=null) {rsBeachwear__varCheckbox = (String)request.getParameter ("valueCheckbox")   ;}
    %>
    <%
    Driver DriverrsBeachwear = (Driver)Class.forName(MM_connBeachwear_DRIVER).newInstance();
    Connection ConnrsBeachwear = DriverManager.getConnection(MM_connBeachwear_STRING,MM_connBeachwear_USERNAME,MM_connBeachwear_PASSWORD);
    int chkValues[];
    StringBuffer prepStr=new StringBuffer("SELECT ID, Item, Color, Size FROM Beachwear WHERE ID=");
    for(int x=0;x<chkValues.length;++x){
    prepStr.append( chkValues[x] );//using an x instead of an i
    if((x+1)<chkValues.length){//another iteration
    prepStr.append(" OR ID=");
    }//end if
    }//end for loop
    PreparedStatement StatementrsBeachwear = ConnrsBeachwear.preparedStatement(prepStr);
    ResultSet rsBeachwear = StatementrsBeachwear.executeQuery();
    boolean rsBeachwear_isEmpty = !rsBeachwear.next();
    boolean rsBeachwear_hasData = !rsBeachwear_isEmpty;
    Object rsBeachwear_data;
    int rsBeachwear_numRows = 0;
    %>
    <%
    int Repeat1__numRows = -1;
    int Repeat1__index = 0;
    rsBeachwear_numRows += Repeat1__numRows;
    %>
    <title>Beachwear Title</title>
    <body bgcolor="#FFFFFF">
    <p> </p>
    <p> 
    <form name="form1" method="post" action="">
    <p><br>
    INVOICE<br>
    <br>
    </p>
    <% while ((rsBeachwear_hasData)&&(Repeat1__numRows-- != 0)) { %>
    <table width="75%" border="1">
    <tr>
    <td width="13%">ID:</td>
    <td width="87%"><%=(((rsBeachwear_data = rsBeachwear.getObject("ID"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    </tr>
    <tr>
    <td width="13%">ITEM:</td>
    <td width="87%"><%=(((rsBeachwear_data = rsBeachwear.getObject("Item"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    </tr>
    <tr>
    <td width="13%">COLOR:</td>
    <td width="87%"><%=(((rsBeachwear_data = rsBeachwear.getObject("Color"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    </tr>
    <tr>
    <td width="13%">SIZE:</td>
    <td width="87%"><%=(((rsBeachwear_data = rsBeachwear.getObject("Size"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    </tr>
    </table>
    <%
    Repeat1__index++;
    rsBeachwear_hasData = rsBeachwear.next();
    %>
    <p>  </p>
    </form>
    <%
    rsBeachwear.close();
    ConnrsBeachwear.close();
    %>
    ERROR:
    500 Internal Server Error
    /jserv/Invoice.jsp:
    Compilation error occured:
    Found 1 errors in JSP file:
    C:\\Inetpub\\wwwroot\\Beachwear\\jserv\\Invoice.jsp:27: Error: No method named "preparedStatement" was found in type "java/sql/Connection".
    allaire.jrun.scripting.DefaultCFE:
    Errors reported by compiler:C:/Program Files/Allaire/JRun/servers/default/default-app/WEB-INF/jsp/jrun__jserv__Invoice2ejsp12.java:82:42:82:83: Error: No method named "preparedStatement" was found in type "java/sql/Connection".
         at allaire.jrun.scripting.JavaCompilerService.compile(../scripting/JavaCompilerService.java:96)

  • Change number of record displayed for a single item alone

    Hi,
    I have a single data block with few items. Is it possible to make one item in the block as non-database item and make the display of record in the item alone to show multiple lines.
    i.e. All other items in the Data block shows single record, whereas this particular item should shows 10 records.
    Is this achievable?
    Or should i have to put that item in a separate data block and choose the data block property to "Number of records displayed" as 10?
    Thanks,
    Yuvaraaj.

    983448 wrote:
    Hi,
    I have a single data block with few items. Is it possible to make one item in the block as non-database item and make the display of record in the item alone to show multiple lines.
    i.e. All other items in the Data block shows single record, whereas this particular item should shows 10 records.Yes you can. But i will say re-check your design.
    Hamid
    Mark correct/helpful to help others to get right answer(s).*

Maybe you are looking for