
<?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>doOriented.com</title>
	<atom:link href="http://www.dooriented.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dooriented.com/blog</link>
	<description>Less words, more code</description>
	<lastBuildDate>Mon, 07 Mar 2011 18:58:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Websphere errors regarding Oracle transaction recovery</title>
		<link>http://www.dooriented.com/blog/2011/03/07/websphere-errors-regarding-oracle-transaction-recovery/</link>
		<comments>http://www.dooriented.com/blog/2011/03/07/websphere-errors-regarding-oracle-transaction-recovery/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 18:55:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[WAS]]></category>
		<category><![CDATA[Websphere]]></category>

		<guid isPermaLink="false">http://www.dooriented.com/blog/?p=83</guid>
		<description><![CDATA[When restarting Websphere there are occasions when you get errors related to Oracle transaction recovery. This happens because Websphere is set to recover the transactions that were not handled when the server went down and it cannot do so because Oracle requires special permissions to attempt to perform the recovery. This problem can occur with [...]]]></description>
			<content:encoded><![CDATA[<p>When restarting Websphere there are occasions when you get errors related to Oracle transaction recovery.</p>
<p>This happens because Websphere is set to recover the transactions that were not handled when the server went down and it cannot do so because Oracle requires special permissions to attempt to perform the recovery.</p>
<p>This problem can occur with all versions of Oracle: 8i, 9i, 10g, 11g.</p>
<p>To resolve the problem, the following commands are needed to be executed as SYS:<br />
grant select on pending_trans$ to &lt;&lt;user&gt;&gt;;<br />
grant select on dba_2pc_pending to &lt;&lt;user&gt;&gt;;<br />
grant select on dba_pending_transactions to &lt;&lt;user&gt;&gt;;<br />
grant execute on dbms_system to &lt;&lt;user&gt;&gt;;<br />
where &lt;&lt;user&gt;&gt; is the username configured in the Websphere datasource, for that specific database.</p>
<p>If you don&#8217;t care to recover those transactions and you just hate seeing that exception in the logs over and over again (it does not go away if you attempt yet another restart), you can go ahead and delete the transactions manually.</p>
<p>The transaction logs are stored in the following folder:<br />
<em>&lt;WebSphere Application Server_install_root</em>&gt;\profiles\&lt;PROFILE_NAME&gt;\tranlog\&lt;CELL_NAME&gt;\&lt;NODE_NAME&gt;\&lt;SERVER_NAME&gt;\transaction<br />
You&#8217;d have to stop the Websphere server, delete the content of  &#8216;\transaction&#8217; folder and all subdirectories and restart the Websphere server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dooriented.com/blog/2011/03/07/websphere-errors-regarding-oracle-transaction-recovery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Structuring your code with JQuery</title>
		<link>http://www.dooriented.com/blog/2011/02/17/structuring-your-code-with-jquery/</link>
		<comments>http://www.dooriented.com/blog/2011/02/17/structuring-your-code-with-jquery/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 17:28:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://www.dooriented.com/blog/?p=72</guid>
		<description><![CDATA[Once you get passed your need to just link certain DOM elements to some hefty Javascript, which as far as I&#8217;m concerned JQuery does best, you ultimately get to a point where you have scripts that are just too big to easily maintain. What then? There&#8217;s not really that much written on this subject. No [...]]]></description>
			<content:encoded><![CDATA[<p>Once you get passed your need to just link certain DOM elements to  some hefty Javascript, which as far as I&#8217;m concerned JQuery does best,  you ultimately get to a point where you have scripts that are just too  big to easily maintain. What then? There&#8217;s not really that much written  on this subject. No where near the best practices that you find on other  languages.</p>
<p>The quickest and no bull presentation I could find out is embedded  below. It&#8217;s not new, but it&#8217;s a very useful one on how to structure your  code with JQuery.</p>
<p>I chose to disregard the &#8220;common belief&#8221; that JQuery is not suppose  to be used to write large Javascript apps. One should be using Dojo or  YUI for that. Agai, I think there&#8217;s nothing better than JQuery at the  moment. That&#8217;s the library that made me [finally] accept that the best  way to build web apps is to have [any] Javascript framework at the core  and use the server side only to &#8230; serve your scripts (and that after  coding in Java for more than 10 years and most of those for the web, in  one form or another).</p>
<div style="width: 425px;"><strong style="display: block; margin: 12px 0 4px;"><a title="How To Manage Large jQuery Apps" href="http://www.slideshare.net/SlexAxton/how-to-manage-large-jquery-apps">How To Manage Large jQuery Apps</a></strong><object id="__sse3843303" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=largejqueryapps-100424175106-phpapp02&amp;stripped_title=how-to-manage-large-jquery-apps&amp;userName=SlexAxton" /><param name="name" value="__sse3843303" /><param name="allowfullscreen" value="true" /><embed id="__sse3843303" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=largejqueryapps-100424175106-phpapp02&amp;stripped_title=how-to-manage-large-jquery-apps&amp;userName=SlexAxton" name="__sse3843303" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
<div id="__ss_3843303" style="width: 425px;">
<div style="padding: 5px 0 12px;">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/SlexAxton">Alex Sexton</a>.</div>
</div>
<p>And then I found another one&#8230;</p>
<div style="width:425px" id="__ss_3885158"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/rmurphey/building-large-jquery-applications" title="Building Large jQuery Applications">Building Large jQuery Applications</a></strong><object id="__sse3885158" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=large-jquery-apps-100428110214-phpapp01&#038;stripped_title=building-large-jquery-applications&#038;userName=rmurphey" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse3885158" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=large-jquery-apps-100428110214-phpapp01&#038;stripped_title=building-large-jquery-applications&#038;userName=rmurphey" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/rmurphey">Rebecca Murphey</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.dooriented.com/blog/2011/02/17/structuring-your-code-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Meebo, historically</title>
		<link>http://www.dooriented.com/blog/2011/02/16/meebo-historically/</link>
		<comments>http://www.dooriented.com/blog/2011/02/16/meebo-historically/#comments</comments>
		<pubDate>Wed, 16 Feb 2011 08:38:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[History]]></category>
		<category><![CDATA[Meebo]]></category>

		<guid isPermaLink="false">http://www.dooriented.com/blog/2011/02/16/meebo-historically/</guid>
		<description><![CDATA[Reading this news here &#8211; Meebo started back in 2005, probably even earlier. Still, gotta wonder, 6 years and 25 60 venture capital millions (or better yet, two of the best VC companies behind you)&#8230; it took them quite a while for a chat app, didn&#8217;t it? It&#8217;s even funnier how &#8220;back then&#8221; 2005 seems]]></description>
			<content:encoded><![CDATA[<p>Reading this news <a href="http://gigaom.com/2005/09/14/ajax-based-im-meebo/" target="_blank">here</a> &#8211; Meebo started back in 2005, probably even earlier. Still, gotta wonder, 6 years and <span style="text-decoration: line-through;">25</span> 60 venture capital millions (or better yet, two of the best VC companies behind you)&#8230; it took them quite a while for a chat app, didn&#8217;t it?</p>
<p>It&#8217;s even funnier how &#8220;back then&#8221; 2005 seems <img src='http://www.dooriented.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dooriented.com/blog/2011/02/16/meebo-historically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wicket Component &#8211; Simple Breadcrumbs</title>
		<link>http://www.dooriented.com/blog/2009/05/12/wicket-component-simple-breadcrumbs/</link>
		<comments>http://www.dooriented.com/blog/2009/05/12/wicket-component-simple-breadcrumbs/#comments</comments>
		<pubDate>Tue, 12 May 2009 12:29:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Wicket]]></category>

		<guid isPermaLink="false">http://www.dooriented.com/blog/?p=57</guid>
		<description><![CDATA[A very simple simple wicket component to display links in an hierarchical order. You can see it live here Full sources are available here. This is how you add it to the page: Java add(new Breadcrumbs(&#34;breadcrumbs&#34;, Arrays.asList(new WCLink[]{ new WCLink(&#34;Web application section 1&#34;, &#34;http://www.1.com&#34;), new WCLink(&#34;Web application section 11&#34; , &#34;http://www.11.com&#34;), new WCLink(&#34;Web application section [...]]]></description>
			<content:encoded><![CDATA[<p>A very simple simple wicket component to display links in an hierarchical order. You can see it live <a target='_new' href="http://www.dooriented.com/wicketcomponents/breadcrumbs.html">here</a></p>
<p>Full sources are available <a href="http://www.dooriented.com/blog/resources/wicketcomponents-0.1.jar">here</a>.</p>
<p>This is how you add it to the page:</p>
<p><b>Java</b></p>
<pre class="brush: java">
		add(new Breadcrumbs(&quot;breadcrumbs&quot;,
			Arrays.asList(new WCLink[]{
					new WCLink(&quot;Web application section 1&quot;, &quot;http://www.1.com&quot;),
					new WCLink(&quot;Web application section 11&quot; , &quot;http://www.11.com&quot;),
					new WCLink(&quot;Web application section 111&quot;, &quot;http://www.111.com&quot;)
			}),this));
</pre>
<p><b>HTML</b></p>
<pre class="brush: html">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.1//EN&quot; &quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot;&gt;
&lt;html xmlns:wicket&gt;
&lt;body&gt;
    &lt;div wicket:id=&quot;breadcrumbs&quot;/&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Wicket component code:<br />
<b>Breadcrumbs.html</b></p>
<pre class="brush: html">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.1//EN&quot; &quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot;&gt;
&lt;html xmlns:wicket&gt;
&lt;head&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;wicket:panel&gt;
    &lt;!--
    Wicket component:   JQuery Accordion Menu
    Author:             Nova Creator Software
    Website:            www.novacreator.com
    Software provided as is, without any guarantees.
    Free for any type of usage. We just kindly ask to keep this message.
    --&gt;
    &lt;ul id=&quot;breadcrumbs&quot;&gt;
        &lt;li wicket:id=&quot;repeater&quot;&gt;&lt;a wicket:id=&quot;link&quot;&gt;&lt;span wicket:id=&quot;linkName&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
&lt;/wicket:panel&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><b>Breadcrumbs.java</b></p>
<pre class="brush: java">
package com.novacreator.wicketcomponents.breadcrumbs;

import java.util.List;

import org.apache.wicket.AttributeModifier;
import org.apache.wicket.ResourceReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxFallbackLink;
import org.apache.wicket.behavior.HeaderContributor;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.markup.html.resources.CompressedResourceReference;
import org.apache.wicket.markup.repeater.RepeatingView;
import org.apache.wicket.model.Model;

import com.novacreator.wicketcomponents.common.WCLink;

/*
Wicket component:   Breadcrumbs
Author:             Nova Creator Software
Website:            www.novacreator.com
Software provided as is, without any guarantees.
Free for any type of usage. We just kindly ask to keep this message.
*/
@SuppressWarnings(&quot;serial&quot;)
public class Breadcrumbs extends Panel {
	private static final ResourceReference CSS =
		new CompressedResourceReference(Breadcrumbs.class, &quot;res/breadcrumbs.css&quot;);

	public Breadcrumbs(String id, List&lt;WCLink&gt; links, final BreadcrumbsListener listener) {
		super(id);

		add(HeaderContributor.forCss(CSS));

		RepeatingView rv = new RepeatingView(&quot;repeater&quot;);
		add(rv);
		AjaxFallbackLink afl = null;
		for(final WCLink link : links) {
			WebMarkupContainer wmc = new WebMarkupContainer(rv.newChildId());
			rv.add(wmc);
			afl = new AjaxFallbackLink(&quot;link&quot;){
				@Override
				public void onClick(AjaxRequestTarget target) {
					if(link.getLink() != null &amp;amp;&amp;amp; !link.getLink().isEmpty()) {
						listener.onBreadcrumbsClick(link.getLink(), target);
					}
				}
			};
			wmc.add(afl);
			afl.add(new Label(&quot;linkName&quot;, link.getDisplayName()));
		}
		afl.add(new AttributeModifier(&quot;style&quot;, true, new Model(&quot;background:none;&quot;)));
	}
}
</pre>
<p><b>BreadcrumbsListener.java</b></p>
<pre class="brush: java">
package com.novacreator.wicketcomponents.breadcrumbs;

import org.apache.wicket.ajax.AjaxRequestTarget;

/*
Wicket component:   Breadcrumbs
Author:             Nova Creator Software
Website:            www.novacreator.com
Software provided as is, without any guarantees.
Free for any type of usage. We just kindly ask to keep this message.
*/
public interface BreadcrumbsListener {
	public void onBreadcrumbsClick(String link, AjaxRequestTarget target);
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.dooriented.com/blog/2009/05/12/wicket-component-simple-breadcrumbs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Wicket Component &#8211; JQuery Accordion Menu</title>
		<link>http://www.dooriented.com/blog/2009/05/11/wicket-component-jquery-accordion-menu/</link>
		<comments>http://www.dooriented.com/blog/2009/05/11/wicket-component-jquery-accordion-menu/#comments</comments>
		<pubDate>Mon, 11 May 2009 09:11:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Wicket]]></category>

		<guid isPermaLink="false">http://www.dooriented.com/blog/?p=48</guid>
		<description><![CDATA[Presenting a very simple wicket component for everybody to use &#8211; a JQuery accordion menu. You can see it live here Full sources are available here This is how you add it to the page: Java Map&#60;AccordionLink, List&#60;AccordionLink&#62;&#62; menus = new LinkedHashMap&#60;AccordionLink, List&#60;AccordionLink&#62;&#62;(); menus.put(new AccordionLink(&#34;Menu1&#34;, &#34;http://www.menu1.com&#34;), Arrays.asList( new AccordionLink(&#34;11&#34;, &#34;http://www.menu11.com&#34;), new AccordionLink(&#34;12&#34;, &#34;http://www.menu12.com&#34;), new AccordionLink(&#34;13&#34;, [...]]]></description>
			<content:encoded><![CDATA[<p>Presenting a very simple wicket component for everybody to use &#8211; a JQuery accordion menu. </p>
<p>You can see it live <a  target='_new' href="http://www.dooriented.com/wicketcomponents/accordion_menu.html">here</a></p>
<p>Full sources are available <a href="http://www.dooriented.com/blog/resources/wicketcomponents.jar">here</a></p>
<p>This is how you add it to the page:</p>
<p><b>Java</b></p>
<pre class="brush: java">
		Map&lt;AccordionLink, List&lt;AccordionLink&gt;&gt; menus = new LinkedHashMap&lt;AccordionLink, List&lt;AccordionLink&gt;&gt;();
		menus.put(new AccordionLink(&quot;Menu1&quot;, &quot;http://www.menu1.com&quot;),
				Arrays.asList(
						new AccordionLink(&quot;11&quot;, &quot;http://www.menu11.com&quot;),
						new AccordionLink(&quot;12&quot;, &quot;http://www.menu12.com&quot;),
						new AccordionLink(&quot;13&quot;, &quot;http://www.menu13.com&quot;)));
		menus.put(new AccordionLink(&quot;Menu2&quot;, &quot;http://www.menu2.com&quot;),
				Arrays.asList(
						new AccordionLink(&quot;21&quot;, &quot;http://www.menu21.com&quot;),
						new AccordionLink(&quot;22&quot;, &quot;http://www.menu22.com&quot;),
						new AccordionLink(&quot;23&quot;, &quot;http://www.menu23.com&quot;)));
		menus.put(new AccordionLink(&quot;Menu3&quot;, &quot;http://www.menu3.com&quot;),
				Arrays.asList(
						new AccordionLink(&quot;31&quot;, &quot;http://www.menu31.com&quot;),
						new AccordionLink(&quot;32&quot;, &quot;http://www.menu32.com&quot;),
						new AccordionLink(&quot;33&quot;, &quot;http://www.menu33.com&quot;)));
		menus.put(new AccordionLink(&quot;Menu4&quot;, &quot;http://www.menu2.com&quot;),
				Arrays.asList(
						new AccordionLink(&quot;41&quot;, &quot;http://www.menu41.com&quot;),
						new AccordionLink(&quot;42&quot;, &quot;http://www.menu42.com&quot;),
						new AccordionLink(&quot;43&quot;, &quot;http://www.menu43.com&quot;)));
		menus.put(new AccordionLink(&quot;Menu5&quot;, &quot;http://www.menu2.com&quot;),
				Arrays.asList(
						new AccordionLink(&quot;51&quot;, &quot;http://www.menu51.com&quot;),
						new AccordionLink(&quot;52&quot;, &quot;http://www.menu52.com&quot;),
						new AccordionLink(&quot;53&quot;, &quot;http://www.menu53.com&quot;)));
		add(new AccordionMenu(&quot;menu&quot;, menus, true, this));
</pre>
<p>The important line is add(new AccordionMenu(&#8220;menu&#8221;, menus, true, this));</p>
<p><b>HTML</b></p>
<pre class="brush: html">
&lt;html xmlns:wicket&gt;
&lt;body&gt;
    &lt;div wicket:id=&quot;menu&quot;/&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Wicket component code:<br />
<b>AccordionMenu.html</b></p>
<pre class="brush: html">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.1//EN&quot; &quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot;&gt;
&lt;html xmlns:wicket&gt;
&lt;head&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;wicket:panel&gt;
    &lt;!--
    Wicket component:   JQuery Accordion Menu
    Author:             Nova Creator Software
    Website:            www.novacreator.com
    Software provided as is, without any guarantees.
    Free for any type of usage. We just kindly ask to keep this message.
     --&gt;
    &lt;div wicket:id=&quot;topdiv&quot; class=&quot;menu_list&quot;&gt;
        &lt;p wicket:id=&quot;repeatItems&quot; class=&quot;menu_head&quot;&gt;
            &lt;span wicket:id=&quot;menuItem&quot;&gt;&lt;/span&gt;
	        &lt;div class=&quot;menu_body&quot;&gt;
	             &lt;a wicket:id=&quot;menuSubItem&quot;&gt;
	                &lt;span wicket:id=&quot;menuSubItemName&quot;/&gt;
	             &lt;/a&gt;
	        &lt;/div&gt;
        &lt;/p&gt;
    &lt;/div&gt;
&lt;/wicket:panel&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><b>AccordionMenu.java</b></p>
<pre class="brush: java">
package com.novacreator.wicketcomponents.jquery.accordionmenu;

import java.util.List;
import java.util.Map;

import org.apache.wicket.AttributeModifier;
import org.apache.wicket.ResourceReference;
import org.apache.wicket.ajax.AjaxEventBehavior;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxFallbackLink;
import org.apache.wicket.behavior.HeaderContributor;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.markup.html.resources.CompressedResourceReference;
import org.apache.wicket.markup.html.resources.JavascriptResourceReference;
import org.apache.wicket.markup.repeater.RepeatingView;
import org.apache.wicket.model.Model;

/*
    Wicket component:   JQuery Accordion Menu
    Author:             Nova Creator Software
    Website:            www.novacreator.com
    Software provided as is, without any guarantees.
    Free for any type of usage. We just kindly ask to keep this message.
 */
@SuppressWarnings(&quot;serial&quot;)
public class AccordionMenu extends Panel {
	private static final ResourceReference JQUERYJS =
		new JavascriptResourceReference(AccordionMenu.class, &quot;../res/jquery.js&quot;);
	private static final ResourceReference ACCORDIONJS =
		new JavascriptResourceReference(AccordionMenu.class, &quot;../res/accordionmenu.js&quot;);
	private static final ResourceReference CSS =
		new CompressedResourceReference(AccordionMenu.class, &quot;../res/accordionmenu.css&quot;);

	public AccordionMenu(String id, final Map&lt;AccordionLink, List&lt;AccordionLink&gt;&gt; menus, boolean autoExpand, final AccordionMenuListener listener) {
		super(id);

		add(HeaderContributor.forJavaScript(JQUERYJS));
		add(HeaderContributor.forJavaScript(ACCORDIONJS));
		add(HeaderContributor.forCss(CSS));

		WebMarkupContainer topDiv = new WebMarkupContainer(&quot;topdiv&quot;);
		add(topDiv);
		if(autoExpand) {
			topDiv.add(new AttributeModifier(&quot;id&quot;, true, new Model(&quot;autoexpand&quot;)));
		} else {
			topDiv.add(new AttributeModifier(&quot;id&quot;, true, new Model(&quot;noautoexpand&quot;)));
		}
		RepeatingView menuItems = new RepeatingView(&quot;repeatItems&quot;);
		topDiv.add(menuItems);

		for(final AccordionLink menu : menus.keySet()) {
			WebMarkupContainer wmc = new WebMarkupContainer(menuItems.newChildId());
			menuItems.add(wmc);
			wmc.add(new AjaxEventBehavior(&quot;onclick&quot;){
				@Override
				protected void onEvent(AjaxRequestTarget target) {
					if(menu.getLink() != null &amp;amp;amp;amp;amp;amp;&amp;amp;amp;amp;amp;amp; !menu.getLink().isEmpty()) {
						listener.onAccordionMenuClick(menu.getLink(), target);
					}
				}
			});
			wmc.add(new Label(&quot;menuItem&quot;, menu.getDisplayName()));
			RepeatingView menuSubItems = new RepeatingView(&quot;menuSubItem&quot;);
			wmc.add(menuSubItems);
			for(final AccordionLink item : menus.get(menu)) {
				AjaxFallbackLink iaf = new AjaxFallbackLink(menuSubItems.newChildId()) {
					@Override
					public void onClick(AjaxRequestTarget target) {
						if(item.getLink() != null &amp;amp;amp;amp;amp;amp;&amp;amp;amp;amp;amp;amp; !item.getLink().isEmpty()) {
							listener.onAccordionMenuClick(item.getLink(), target);
						}
					}
				};
				iaf.add(new Label(&quot;menuSubItemName&quot;, item.getDisplayName()));
				menuSubItems.add(iaf);
			}
		}
	}
}
</pre>
<p><b>AccordionMenuListener.java</b></p>
<pre class="brush: java">
package com.novacreator.wicketcomponents.jquery.accordionmenu;

import org.apache.wicket.ajax.AjaxRequestTarget;

/*
Wicket component:   JQuery Accordion Menu
Author:             Nova Creator Software
Website:            www.novacreator.com
Software provided as is, without any guarantees.
Free for any type of usage. We just kindly ask to keep this message.
*/
public interface AccordionMenuListener {
	public void onAccordionMenuClick(String link, AjaxRequestTarget target);
}
</pre>
<p><b>AccordionLink.java</b></p>
<pre class="brush: java">
package com.novacreator.wicketcomponents.jquery.accordionmenu;

import java.io.Serializable;

/*
Wicket component:   JQuery Accordion Menu
Author:             Nova Creator Software
Website:            www.novacreator.com
Software provided as is, without any guarantees.
Free for any type of usage. We just kindly ask to keep this message.
*/
@SuppressWarnings(&quot;serial&quot;)
public class AccordionLink implements Serializable {
	private String displayName;
	private String link;

	public AccordionLink(String displayName, String link) {
		this.displayName = displayName;
		this.link = link;
	}

	public String getDisplayName() {
		return displayName;
	}
	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}
	public String getLink() {
		return link;
	}
	public void setLink(String link) {
		this.link = link;
	}
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.dooriented.com/blog/2009/05/11/wicket-component-jquery-accordion-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to prevent IFrame to display your website</title>
		<link>http://www.dooriented.com/blog/2009/05/08/how-to-prevent-iframe-to-display-your-website/</link>
		<comments>http://www.dooriented.com/blog/2009/05/08/how-to-prevent-iframe-to-display-your-website/#comments</comments>
		<pubDate>Fri, 08 May 2009 12:23:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.dooriented.com/blog/?p=45</guid>
		<description><![CDATA[If you don&#8217;t want your webpage to be displayed inside another website, in an IFrame, use this: &#60;script type=&#34;text/javascript&#34;&#62; &#60;!-- if (top.location.href != self.location.href) top.location.href = self.location.href; //--&#62; &#60;/script&#62;]]></description>
			<content:encoded><![CDATA[<p>If you don&#8217;t want your webpage to be displayed inside another website, in an IFrame, use this:</p>
<pre class="brush: php">
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
if (top.location.href != self.location.href)
  top.location.href = self.location.href;
//--&gt;
&lt;/script&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.dooriented.com/blog/2009/05/08/how-to-prevent-iframe-to-display-your-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java interface contract</title>
		<link>http://www.dooriented.com/blog/2009/05/08/java-interface-contract/</link>
		<comments>http://www.dooriented.com/blog/2009/05/08/java-interface-contract/#comments</comments>
		<pubDate>Thu, 07 May 2009 23:09:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.dooriented.com/blog/?p=40</guid>
		<description><![CDATA[Suppose you have an interface defined like this: interface someInterface { Object someMethod(Object someObject); } First thing you have to know is that interfaces are only public if you define them as such. If you don&#8217;t they can only be implemented by classes in that package. Just like the interfaces themselves, the methods defined in [...]]]></description>
			<content:encoded><![CDATA[<p>Suppose you have an interface defined like this:</p>
<p>interface someInterface {</p>
<p>Object someMethod(Object someObject);</p>
<p>}</p>
<p>First thing you have to know is that interfaces are only public if you define them as such. If you don&#8217;t they can only be implemented by classes in that package. </p>
<p>Just like the interfaces themselves, the methods defined in an interface are public no matter if you define them as so.  Please also note that you cannot define interface members (methods or variables) as private. All you can do is have them public and/or abstract. Just as a quick reminder, a constant in Java is defined as public static abstract.</p>
<p>By looking at the signature of the method someMethod, it is clear that it requires an Object  (someObject) and that it returns a result &#8211; an object. This is the contract defined by the interface.</p>
<p>Java is a complex language &#8211; defining the method as returning an object allows you to return whatever type of an object you want. You can return a String, a Collection (for instance a List) and, starting from Java 5, even a primitive like int because out of the box that primitive will be wrapped inside an Integer object and unwrapped after the call.</p>
<p>One thing you have to be careful when defining a class that implements this method is that you might be tempted to define it like this:</p>
<p>String someMethod(Integer someInteger).</p>
<p>After all someMethod expects an Object and Integer is an Object, right? Well, in Java all classes extend the Object class, so that should make sense. BUT that would brake the contract. The programmer looking at the interface contract would expect to be able to call someMethod with any object. If you were able to define someMethod expecting an Integer, that method could not possibly accept an Object because Object is not necessarely an Integer! So the answer is NO &#8211; when you implement someMethod, you have to follow the signature from the interface, as far as the arguments go. Although YOU CAN call the method with any kind of objects you want, since it just expects an object.</p>
<p>Remember, you can implement the interface by making it return the type of object specified in the signature or objects that extend it, but you have to keep the same objects in the arguments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dooriented.com/blog/2009/05/08/java-interface-contract/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to get IP address in PHP</title>
		<link>http://www.dooriented.com/blog/2009/05/07/how-to-get-ip-address-in-php/</link>
		<comments>http://www.dooriented.com/blog/2009/05/07/how-to-get-ip-address-in-php/#comments</comments>
		<pubDate>Thu, 07 May 2009 18:02:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.dooriented.com/blog/?p=35</guid>
		<description><![CDATA[Using getenv: &#60;?php // Example use of getenv() $ip = getenv(&#039;REMOTE_ADDR&#039;); // Or simply use a Superglobal ($_SERVER or $_ENV) $ip = $_SERVER[&#039;REMOTE_ADDR&#039;]; ?&#62; Please note that the function &#8216;getenv&#8217; does not work if your Server API is ASAPI (IIS). In this case use $_SERVER["REMOTE_ADDR"]. Here is an interesting function to get the real IP [...]]]></description>
			<content:encoded><![CDATA[<p>Using getenv:</p>
<pre class="brush: php">
&lt;?php
// Example use of getenv()
$ip = getenv(&#039;REMOTE_ADDR&#039;);

// Or simply use a Superglobal ($_SERVER or $_ENV)
$ip = $_SERVER[&#039;REMOTE_ADDR&#039;];
?&gt;
</pre>
<p>Please note that the function &#8216;getenv&#8217; does not work if your Server API is ASAPI (IIS). In this case use $_SERVER["REMOTE_ADDR"].</p>
<p>Here is an interesting function to get the real IP address:</p>
<pre class="brush: php">
function getRealIpAddr()
{
if (!empty($_SERVER[&#039;HTTP_CLIENT_IP&#039;]))   //check ip from share internet
{
$ip=$_SERVER[&#039;HTTP_CLIENT_IP&#039;];
}
elseif (!empty($_SERVER[&#039;HTTP_X_FORWARDED_FOR&#039;]))   //to check ip is pass from proxy
{
$ip=$_SERVER[&#039;HTTP_X_FORWARDED_FOR&#039;];
}
else
{
$ip=$_SERVER[&#039;REMOTE_ADDR&#039;];
}
return $ip;
}
</pre>
<p>or even better</p>
<pre class="brush: php">
function getIpAddress() {
return (empty($_SERVER[&#039;HTTP_CLIENT_IP&#039;])?(empty($_SERVER[&#039;HTTP_X_FORWARDED_FOR&#039;])?
$_SERVER[&#039;REMOTE_ADDR&#039;]:$_SERVER[&#039;HTTP_X_FORWARDED_FOR&#039;]):$_SERVER[&#039;HTTP_CLIENT_IP&#039;]);
}
</pre>
<p>One very important thing is that there is no way to find the IP address of a computer that&#8217;s behind the anonymous proxy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dooriented.com/blog/2009/05/07/how-to-get-ip-address-in-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Simpsons + Apple = Mapple</title>
		<link>http://www.dooriented.com/blog/2009/05/06/the-simpsons-apple-mapple/</link>
		<comments>http://www.dooriented.com/blog/2009/05/06/the-simpsons-apple-mapple/#comments</comments>
		<pubDate>Tue, 05 May 2009 23:28:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Funny]]></category>

		<guid isPermaLink="false">http://www.dooriented.com/blog/?p=33</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><embed src="http://www.youtube.com/v/7L2fsubA2-c&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></p>
<p><embed src="http://www.youtube.com/v/poREl_EVWXI&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></p>
<p><embed src="http://www.youtube.com/v/WL2l_Q1AR_Q&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></p>
<p><embed src="http://www.youtube.com/v/CZGIn9bpALo&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dooriented.com/blog/2009/05/06/the-simpsons-apple-mapple/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IBM and Southpark</title>
		<link>http://www.dooriented.com/blog/2009/05/05/ibm-and-southpark/</link>
		<comments>http://www.dooriented.com/blog/2009/05/05/ibm-and-southpark/#comments</comments>
		<pubDate>Tue, 05 May 2009 18:42:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Funny]]></category>

		<guid isPermaLink="false">http://www.dooriented.com/blog/?p=27</guid>
		<description><![CDATA[These days there is the Smart SOA Conference in Las Vegas. Look how the commercial for that looked like:]]></description>
			<content:encoded><![CDATA[<p>These days there is the Smart SOA Conference in Las Vegas. Look how the commercial for that looked like:</p>
<p><embed src="http://www.youtube.com/v/d_3IcV0VrM0&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dooriented.com/blog/2009/05/05/ibm-and-southpark/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

