Posts

Showing posts with the label autocomplete

How to provide user with advanced autocomplete suggestions for given boost::spirit grammar?

Image
Clash Royale CLAN TAG #URR8PPP How to provide user with advanced autocomplete suggestions for given boost::spirit grammar? This actually builds up after my previous question: How to provider user with autocomplete suggestions for given boost::spirit grammar? To Sehe solution I've added annotater for syntax coloring: First by adopting hints structure to this (note: ast_type_t is an enum class ): hints ast_type_t enum class template <class ast_type_t> class hints_t { struct by_location_t { template<typename T, typename U> bool operator()(T const& a, U const& b) const { if(loc(a) == loc(b)) return size(a) > size(b); return loc(a) < loc(b); } private: static location_t loc(source_t const& s) { return s.begin(); } static location_t loc(location_t const& l) { return l; } static std::size_t size(source_t const& ...

How to change source of Struts2 autocompleter?

Image
Clash Royale CLAN TAG #URR8PPP How to change source of Struts2 autocompleter? So i've made an autocompleter UI using struts2 tag. i.e "sj:autocompleter" I need to change the source of the autocompleter on keyup. I'm giving first 100 results initially and then on keyup function i want the the source to change dynamically. How can i achieve this? This is my autompleter tag <sj:autocompleter name="locationName" selectBox="true" selectBoxIcon="true" requiredLabel="" id="USER_NAME" autocomplete="off" tabindex="%{session.fielddata.USER_NAME.getSearchFilterSequence()}" label="%{session.fielddata.USER_NAME.getFieldLabel()}" parentTheme="xhtml" labelSeparator="" list="session.initialUserListForDropDown" value="%{session.searchcriteria.locationName}" cssClass="pointercursor resetfields" style=...