Expiring the announcement will not delete it but will remove it from the public announcement list. Are you sure you want to expire this announcement?
Are you sure you want to delete this announcement?
TIBCO, Dojo Foundation and SitePen Work Together To Drive Innovation in Application Development
http://www.tibco.com/company/news/releases/2009/press956.jsp
Hi I have a type ahead combo component loading a list of user names. If I don't type anything, it seems it shows all the users starting with "a". How can I list all user names in the drop down menu if i don't type in anything, while still keep the type-ahead feature? also, the list has over 5000 user names typcially, and it significantly drags down the performance. do you have any suggestion to enhance the performance? thanks!
the full list is loaded in the browser. this is the xsl file I used to filter out selection when user type in letters. is it something i need to do with this filter file?
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:variable name="upperCase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
<xsl:variable name="lowerCase" select="'abcdefghijklmnopqrstuvwxyz'"/>
<xsl:param name="jsxtext"/>
<xsl:param name="user"/>
<xsl:attribute-set name="userRec">
<xsl:attribute name="jsxid"><xsl:value-of select="$user"/></xsl:attribute>
<xsl:attribute name="jsxtext"><xsl:value-of select="$user"/></xsl:attribute>
</xsl:attribute-set>
<xsl:template match="/">
<data jsxid="jsxroot">
<record jsxid="system" jsxtext="system"/>
<record xsl:use-attribute-sets="userRec"/>
<xsl:for-each select="//record">
<xsl:variable name="mytext"><xsl:value-of select="@jsxtext"/></xsl:variable>
<xsl:if test="starts-with(translate($mytext, $lowerCase, $upperCase), translate($jsxtext, $lowerCase, $upperCase))">
<xsl:copy-of select="."/>
</xsl:if>
</xsl:for-each>
</data>
</xsl:template>
</xsl:stylesheet>
Hi Yichen -
Typically in a case with 5,000 records, we'd use a search function. That's a lot of records for a drop down.
Just some thoughts.
Michael Peachey
Thanks, Mike for the quick reply. The clients like to see the full list. Is it bad for performance?
Not sure about the performance. Never tried to do a 5,000 item drop down list. Seems like scrolling it would take all day. After you build it, let us know what you learn on performance. Also curious how it fares in different browsers, especially if IE6 is a target.
peachey
That's the same pattern I'm using to filter a large dataset, but I use a small jsx3.gui.Dialog that implements a paged Matrix. A similar transformation is triggered for a view filter and is set on the incremental change event for a TextBox.
The XSL:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/>
<xsl:param name="searchFilter"></xsl:param>
<xsl:template match="/">
<xsl:variable name="lowerCase">abcdefghijklmnopqrstuvwxyz</xsl:variable>
<xsl:variable name="upperCase">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable>
<xsl:element name="data">
<xsl:attribute name="jsxid">jsxroot</xsl:attribute>
<xsl:copy-of select="//record[starts-with(translate(@jsxtext,$lowerCase,$upperCase),translat e($searchFilter,$lowerCase,$upperCase))]"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
I also keep the original CDF and switch it to a filtered CDF in case the user removes the filter request.
--Vic
One reason that the pure JSP may not have had an issue with the large list was that the page formatting was done on the server side and had the full resources afforded to it by the web server. When you use GI, or any Ajax technique, to retrieve information and then format it, you are using the browser's resources to do most of the work.
When I build my JavaScript functions to create the request and process the response for such a large list, I make sure that I'm using the asynchronous approach as much as possible. For example, to retrieve a list of currency codes, I use jsx3.sleep to break up the call stack:
jsx3.sleep(function(){app.customer.services.callGetListOfValues(CURRENCY_CODE);} );
and then in that function, it will subscribe to the response for data handling in a callback:
objService.subscribe(jsx3.net.Service.ON_SUCCESS, app.customer.services.onGetListOfValuesSuccess);
When I post process the response for use in a Matrix component, I set the "XML Bind" property to "Bound" so that when I set the document in the Local Data Cache the Matrix is updated without a specific repaint.
If you try to fetch and process data in a single function, it may be part of the frozen browser problem.
--Vic