How to implement Auto Suggest Widget

Hi there
I have a dynamic asp classic page, where the data come from an access db.
On this page, many documents (category and title ) are displayed for download.
I want to implement Auto Suggest Widget in order to find the document easier and to jump to it (href="#document_xy") directly for download.
I don't have a clue on how to implement the Auto Suggest Widget.
The ASP sample works with XML File.
http://labs.adobe.com/technologies/spry/samples/autosuggest/SuggestSample.html
All replies, hints, tutorials are highly appreciated.
kind regards
joey00x
I am using Win XP, Dreamweaver CS3

Hi,
thanks for trying to help.
I am sorry to ask again. I am not at all familiar with xml.
I have tried to modify the ASP script you've suggested, but I get strange XML error, which doesn't make sense to me.
I understand that with the script the server creates an XML File on the fly. First I have to connect to my access database, then I fill the records into a recordset object. And then the server loops through the RS and creates the xml file. Is that correct?
The error message I get, points to a complete different place in the code, to a javascript module, which is working perfectly without below code.
Any suggestions where the bug is?
Thanks for your time
kind regards
joey00x
Here the code that I am using:
<%
Dim objRS
Dim SQLxml
SQLxml = "Select category, subcategory, title from DocumentView"
Set objRS=Server.CreateObject("ADODB.Recordset")
objRS.Open SQLxml , objConn, 0, 1
' Send the headers
Response.ContentType = "text/xml"
Response.AddHeader "Pragma", "public"
Response.AddHeader "Cache-control", "private"
Response.AddHeader "Expires", "-1"
%>
<?xml version="1.0" encoding="utf-8"?>
<root>
  <% While (NOT objRS.EOF) %>
    <row>
         <%
            For each field in objRS.Fields
            column = field.name
         %>
        <<%=column%>><![CDATA[<%=(objRS.Fields.Item(column).Value)%>]]></<%=column%>>
        <%
            Next
        %>
    </row>
    <%
      objRS.MoveNext()
    Wend
    %>
</root>
<%
objRS.Close()
Set objRS = Nothing
%>

Similar Messages

  • Implement auto suggest behaviour with af:selectOneChoise

    Hi
    I'm using jdeveloper 11.1.2.3.0
    I would like to know how could I Implement auto suggest behaviour with af:selectOneChoise?

    Hi,
    Drop a af:autoSuggestBehavior from component pallet to the SOC component and bind it to a backing bean method as below
    private List<SelectItem> items = new ArrayList<SelectItem>();
    public List getSuggestions(String input) {
    if (input!=null && input.length()>3) {
    ViewObject vo = util.getViewObject("XYZ1Iterator");
    vo.setNamedWhereClauseParam("bindx]Xyz", input);
    vo.executeQuery();
    System.out.println("Row count is " + vo.getRowCount());
    // autoSuggestItemBeanList.clear();
    RowSetIterator itr = vo.createRowSetIterator(null);
    while (itr.hasNext()) {
    Row row = itr.next();
    items.add(new SelectItem(row.getAttribute("FirstName")));
    return items;
    If you don't want your db to be queried for each and every character, then create a bean and set each and every attribute value of that bean from the db after your page gets rendered. So each character hit from the keyboard will look into your bean rather than hitting the db.
    Thanks,
    Sanjeeb

  • How to create  Auto suggestion component by using of ADF tag

    Hi ,
    In my project, I am using the ADF frame work and I need to use the auto suggestion component.
    Can any body suggest me how to create Auto suggestion component by using of ADF tag.
    Waiting for your valuable suggestions...

    Try this forum:
    JDeveloper and ADF
    You might get a lot more response.
    Jan Kettenis

  • Need to implement auto suggest with multiple select in a input text field

    Hi,
    Jdev Ver: 11.1.1.4
    My requirement is to create an input field where i can provide auto suggest and user can enter multiple email ids. It is similar to current "To" field while composing a mail in Gmail.
    Problem:
    I have implemented input box with auto suggest. For the first entry it works fine. when i enter 2nd value(i have used ',' (comma) as separator and handled it in 'suggestItems' bean method to take sub-string after comma for providing the suggestion) , after selection.... the first value get lost. So at a time only one value is selected in the input text.
    Input text:
    <af:inputText label="Names" id="it21" rows="2"
    columns="50" simple="true"
    valueChangeListener="#{VisitBackingBean.visitMembersInputBoxCL}"
    binding="#{VisitBackingBean.visitMembersInputBox}">
    <af:autoSuggestBehavior suggestItems="#{VisitBackingBean.onSuggest}"/>
    </af:inputText>
    Bean Method:
    public List onSuggest(FacesContext facesContext,
    AutoSuggestUIHints autoSuggestUIHints) {
    BindingContext bctx = BindingContext.getCurrent();
    BindingContainer bindings = bctx.getCurrentBindingsEntry();
    String inputNamevalue = autoSuggestUIHints.getSubmittedValue().trim();
    if(inputNamevalue.contains(",")) {
    inputNamevalue = inputNamevalue.substring(inputNamevalue.lastIndexOf(",")+1).trim();
    //create suggestion list
    List<SelectItem> items = new ArrayList<SelectItem>();
    // if (autoSuggestUIHints.getSubmittedValue().length() > 3) {
    OperationBinding setVariable =
    (OperationBinding)bindings.get("setnameSearch");
    setVariable.getParamsMap().put("value",
    inputNamevalue);
    setVariable.execute();
    //the data in the suggest list is queried by a tree binding.
    JUCtrlHierBinding hierBinding =
    (JUCtrlHierBinding)bindings.get("AutoSuggestName_TUserROView1");
    //re-query the list based on the new bind variable values
    hierBinding.executeQuery();
    //The rangeSet, the list of queries entries, is of type //JUCtrlValueBndingRef.
    List<JUCtrlValueBindingRef> displayDataList =
    hierBinding.getRangeSet();
    for (JUCtrlValueBindingRef displayData : displayDataList) {
    Row rw = displayData.getRow();
    //populate the SelectItem list
    items.add(new SelectItem(rw.getAttribute("UsrUserName").toString().trim() +
    "<" +
    rw.getAttribute("UsrMailId").toString().trim() +
    ">",
    rw.getAttribute("UsrUserName").toString().trim() +
    "<" +
    rw.getAttribute("UsrMailId").toString().trim() +
    ">"));
    return items;
    Please suggest how can i achieve the mentioned functionality.

    Hi,
    doesn't work this way as the suggest list returns a single value. You can actually use the existing values as a prefix to the new value in which case the suggest list would look a bit odd. Beside of this all you can do is to create a user lookup field with auto suggest and once a name is selected, update another field with the value returned from this action
    Frank

  • How to implement auto complete using swings?

    Hi all ,
    i have got a new assignment where I have to implement auto complete. Please suggest me the possible ways to do so. I am working on desktop application.
    Please help.
    Thanks
    Alex

    Till now i have tried this:-
    public class AutoCompletePer extends JFrame
         private JTextField field = new JTextField(40);
         private JFrame frame1 = new JFrame();
         private boolean showAutoComplete = true;
         public AutoCompletePer()
              setSize(500,300);
              setLocation(300,50);
              setLayout(new FlowLayout());
              getContentPane().add(field);
              setVisible(true);
              setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              addListeners();
         private void addListeners()
               field.getDocument().addDocumentListener(new DocumentListener() {
                public void removeUpdate(DocumentEvent e)
               public void insertUpdate(DocumentEvent e)
                     if(showAutoComplete)
                          SwingUtilities.invokeLater(new Runnable() {
                        public void run()      {
                        Point p = field.getLocationOnScreen();
                           frame1.setBackground(Color.white);
                        frame1.setSize(field.getWidth(), 200);
                        frame1.setLocation(p.x ,p.y+20);
                        frame1.setVisible(true);
                        frame1.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
                        JPanel panel = new JPanel(new BorderLayout());
                        panel.setBackground(Color.WHITE);
                        panel.add(new JLabel("i am label"));
                        frame1.getContentPane().add(panel,BorderLayout.CENTER);
                        showAutoComplete = false;
                        requestFocus();
                        field.requestFocus();
                          public void changedUpdate(DocumentEvent e) {
         public static void main(String[] args) {
              new AutoCompletePer();
    }I tried this but it doesn't work atleast frame should remain infront of the main window, even I tried with dialog box but all in vain.
    Please suggest if there is any API defined for this in Java or any other wayOut.
    Please help.
    Alex

  • Hello, everyone, can anyone tell me how to implement auto cash?

    hello everyone :
          who can tell me how to implement the business process of Auto Cash in Sap,  could't thank you more.
          Best Regards.
                                                                   Frank .

    hello, frank.
    could you please explain the "Auto Cash" scenario a little more?  we might know it by another term.
    regards.

  • How to Implement Auto tabbing feature in a table region???

    Hi All,
    I am trying to implement auto tabbing feature in one of my OAF page using java script which is actually working for individual items but
    while implementing the same for a table bean its not working. is there any way to implement this feature in OAF without using java script?
    if not could anyone give some rough java script for this feature? please this is urgent..
    Thanks in advance
    Sree

    Sree,
    check this if it helps ;
    https://forums.oracle.com/thread/963732
    Not sure we can set Focus in : PFR ,  I hope it is possible in only PR.
    Regards
    Sridhar

  • CSS (?) Problem in Auto-Suggest Widget

    I probably missed something simple in the CSS, but I cannot
    get auto-suggest's inner DIV to adjust the width of the suggestion
    results. What I tried is setting the inner DIV so:
    <div class="list" spry:repeat="dsPlaylist"
    spry:suggest="{SONG_TITLE}" spry:setrow="dsPlaylist">
    And then, in CSS I've got:
    .list {
    background-color: #66FF00;
    width: 300px;
    Background-color works, but width does not.
    Can anyone clue me in to what I've missed? Thanks!
    Jeremy

    This isn't intuitive, but in the default style sheet, the
    .hideSuggestClass
    has a width set. This is controlling the width of the
    container. changing or editing this value will allow your width
    property to work as expected.
    Hope this helps.
    Don

  • Error implementing Auto Suggest Behaviour (JDeveloper Tutorial)

    Hi,
    I'm using JDev 11g R2 on Mac OSX. In the JDeveloper Tutorial "Developing Rich Web Applications with Oracle ADF", Part 3, Step 3, I don't get the "Insert Auto Suggest Behavior dialog box", so I used the property inspector to enter "#{bindings.JobId.suggestedItems}" in the "SuggestedItems" property.
    When I run the application, and type a value in the JobId, I get the error:
    suggestedItems="#{bindings.JobId.suggestedItems}": Method not found: 0.suggestedItems(java.lang.String)
    I checked the bindings in "query.jsf", and they're all set.
    Does anyone have an idea what could be wrong?
    Kind regards,
    Philip

    The tutorial (http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_55/jdtut_11r2_55_3.html) suggests that you can drag and drop the auto suggest behavior onto the JobId. But you cannot.
    By default, the JobId item is not created as an element that can accept an auto suggest behavior. The source for the item should resemble:
                <af:inputComboboxListOfValues id="jobId1Id"
                                              popupTitle="Search and Select: #{bindings.JobId1.hints.label}"
                                              value="#{bindings.JobId1.inputValue}"
                                              label="#{bindings.JobId1.hints.label}"
                                              model="#{bindings.JobId1.listOfValuesModel}"
                                              required="#{bindings.JobId1.hints.mandatory}"
                                              columns="#{bindings.JobId1.hints.displayWidth}"
                                              shortDesc="#{bindings.JobId1.hints.tooltip}">
                    <f:validator binding="#{bindings.JobId1.validator}"/>
                    <af:autoSuggestBehavior suggestedItems="#{bindings.JobId1.suggestedItems}"/>
                </af:inputComboboxListOfValues>However, when the form itself is dropped onto the page, the JobId is created as a selectOneChoice.
    This seems to be an error with the tutorial (http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_55/jdtut_11r2_55_2.html).
    Edited by: Dolphin on Sep 29, 2012 2:37 PM

  • How to implement auto increment in jpa

    Hi all
    how can we indicate that the strategy for primary key generation in auto increment?( the database is mysql5)
    thanks for help

    Hi Rachid,
    Have a look at this...
    http://www.developerscrappad.com/408/java/java-ee/ejb3-jpa-3-ways-of-generating-primary-key-through-generatedvalue/
    Cheers,
    Vlad

  • Spry Auto Suggest Widget Sample: Change scrollbar?

    Is it possible to change the scrollbars to scomething a bit more asthetically pleasing?
    I know this can be done with the Prototype framework:
    http://livepipe.net/control/scrollbar
    If not, can the scrollbar be removed completely?  I never show more than 10 results anyway.

    htcilt wrote:
    Is it possible to change the scrollbars to scomething a bit more asthetically pleasing?
    I know this can be done with the Prototype framework:
    http://livepipe.net/control/scrollbar
    If not, can the scrollbar be removed completely?  I never show more than 10 results anyway.
    Yes it is possible to change the scrollbars; but you do not need Spry to do this. You can use the Prototype framework if you wish.
    You can also remove the scrollbar completely, although this is only needed for IE as other browsers do not place a scrollbar if this is not needed.
    My advice, leave the browser scrollbar as it is. Users are used to it and my experience is that a site has to be functional before asthetical.
    I hope this helps.
    Ben

  • Auto Suggest with multiple fields?

    Hello,
    I am planning on using the autosuggest on a project I'm
    working on, and was surprised by the lack of support for multiple
    fields. Correct me if I'm wrong, but right now you can only search
    for the 'name' field or 'age' etc. I would like to be able to enter
    some text in the textinput field, and it would search both 'name'
    and 'username' in the dataset. Is this possible with the current
    widget?
    Thanks,
    Maquelly

    Hello Maquelly,
    Indeed the Auto Suggest widget do not support filtering the
    data against multiple fields simultaneously if the data is filtered
    on the client side. I will add this as an enhancement request for
    this brand new widget. We have only support for multiple fields to
    be displayed in the suggestion list which is a spry:region, you can
    insert the values of multiple fields concatenated through the
    spryLsuggest tag buy we are not able to check multiple fields,
    We have implemented also the ability to send the value typed
    on the server and expect a new XML with the filtered data. This
    method allow you to achieve your goak as you can control
    completelly the filtering algorithm that sends the data back in
    browser. We have some samples in the Spry 1.5 preview.
    Regards,
    Cristian MARIN

  • Auto suggest behavior for af:query component LOV fields.

    Hi,
    I am new to ADF development and need help on implementing auto suggest behavior to the LOV fields generated by af:query component. For inputList and inputCombo.. fields we can add af:autosuggestbehavior tag to enable this. How do we enable the same for af:query generated LOV fields.
    Regards,
    C.R

    Thanks Timo for such a quick response.
    JDev version we are using is 11.1.1.6.0
    Unfortunately, we have gone too far with the AF:Query and Everything else is working apart from Auto-Suggest on AF:Query. Now will take a lot of time to implement and test. Also, users will have to spend considerable time to test it again.
    Thanks and Regards,
    Satya

  • Dynamically loaded data in Auto Suggest

    I'm loading data from the server with PHP for the AutoSuggest
    Widget. Everything works great (and fast!).
    Is there a way to add an additional URL parameter to the one
    that is created for the AutoSuggest Widget (by default "prd")?
    It obviously won't work when I add the URL parameter to the
    data set constructor because it conflicts with the URL parameter
    that is created by the Auto Suggest Widget's urlParam.
    In other words, this wouldn't work:
    new
    Spry.Data.XMLDataSet("products.php?id=23,"products/product");
    I tried to add it to the urlParam in the AutoSuggest
    constructor script below the markup:
    urlParam: "id=23&amp;prd"
    I was hoping that the above would create the following URL
    parameter sting:
    ?id=23&amp;prd=e (assuming that the first typed letter
    would be "e")
    since prd alone produces
    ?prd=e
    But that doesn't seem to work either. Do you have any
    suggestions?
    Thanks!

    Update:
    I just found the solution:
    It works when I'm not using the entity name but the actual
    ampersand "&" in the URL parameter like this:
    urlParam: "id=23&prd"
    Obviously, I also have to set loadFromServer to 'true' to
    correctly filter the record set (I forgot that at first).
    Thanks for the great widget!

  • Using Auto Suggest To Set The Value Of Multipe Form Fields

    I would like to use the Spry 1.5 Preview Auto Suggest widget
    to provide the value for multiple form fields based on the row the
    user selects in the auto suggestion data set. I've placed an
    example of what I want to do here:
    http://www.brucephillips.name/spry/Spry_P1_5_Preview/autosuggest/autosuggestMultipleFields .cfm
    It appears that when the user clicks on one of the rows in
    the auto suggestion data set, the current row for the data set is
    not updated but remains the default (first row in the data set).
    Therefore, if you have a spry:detailregion that uses that data set,
    the values for that detail region are from the first row in the
    data set and not the row the user selected.
    Is it possible to set the current row of the auto suggest
    data set to the row the user clicked on in the auto suggestion data
    set so that the spry:detailregion will have the values from the row
    the user clicked on?
    I had previously modified the Spry 1.4 Auto Suggest widget to
    do this. See:
    http://www.brucephillips.name/blog/index.cfm/2006/11/6/Modifing-Sprys-Auto-Suggest-Widget- to-Bind-Users-Selection-to-A-Form
    Thank you for any assistance.

    Cristian: thank you for the reply. I understand your concern
    about the user changing the auto suggest field after updating the
    complimentary fields. I think that could be handled through user
    instruction. Additionally, instead of using form fields to hold the
    complimentary data I could use non-editable paragraphs.
    I hope the change is not too difficult. I think this
    modification would make the auto suggest widget even more useful.
    For example think about a product auto suggest. User starts to type
    in the name of the product, selects the full product name from the
    auto suggestions, and now the page can immediately show in a
    spry:detailregion all the product details.
    Thanks again for considering my request. I really appreciate
    all the work the Spry team is doing. I'm looking forward to the
    official release of Spry.

Maybe you are looking for