Displaying search results in a JTable..

Hello,
I've got a stupid problem. I'm trying to have a search dialog box that returns it's results into a JTable. Seems like it should be pretty straightforward. My immediate problem is that with the following code (based on an example I found in the forums):
     Vector vColumnNames = new Vector();
     Vector vData = new Vector();
     vColumnNames.add("Company Name");
     vColumnNames.add("Contact");
     vColumnNames.add("Booth #");
     vColumnNames.add("Status");
     for (int i=0; i<4; i++)
         vData.add(new String("blah"));
     dm = new DefaultTableModel(vData, vColumnNames);
     jtResults = new JTable(dm);
     jsp = new JScrollPane(jtResults, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
         jtResults.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);It generates an java.lang.ClassCastException: java.langString exception. After some testing the part that causes this to die is adding the strings to vData. if I comment out the for loop it works fine, except with no data of course. What gives? I'm sure I'm doing something totally stupid wrong, but I don't understand why the Vector of Strings works for column names but nto for the data.
My secondary concern is: I need to be able to reuse the table for multiple searches, I think if I just update the TableModel and repaintit should be ok; also I'd like the table to appear as an empty white background when there's no data in it as well; currently the insides of the table just show up as grey when there's no data. Is there a way to fix that?
Thanks!
xanatos

Hmm. Nevermind, I think I figured it all out. ^_^
xanatos

Similar Messages

  • Altavista will not display search results

    altavista us will not display search results. altavista canada works fine. On us site results will display in no style page but not in basic page style. The page comes up blank. This may have been caused by delta search. I think I have rid my computer of delta? Reloaded firefox. I use norton 360 and have run registry clean up and virus scans. Also cleaned explorer. In explorer the u.s. altavista works ok that is why I think it something to do with firefox and delta search showed up at the same time unwanted and forced a change on my home page. Have cleared computer of what delta files I could find my have something in the registry but I would not know what to look for or to do with. I am running xp

    In a round about way you solved my problem cor-el ! At the end of standard diagnostic there was mention of malware so I ran malwarebytes before running profile manager. malwarebytes found 21 items some in the registry. deleted these items and tried altavista us again and to my surprise it is working ok now.I thought norton 360 would catch such things but I guess it doesn't ! will keep and run a malware program from now on. thank you for your help.

  • How to display search results in a table or in different columns

    Hi
                 How can i display search results in multiple columns or in a table so that the user can sort the results based on a particular property displayed in the search results.
    Thanks in advance
    Regards,
    Vidya

    Hello,
    To display search results in a table, in different columns or more... you should modify SearchResultLayoutSet.
    Create your own StandardSearchResultRenderer (exp My_StandardSearchResultRenderer) and add to SearchResultLayoutSet. Than change whatever you like to achive your aim.
    Thank you.
    Hope this helps.

  • How to display search results in content area

    Hi
                 How can I display search results in the content area as seen in sdn.
    Thanks in advance.

    Hi,
    http://help.sap.com/saphelp_nw70/helpdata/en/cc/f4e77ddef1244380b06fee5f8b892a/frameset.htm you find the relevant guidelines.
    You can filter the PCD object setting the Search Layout Set of your Searc Iview.
    In System Admin > System Configuration > Content Management > User Interface > Settings > Layout Set and duplicate the "SearchResultLayoutSet" layout set.
    Then you have to duplicate its Collection Renderer "StandardSearchResultRenderer".
    In its property "Resource Types to be Filtered" set as value "-http://sap.com/xmlns/pcd/app/iview".
    Then assign the new Collection Renderer to the new Layout Set and that's it!
    Now if yuor Search Iview uses this new Layout Set, when you search a PCD object the iviews will not be shown!
    (or)
    In the entry "Predefined Properties" of the search options set, you will need to enter "resourcetype(value=http://sap.com/xmlns/pcd/app/page/default)" if you want the search to be limited to resources defined as pages. Leave out /default if you dont want the end user to be able to change the filter.
    If you want the parameter reflected in the URL, you can find information about how to do it here: /message/280371#280371 [original link is broken]
    Check and try either ways.
    Regards,
    Ponneswari A.

  • Firefox wont display search results on certain engines (Google, yahoo). IE works fine and Bing also displays

    For the past 2 days, Firefox wont display search results on Google or Yahoo. Tried Bing it worked fine, tried Internet Explorer and it worked fine. All that gets displayed is a blank page, no errors or anything like that.

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    * Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    * Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • How do I display search results in a new window?

    Our current search feature (http://mainedreamvacation.businesscatalyst.com/business-search) displays the search results in the same page. When someone clicks to see the details page, the goes "back" the browser displays an alert asking the user if they want to re-submit the form.
    Is there a way for the search results to display in a new window? My hope is that by loading results into a new window, a user could click to see the detail, then return without the alert message.
    I'm open to simply suppressing the alert message, but I don't think that's possible.
    I should point out that this is NOT a site search. Also, I have tried  {module_webappsresults,,_blank} without success.
    Thanks!

    Hi Tim,
    The approach would be similar to customizing this for normal site search. 
    You'll need to locate the page where you inserted the web app search access the html and locate the pageID in the form action.  Use the same method found in the site search to apply the specific page.
    - http://helpx.adobe.com/business-catalyst/partner/add-search-form.html> Point to the results page
    **Ensure you please the {module_webappsresults} on the custom page to have the content display as well. 
    Kind regards,
    -Sidney

  • Store won't display search results, tabs dead

    Search results in iTunes Stoe (11) won't display all items (i.e. it reads "Total: 301 items" at the bottom of the list but only 16-20 will show up (depending on my luck). This is even true of, for example, a podcast show page itself. When I scroll down, there are empty lines where episode titles should go, but if I go all the way to the end, they suddenly disappear and the "Total: 301 items" jumps to the end of the 16-20 item long list.
    Categories within search results won't display either (i.e. I can see the "All," "Books," iTunes U" list on the right side, but clicking on each does nothing).
    Going from "Details" to "Ratings and Reviews" also requires clicking the tab and then reloading the page. My connection is fine, this has been happening for at least the last month at home, while out, using wifi and when drectly connected by old timey cables. Updated this morning, still no change.
    Help?

    This article has some tips
    http://support.apple.com/kb/ts1368
    (particularly under Troubleshooting on a Mac)
    If that does not help...  As a test, to narrow down the cause, you may want to create a new user account in System Preferences Users & Groups pane.  It can be Standard or Admin.  Log out and log in to the new user account (do not use Fast User Switching).
    Try running iTunes from the new user account, and accessing the iTunes Store. 
    If the problem does NOT occur in the new account, the cause is likely to be something in your primary user account.  For example, it could be user preferences settings, or something related to your iTunes library, or a background process that runs in your account that is interfering somehow. 
    If the same problem does occur in the new account, the cause is likely to be related to the overall OS, the iTunes application, or maybe network settings that block access to the iTunes Store.
    Either way, you'll be able better focus additional troubleshooting.

  • How can I configure Robohelp to display search results in DHTML drop-down hotspots?

    Hello. We designed our online help using drop-down hotspots (this look is much cleaner to us). Problem is, when a user searches for something and clicks the Search results topic page  to find the information, the topic page displays, but does not expand the drop-down hotspot to show the exact location of the searched item. Is there a JavaScript or some other solution to get the DHTML hotspot to expand, showing the information? Thanks.

    Step 5: Add the code from the supplied text file to the top whtopic.js.
    Do I add the code at the very beginning, before   //   WebHelp 5.10.005  ?
    I'm asking because I followed the steps and it did not work.
    FWIW, I am also using the Twisties function in Robohelp (via the drop-down hotspot style file).
    Thanks.

  • Search button not displaying search results

    I have created a page where you enter a string and click a search button and it will display the file that contains that string. It works on one page but not any of the other pages I have created. I went to dkubiceck page and copied the code for the search button there.
    This is the code I used to run the query to bring up the document information:
    select score(1) relevance, filename,transcript_id,
    dbms_lob.getlength("trans_document") "trans_document"
    from transcript_documents
    where contains (trans_document, :P20_SEARCH, 1) > 0
    order by 1 desc
    I can run the script in sql workshop and it returns information but I can't get the page to display anything so I think it has something to do with the search button. Does it have something to do with the button request. I have the request as go which is what the Oracle Text for APEX tutorial indicates. I am at a loss as to why it is working in one place and not in another. HELP!!!!!!!

    I used the Using Oracle Application Express to Build
    Oracle Text Web Applications An Oracle White Paper documentation to create this button. The instructions to create the button is below.
    http://www.oracle.com/technology/products/database/application_express/pdf/apex_text_application_v1.6.pdf
    To create a button to submit the search:
    1. Under Buttons, click the create icon ().
    2. For Region, select Search Terms(s).
    3. For Task, select Create a button displayed among this region’s items.
    4. For Button Name, enter P1_FIND.
    5. For Label, enter Find.
    6. For Button Style, select HTML Button.
    Run your page using the run page icon () and your development username and password. Your page should look similar to the following figure.
    This was the instructions to create the query region:
    To create a query region:
    1. Navigate back to the Page Definition for the Search page. You can do this by using the edit links at the bottom of the running page, Edit Page 1.
    2. Under Regions, click the create icon ().
    3. For Region Type, select Report.
    4. For Report Implementation, select SQL Report.
    5. For Title, enter Results.
    Using Oracle Application Express to Build Oracle Text Web Applications Page 9
    6. Enter the following SQL query:
    select score(1) relevance, doc_title, doc_url
    from htmldb_documentation
    where CONTAINS (doc_url, :P1_SEARCH, 1) > 0
    order by 1 desc
    7. For Display Conditions, for Condition Type, select Value of Item in Expression 1 is NOT NULL.
    8. For Expression 1, enter P1_SEARCH.
    This condition specifies to only display the Results region if a term is entered as a search criterion.
    Run the page and enter a search criterion for Term(s). Your results should look similar to the following figure.
    Figure 2.0
    The only thing I added to the query above is a dbms_doc.getlength statement to be able to open a link to the document.
    The first 2 times I created this on a page it worked just fine. But now no matter what conputer or schema or application I create this button in it won't display the results. I can admit that I have no experience creating a button with a different request than what comes up in the wizard. And the documentation that I found on creating buttons was of no help.
    I have not made any changes to anything in the wizard so can someone guide me as to how to create a button that will allow me to search a document using Oracle Text as described above

  • Duck Duck go Browser doesn't display search results, how to fix it?

    The same search using other browsers displays the results. But i want to use Duck Duck Go

    Did you already try safe mode or clear the recent history?
    *[http://mzl.la/MwuO4X Firefox in safe mode]
    *[http://mzl.la/NZyoI8 Clear recent history]
    Also try reset Firefox
    *[http://mzl.la/MnSTZB Reset Firefox]

  • MSS- Team- EmpInfo- General Info- EMPSearch is not displaying Search Result

    Hello All,
    Currently we are using MSS BP 1.3.1 & SAP_MSS 600 SP16...
    I am going to the navigation MSS->Team->EmpInfo->General Info->Employee Search [Under Employee Selection Dropdown i am selecting Employee Serach Option], here i am getting the view with lastname, fistname, Personal No:, Even i am using any of the Search Critiria like Serach With LName,FName And PerNo:, No Employee Search result is Displaying Simply No Data Found Message is coming.
    To active this EMp search in MSS do i need configure any steps from SPRO. Any Steps from Portal Front.
    To display Team Calender , i configured IGS, what else i need to do to get Team Calender iview in Team Under MSS.
    Please list out the steps and provide some help to fix the issue.
    Thanks & Regards
    Adapag

    Bala,
    Thanks for ur response, Debug in the Sense we need to Maintain any parameters in the Employee Search Parameters w.r.t MSS in the Particular Method or What?
    I checked in the SPRO--> Integration with other mySAP Components -->Business Packages > Manager self Services (mySAPERP)>Object and Data Provider--> Define Object Selection / Group Parameters for OBJ Search / Define Rules for Object Selection..
    Here we need to create any rule and pass those Group Parameters into that???
    I told my ABAPers to debug those two methods, apart from that any HR side SPRO Configuration pending?
    Please reply me and list out the Steps, Where and What exact config need to do from SPRO apart from that Debugging????
    Thanks in Advance
    Adapag

  • Display search results on the same page

    I have a text box with a submit button to the left. Once the user enter the a number in the search field my select query executes.
    My question is how can i display the reult on the same page? I have been able to display results on the same page but my table headers are also displayed at the same time while user is trying to enter the item number.
    i tried using <c:if> but its not wokring, Any help?
    <%@ include file="/WEB-INF/jsp/include.jsp" %>
    <html>
    <head>
    <title>VDP QOH UPDATE</title>
    </head>
    <body>
    <spring:bind path="quantityOnHand">
      <FONT color="red">
        <B><c:out value="${status.errorMessage}"/></B>
      </FONT>
    </spring:bind>
    <P>
    <FORM name="quantityOnHandForm" method="POST" action = ''>
    <CENTER>
    <table BORDER=0  CELLSPACING=0 CELLPADDING=5 WIDTH=600>
        <tr>
              <td COLSPAN=2 BGCOLOR="#003366"><P ALIGN=CENTER><B><FONT COLOR="#FFFFFF" SIZE="2" FACE="Arial,Helvetica,Univers,Zurich BT">Query</FONT></B>
              </td>
         </tr>
         <tr>
              <td WIDTH=215 BGCOLOR="#336699"><P ALIGN=RIGHT>
                  <B>
                     <FONT COLOR="#FFFFFF" SIZE="-1" FACE="Arial,Helvetica,Univers,Zurich BT">
                        Item No:
                      </FONT>
                   </B>
              </td>
              <td ALIGN=LEFT><spring:bind path="quantityOnHand.itemNumber">
                      <input type="text" maxlength="30" size="10" name='<c:out value="${status.expression}"/>' value='<c:out value="${status.
                             value}"/>'>
        <td><font color="red"><c:out value="${status.errorMessage}" /></font>    </td>
           </spring:bind>
              </td>
         </tr>
        <tr>
            <td BGCOLOR="#336699" WIDTH=215> </td>
            <td>
                <input type="submit" name="Submit" value="Submit" >
           </td>
       </tr>
    </table>
    </center>
    </form>This is basically all of my search jsp code. Now i've added my other code after </form> to display the results.
    </form>
    <table BORDER=0  CELLSPACING=0 CELLPADDING=5 WIDTH=600>
        <tr>
              <td COLSPAN=2 BGCOLOR="#003366"><P ALIGN=CENTER><B><FONT COLOR="#FFFFFF" SIZE="2" FACE="Arial,Helvetica,Univers,Zurich BT">Quantity On Hand Search Results</FONT></B>
              </td>
         </tr>
         </table>              
    <c:choose>
    <c:when test="${empty qohInfo}">
             <div align="left" style="color:#336699;"><b>No records Found.<br><br></b></div>
    </c:when>
    <c:otherwise>
         <table width="602" height="92">
              <tr>   
                   <th ALIGN=CENTER BGCOLOR="#336699" width="110" >
                       <B>
                          <FONT COLOR="#FFFFFF" SIZE="-1" FACE="Arial,Helvetica,Univers,Zurich BT">Item Number</FONT>
                       </B>
                   </th>
                   <th ALIGN=CENTER BGCOLOR="#336699" width="115">
                       <B>
                          <FONT COLOR="#FFFFFF" SIZE="-1" FACE="Arial,Helvetica,Univers,Zurich BT">Vendor Id </FONT>
                       </B>
                   </th>
                   <th ALIGN=CENTER BGCOLOR="#336699" width="120">
                       <B>
                          <FONT COLOR="#FFFFFF" SIZE="-1" FACE="Arial,Helvetica,Univers,Zurich BT"> Inventory Date</FONT>
                       </B>
                   </th>
                   <th ALIGN=CENTER BGCOLOR="#336699" width="130" >
                       <B>
                          <FONT COLOR="#FFFFFF" SIZE="-1" FACE="Arial,Helvetica,Univers,Zurich BT">Update Date Time </FONT>
                       </B>
                   </th>
                   <th ALIGN=CENTER BGCOLOR="#336699" width="100" >
                       <B>
                          <FONT COLOR="#FFFFFF" SIZE="-1" FACE="Arial,Helvetica,Univers,Zurich BT">Quantity</FONT>
                       </B>
                   </th>
              </tr>
              <c:forEach var="qohInfo" items="${qohInfo}" varStatus="loop">
        <tr BGCOLOR="#99CCFF">
          <TD align="center"><c:out value="${qohInfo.itemNumber}"/></TD>
          <TD align="center"><c:out value="${qohInfo.vendorId}"/></TD>
          <TD align="center"><c:out value="${qohInfo.inventoryDate}"/></TD>
          <TD align="center"><c:out value="${qohInfo.updateDateTime}"/></TD>
          <TD align="center"><c:out value="${qohInfo.quantity}"/></TD>
        </TR>
      </c:forEach>
      </table>
      </c:otherwise>
      </c:choose>As you can see that the table headers are always shown but i would like to hide the table headers and everything until and unles user clicks on submit button. Any help is appreciated.

    Thanks balusc for your reply. I was curious how would you have used the c:if statement to display the table and hide the table if a user have not clicked the button.
    I wanted to stay away from javasscript

  • ITunes Store not displaying search results on my Mac Mini

    Over the past couple weeks I've noticed problems with search results not displaying in the iTunes Store on my Mac Mini.  I do not have this problem on my Macbook Air or other Apple devices.  I can enter an artist such "Coldplay" and all I get are audiobooks and podcasts.  When I enter this same search on my Macbook, I get all the expected results--songs, albums, etc.  I am running OS X 10.9 on both machines (with iTunes version 11.1.2).

    Hi there kushfromgbr,
    You may find the information in the article below helpful.
    About SyncServices
    http://support.apple.com/kb/HT5847
    OS X Mavericks
    OS X Mavericks v10.9 and later do not use SyncServices. Instead, Mavericks supports sharing your information using several network-based and cloud-based solutions. If you want to sync your information across multiple devices and computers, you should use one or more of these methods. These include iCloud, CardDAV servers, CalDAV servers, and servers that utilize the Exchange ActiveSync protocol.
    If you would like more information about setting up iCloud on your devices you can take a look at the article below.
    iCloud: Set up iCloud on your devices
    http://support.apple.com/kb/PH2609
    -Griff W. 

  • Automatically display search results

    Does anyone know how if there is a possibility to display a search results by default?
    E.g. all documents changed from last week, topten users document upload.
    Thank you in advance.
    Joost Christenhusz

    Dag Joost,
    yes, see as an introductionary example ""Configuring the Last10Documents Scenario" under http://service.sap.com/nw-howtoguides -> Portal, KM, and Collaboration -> KM.
    Hope it helps
    Detlev

  • Display Search Results of Content Search WebPart in a Calendar Style

    Hi,
    I have currently the requirement to gather events from calendars (event list) that are spread among dozens of site collections. Calendar rollup or overlay only works within a sitecollection (right?). 
    I thought that I might be able to use the Content Search WebPart for this task. Is it possible to create displaytemplates that transform the search results into a calendar like view?
    Thanks
    Sven

    Hi Sven,
    As I tested, I can overlay SharePoint calendars across site collections in the same web application. However, by design it doesn't work across web applications.
    I'd like to confirm if you are overlaying calendars across site collections or web applications. If your situation is the former, did you recieve any error message?
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

Maybe you are looking for

  • If you buy a itunes gift card, can you use it to make in game/app purchases?

    if you buy a itunes gift card, can you use it to make in game/app purchases?

  • Accurian iPod Dock Not Compatible?

    I just bought an Accurian iPod Dock for my 80GB Classic iPod. However, it does not work when I try to connect it to the composite out in my TV. The iPod just says, "TV Out Enabled, Please Connect Video Accessory." I'm guessing it's not compatible, bu

  • Is there any limit for Views

    Hi All, Is there any limit to have maximum number of views in the webdynpro appliation? Regards DS.

  • Bad reception on Droid Razr M, and on LG Spectrum

    Just curious as to others opinions... I bought two phones, the razr m, and a samsung stellar I believe it was. We live in a spotty area of coverage in VA, but the stellar (my husbands phone works just fine). I however have been dropping calls, limite

  • Open with Application

    Hello, if I select a fortran file, say file.f, and I open the Get Info window (meta-i), I find that, by default, the file will be opened with Xcode. I would like to have a different default; Aquamacs for example. I select Aquamacs from the list of ap