<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>sven.buschbeck &#187; code</title>
	<atom:link href="http://svenbuschbeck.net/wordpress/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://svenbuschbeck.net/wordpress</link>
	<description>. . . .portfolio.blog. . . .human-computer-interaction. .semantic-web. .computer-science. .communication-design. . . . . . . . . . . . . . . . . . . . . . . . .</description>
	<lastBuildDate>Tue, 31 Jan 2012 09:55:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Sorting lists in GWT</title>
		<link>http://svenbuschbeck.net/wordpress/2012/01/sorting-lists-in-gwt/</link>
		<comments>http://svenbuschbeck.net/wordpress/2012/01/sorting-lists-in-gwt/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 09:50:26 +0000</pubDate>
		<dc:creator>Sven Buschbeck</dc:creator>
				<category><![CDATA[gwt]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[GAE]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://svenbuschbeck.net/wordpress/?p=1091</guid>
		<description><![CDATA[Quick one: Lists.sort(list, comparator) is not implemented in the GAE JVM. But, as a replacement/alternative, Collections.sort(list, comparator) is.]]></description>
			<content:encoded><![CDATA[<p>Quick one:<br />
<code>Lists.sort(list, comparator)</code> is not implemented in the GAE JVM.<br />
But, as a replacement/alternative, <code>Collections.sort(list, comparator)</code> is.</p>
]]></content:encoded>
			<wfw:commentRss>http://svenbuschbeck.net/wordpress/2012/01/sorting-lists-in-gwt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable an Anchor in GWT</title>
		<link>http://svenbuschbeck.net/wordpress/2011/02/disable-an-anchor-in-gwt/</link>
		<comments>http://svenbuschbeck.net/wordpress/2011/02/disable-an-anchor-in-gwt/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 12:27:12 +0000</pubDate>
		<dc:creator>Sven Buschbeck</dc:creator>
				<category><![CDATA[gwt]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[fix]]></category>

		<guid isPermaLink="false">http://svenbuschbeck.net/wordpress/?p=1033</guid>
		<description><![CDATA[Unexpectedly, calling setEnabled(false) does not prevent a link/anchor from being clicked. That means, the click events still get triggered. The reason is more or less a bug in GWT as it updates the list of events that are going to be triggered only at the moment when it gets attached to the DOM (Btw, in [...]]]></description>
			<content:encoded><![CDATA[<p>Unexpectedly, calling <code>setEnabled(false)</code> does not prevent a link/anchor from being clicked. That means, the click events still get triggered.<br />
The reason is more or less a bug in GWT as it updates the list of events that are going to be triggered only at the moment when it gets attached to the DOM (Btw, in GWT, this process is called to sink and to unsink events, where the former enables a specific event to be triggered and the latter disables it).<br />
I found a workaround by creating my own Anchor class and forcing the underlying GWT Anchor to update the list of events to be sunk.</p>
<pre>...
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.Event;

public class Anchor extends com.google.gwt.user.client.ui.Anchor {

	@Override public void setEnabled(boolean enabled) {
		super.setEnabled(enabled);
		if (isAttached()) {
			onDetach();
			if (enabled) {
				sinkEvents(Event.ONCLICK);
			} else {
				unsinkEvents(Event.ONCLICK);
			}
			onAttach();
		}
	}

	@Override protected void onLoad() {
		super.onLoad();
		if (isEnabled()) {
			sinkEvents(Event.ONCLICK);
		} else {
			unsinkEvents(Event.ONCLICK);
		}
	}
}</pre>
<p>Note the <code>onLoad</code> method, it sets up the state when the widget gets attached to the DOM the first time. It is required because <code>setEnabled()</code> could have been called before the anchor got attached.</p>
<p>If you encountered the same issue, please vote for this <a href="http://code.google.com/p/google-web-toolkit/issues/detail?id=6045">bug report</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://svenbuschbeck.net/wordpress/2011/02/disable-an-anchor-in-gwt/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Java Cookies from the Future Past</title>
		<link>http://svenbuschbeck.net/wordpress/2011/02/java-going-back-to-the-future/</link>
		<comments>http://svenbuschbeck.net/wordpress/2011/02/java-going-back-to-the-future/#comments</comments>
		<pubDate>Mon, 07 Feb 2011 13:58:03 +0000</pubDate>
		<dc:creator>Sven Buschbeck</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[pitfall]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://svenbuschbeck.net/wordpress/?p=999</guid>
		<description><![CDATA[While working with cookies in Java/GWT and thus—to set the expire date—with Date, I found a doubtful Java behavior. My goal was to set a cookie to expire in about one month from today like this: Date expires = new Date(new Date().getTime() + 1000 * 60 * 60 * 24 * 30); Cookies.setCookie("myCookie", "myData", expires); [...]]]></description>
			<content:encoded><![CDATA[<p>While working with cookies in Java/GWT and thus—to set the expire date—with <code>Date</code>, I found a doubtful Java behavior.</p>
<p>My goal was to set a cookie to expire in about one month from today like this:</p>
<pre>Date expires = new Date(new Date().getTime() + 1000 * 60 * 60 * 24 * 30);
Cookies.setCookie("myCookie", "myData", expires);</pre>
<p>And kept wondering why the cookie never got stored.</p>
<p>And finally created a simple test case like this:</p>
<pre>Date today = new Date();
Date tomorrow = new Date(today.getTime() + 1000 * 60 * 60 * 24);
Date nextMonth = new Date(today.getTime() + 1000 * 60 * 60 * 24 * 30);</pre>
<p>And got following dates:</p>
<pre>today=Mon Feb 07 14:27:50 CET 2011
tomorrow=Tue Feb 08 14:27:50 CET 2011
nextMonth=Tue Jan 18 21:25:02 CET 2011</pre>
<p>According to Java&#8217;s calculation, the cookie was expired already before even being set. </p>
<p>Took me a bit to understand why:<br />
1000 * 60 * 60 * 24 * 30 = 2,592,000,000 = 0x9A7EC800<br />
Thus, the first bit got set to one&#8230; a classical overflow causing the integer value to become negative &#8211; just try:</p>
<pre>System.out.println(1000 * 60 * 60 * 24 * 30);</pre>
<p>It will print out <code>-1702967296</code>.</p>
<p>Fix: Add a little <code>L</code> will solve the issue by forcing the compiler to calculate using the scope of <code>long</code>:</p>
<pre>Date nextMonthLong = new Date(today.getTime() + 1000L * 60 * 60 * 24 * 30);</pre>
<p>I guess I will fall for that one again sometime as the error is not obvious in my opinion — especially because <code>getTime()</code> returns a <code>long</code> and still, the compiler sticks with an <code>int</code> for the multiplication part. </p>
]]></content:encoded>
			<wfw:commentRss>http://svenbuschbeck.net/wordpress/2011/02/java-going-back-to-the-future/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable Context Menu in GWT</title>
		<link>http://svenbuschbeck.net/wordpress/2011/02/disable-context-menu-in-gwt/</link>
		<comments>http://svenbuschbeck.net/wordpress/2011/02/disable-context-menu-in-gwt/#comments</comments>
		<pubDate>Fri, 04 Feb 2011 21:10:12 +0000</pubDate>
		<dc:creator>Sven Buschbeck</dc:creator>
				<category><![CDATA[gwt]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://svenbuschbeck.net/wordpress/?p=984</guid>
		<description><![CDATA[To make use of the right mouse button, it is necessary to disable the native browser context menu (the popup menu appearing on right click). This can be achieved like this: RootLayoutPanel.get().addDomHandler(new ContextMenuHandler() { @Override public void onContextMenu(ContextMenuEvent event) { event.preventDefault(); event.stopPropagation(); } }, ContextMenuEvent.getType()); Same should work for RootPanel. After that, it is possible [...]]]></description>
			<content:encoded><![CDATA[<p>To make use of the right mouse button, it is necessary to disable the native browser context menu (the popup menu appearing on right click). This can be achieved like this:</p>
<pre>RootLayoutPanel.get().addDomHandler(new ContextMenuHandler() {

	@Override public void onContextMenu(ContextMenuEvent event) {
		event.preventDefault();
		event.stopPropagation();
	}
}, ContextMenuEvent.getType());</pre>
<p>Same should work for <code>RootPanel</code>.</p>
<p>After that, it is possible to make use of the right mouse button for example like this:</p>
<pre>someWidget.addDomHandler(new MouseMoveHandler() {

	@Override public void onMouseMove(MouseMoveEvent event) {
		if (event.getNativeButton() == NativeEvent.BUTTON_RIGHT) {
		...</pre>
]]></content:encoded>
			<wfw:commentRss>http://svenbuschbeck.net/wordpress/2011/02/disable-context-menu-in-gwt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GWT Error Message &#8220;Asked for attribute parser of no type&#8221;</title>
		<link>http://svenbuschbeck.net/wordpress/2011/02/gwt-error-message-asked-for-attribute-parser-of-no-type/</link>
		<comments>http://svenbuschbeck.net/wordpress/2011/02/gwt-error-message-asked-for-attribute-parser-of-no-type/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 22:45:05 +0000</pubDate>
		<dc:creator>Sven Buschbeck</dc:creator>
				<category><![CDATA[gwt]]></category>
		<category><![CDATA[jobs]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[fix]]></category>

		<guid isPermaLink="false">http://svenbuschbeck.net/wordpress/?p=936</guid>
		<description><![CDATA[Example: public boolean isCollapsed() { return panel.isVisible(); } public void setCollapsed() { panel.setVisible(false); } Seen it? Despite the complicated and cryptic error message, the mistake is rather simple: the setter method is missing a parameter, i.e. &#8220;public void setCollapsed(boolean collapsed) {&#8220;.]]></description>
			<content:encoded><![CDATA[<p>Example:</p>
<pre>public boolean isCollapsed() {
	return panel.isVisible();
}

public void setCollapsed() {
	panel.setVisible(false);
}</pre>
<p>Seen it? Despite the complicated and cryptic error message, the mistake is rather simple: the setter method is missing a parameter, i.e. &#8220;public void setCollapsed(boolean collapsed) {&#8220;.</p>
]]></content:encoded>
			<wfw:commentRss>http://svenbuschbeck.net/wordpress/2011/02/gwt-error-message-asked-for-attribute-parser-of-no-type/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Authentication with FlickrJ</title>
		<link>http://svenbuschbeck.net/wordpress/2011/02/authentication-with-flickrj/</link>
		<comments>http://svenbuschbeck.net/wordpress/2011/02/authentication-with-flickrj/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 22:41:18 +0000</pubDate>
		<dc:creator>Sven Buschbeck</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web application]]></category>

		<guid isPermaLink="false">http://svenbuschbeck.net/wordpress/?p=961</guid>
		<description><![CDATA[When you know about username and password logins, the whole Flickr authentication process for web applications seems a little weird on first sight, nevertheless it is logical and necessary after you have done some reading (for example the official Flickr WebApp Auth HowTo). To get started and into coding quickly (using FlickrJ and Java) I [...]]]></description>
			<content:encoded><![CDATA[<p>When you know about username and password logins, the whole Flickr authentication process for web applications seems a little weird on first sight, nevertheless it is logical and necessary after you have done some reading (for example the official <a href="http://www.flickr.com/services/api/auth.howto.web.html">Flickr WebApp Auth HowTo</a>).<br />
To get started and into coding quickly (using <a href="http://flickrj.sourceforge.net/">FlickrJ</a> and Java) I recommend <a href="https://www.phillconrad.org/cisc474/Wiki.jsp?page=Flickr_Authentication">this page</a>. Especially the code example is excellent in my opinion! Thanks Andy Sacher!</p>
]]></content:encoded>
			<wfw:commentRss>http://svenbuschbeck.net/wordpress/2011/02/authentication-with-flickrj/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a New Service (GWT)</title>
		<link>http://svenbuschbeck.net/wordpress/2010/12/adding-a-new-service-gwt/</link>
		<comments>http://svenbuschbeck.net/wordpress/2010/12/adding-a-new-service-gwt/#comments</comments>
		<pubDate>Fri, 03 Dec 2010 15:02:08 +0000</pubDate>
		<dc:creator>Sven Buschbeck</dc:creator>
				<category><![CDATA[gwt]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://svenbuschbeck.net/wordpress/?p=930</guid>
		<description><![CDATA[Adding a new servlet/service to you GWT application is quite straight forward, e.g. by copying the example &#8220;greetingService&#8221; or creating a new servlet. But it&#8217;s easy to overlook a required change/adjustment of your project&#8217;s configuration and you might end up with an error message like &#8220;Blocked attempt to access interface &#8216;some.package.SomeService&#8217;, which is not implemented [...]]]></description>
			<content:encoded><![CDATA[<p>Adding a new servlet/service to you GWT application is quite straight forward, e.g. by copying the example &#8220;greetingService&#8221; or creating a new servlet. But it&#8217;s easy to overlook a required change/adjustment of your project&#8217;s configuration and you might end up with an error message like &#8220;Blocked attempt to access interface &#8216;some.package.SomeService&#8217;, which is not implemented by &#8216;some.other.package.SomeOtherServiceImpl&#8217;; this is either misconfiguration or a hack attempt&#8221;.</p>
<p>Check list (<strong>some</strong> should be replaced with whatever you want to call your new service):</p>
<ul>
<li>Copy or create files:<br />
<strong>Some</strong>Service.java and <strong>Some</strong>ServiceAsync.java in client package<br />
<strong>Some</strong>ServiceImpl.java in server package + change implementation statement to <strong>Some</strong>Service</li>
<li>Adjust web.xml:
<pre>&lt;servlet&gt;
	&lt;servlet-name&gt;<strong>some</strong>Servlet&lt;/servlet-name&gt;
	&lt;servlet-class&gt;some.package.<strong>Some</strong>ServiceImpl&lt;/servlet-class&gt;
&lt;/servlet&gt;
&lt;servlet-mapping&gt;
	&lt;servlet-name&gt;<strong>some</strong>Servlet&lt;/servlet-name&gt;
	&lt;url-pattern&gt;/[copy base directory name from other service declaration]/<strong>some</strong>&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;</pre>
</li>
<li>Annotate interface SomeService.java:
<pre>@RemoteServiceRelativePath("<strong>some</strong>")</pre>
</li>
<li>Connect to your new service in the client:
<pre>private final <strong>Some</strong>ServiceAsync someService = GWT.create(<strong>Some</strong>Service.class);</pre>
</li>
</ul>
<p>Definitely some possibilities to make a mistakes or miss something here.</p>
]]></content:encoded>
			<wfw:commentRss>http://svenbuschbeck.net/wordpress/2010/12/adding-a-new-service-gwt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GWT FileUpload: Adding Widgets to a FormPanel</title>
		<link>http://svenbuschbeck.net/wordpress/2010/09/fileupload-file-not-sent-to-server/</link>
		<comments>http://svenbuschbeck.net/wordpress/2010/09/fileupload-file-not-sent-to-server/#comments</comments>
		<pubDate>Thu, 16 Sep 2010 17:02:53 +0000</pubDate>
		<dc:creator>Sven Buschbeck</dc:creator>
				<category><![CDATA[jobs]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[gwt]]></category>

		<guid isPermaLink="false">http://svenbuschbeck.net/wordpress/?p=861</guid>
		<description><![CDATA[If you build your first GWT form, for example something like that: &#60;!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"&#62; &#60;ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui"&#62; &#60;g:HTMLPanel&#62; &#60;g:FormPanel ui:field="form"&#62;  &#60;g:FileUpload ui:field="uploadField" name="file"/&#62; &#60;g:SubmitButton ui:field="submitButton"&#62;Upload&#60;/g:SubmitButton&#62; &#60;/g:FormPanel&#62; &#60;/g:HTMLPanel&#62; &#60;/ui:UiBinder&#62; And your console keeps telling you during runtime something like this: &#8220;java.lang.IllegalStateException: SimplePanel can only contain one child widget&#8221;. Instead of writing a long page [...]]]></description>
			<content:encoded><![CDATA[<p>If you build your first GWT form, for example something like that:</p>
<pre>&lt;!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"&gt;
&lt;ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui"&gt;
&lt;g:HTMLPanel&gt;
&lt;g:FormPanel ui:field="form"&gt; 
&lt;g:FileUpload ui:field="uploadField" name="file"/&gt;
&lt;g:SubmitButton ui:field="submitButton"&gt;Upload&lt;/g:SubmitButton&gt;
&lt;/g:FormPanel&gt;
&lt;/g:HTMLPanel&gt;
&lt;/ui:UiBinder&gt;</pre>
<p>And your console keeps telling you during runtime something like this:  &#8220;java.lang.IllegalStateException: SimplePanel can only contain one child  widget&#8221;. Instead of writing a long page of explanations and complaints like I did before, it&#8217;s simply like that:</p>
<p>&#8220;Just put all your widgets in a panel (like HorizontalPanel) and add that panel to the FormPanel.&#8221; (Jake − cf. comment below)</p>
<p>Thanks Jake! <img src='http://svenbuschbeck.net/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://svenbuschbeck.net/wordpress/2010/09/fileupload-file-not-sent-to-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>First GWT Steps</title>
		<link>http://svenbuschbeck.net/wordpress/2010/08/first-gwt-steps/</link>
		<comments>http://svenbuschbeck.net/wordpress/2010/08/first-gwt-steps/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 09:41:44 +0000</pubDate>
		<dc:creator>Sven Buschbeck</dc:creator>
				<category><![CDATA[jobs]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[gwt]]></category>

		<guid isPermaLink="false">http://svenbuschbeck.net/wordpress/?p=855</guid>
		<description><![CDATA[Just started to work with GWT – a pretty interesting approach for web development compared to PHP or JSF. The whole Application engine is quite impressive especially allowing you to quickly test your applications locally by supporting automatic hot deployment after each code update. One thing that took me a while was one of that [...]]]></description>
			<content:encoded><![CDATA[<p>Just started to work with GWT – a pretty interesting approach for web development compared to PHP or JSF. The whole Application engine is quite impressive especially allowing you to quickly test your applications locally by supporting automatic hot deployment after each code update.<br />
One thing that took me a while was one of that &#8220;[ERROR] Unable to find &#8217;[some-file].xml&#8217; on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?&#8221; errors. If you are sure the file is in place, I realized restarting the App Engine or Eclipse mostly solves that problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://svenbuschbeck.net/wordpress/2010/08/first-gwt-steps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Make Jquerymenu for Drupal Keep its State on Page Reload</title>
		<link>http://svenbuschbeck.net/wordpress/2010/02/how-to-make-jquerymenu-for-drupal-keeping-its-state-on-page-reload/</link>
		<comments>http://svenbuschbeck.net/wordpress/2010/02/how-to-make-jquerymenu-for-drupal-keeping-its-state-on-page-reload/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 18:13:32 +0000</pubDate>
		<dc:creator>Sven Buschbeck</dc:creator>
				<category><![CDATA[jobs]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://svenbuschbeck.net/wordpress/?p=804</guid>
		<description><![CDATA[While setting up the website for my new project &#8220;Glocal&#8221; www.glocal-project.eu), I came across the problem of finding a proper menu module. Something easy to use, stable and efficient in the same time for the complex intranet structure (therefore, sorry, but you will not be able to see my solution there unless you are a [...]]]></description>
			<content:encoded><![CDATA[<p>While setting up the website for my new project &#8220;Glocal&#8221; <a title="See project website" href="http://www.glocal-project.eu" target="_blank">www.glocal-project.eu</a>), I came across the problem of finding a proper menu module. Something easy to use, stable and efficient in the same time for the complex intranet structure (therefore, sorry, but you will not be able to see my solution there unless you are a project member). Something with a high usability in the end. <a title="Go to Activemenu project page" href="http://drupal.org/project/activemenu" target="_blank">Activemenu</a> is still quite buggy and <a title="Go to DHTML Menu project page" href="http://drupal.org/project/dhtml_menu" target="_blank">DHTML Menue</a> requires a double click to actually open a page — unbearable in a non-doulbe-click environment like the Internet — who is supposed to guess, that this menu requires a double click?? Leaving me with <a title="Go to Activemenu project page" href="http://drupal.org/project/jquerymenu" target="_blank">JQuerymenu</a>.</p>
<p>First impression: perfect! Open and close branches by clicking (+) or (-) — view page by clicking menu item label. Even the few styling issues could be fixed easily by using CSS. But as soon, as someone clicks a label, the menu collapses to its default status. It does not remember its last status after loading a different page with the same menu.</p>
<p>Is this it? All module have critical downsides like this? I was quite disappointed! <img src='http://svenbuschbeck.net/wordpress/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>But I taught JQuerymenu to remember!</p>
<p>As it is quite some code, I will not post it here directly, but added it to the <a title="See tracker page" href="http://drupal.org/node/373273" target="_blank">tracker page for this &#8220;feature request&#8221;</a> or you can download the two updated files (<a title="Right click to save file to your disk" href="/media/drupal/jquerymenu.js" target="_blank">jquerymenu.js</a> and <a title="Right click to save file to your disk" href="/media/drupal/jquerymenu.module" target="_blank">jquerymenu.module</a>) here and replace the once in your /sites/all/modules/jquerymenu folder.</p>
<p>But please be careful, it should be considered an alpha version, there are quite some weaknesses (see tracker page). <em>Any feedback or suggestions are very welcome!<br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://svenbuschbeck.net/wordpress/2010/02/how-to-make-jquerymenu-for-drupal-keeping-its-state-on-page-reload/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

