<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Christopher Beck&#039;s Blog</title>
	<atom:link href="http://christopherbeck.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://christopherbeck.wordpress.com</link>
	<description>Yet another tech blog on Oracle, APEX and PL/SQL development ( and other rants, just to keep it interesting ).</description>
	<lastBuildDate>Thu, 12 Jan 2012 05:42:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='christopherbeck.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Christopher Beck&#039;s Blog</title>
		<link>http://christopherbeck.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://christopherbeck.wordpress.com/osd.xml" title="Christopher Beck&#039;s Blog" />
	<atom:link rel='hub' href='http://christopherbeck.wordpress.com/?pushpress=hub'/>
		<item>
		<title>My First APEX Plug-In &#8211; Color Picker.</title>
		<link>http://christopherbeck.wordpress.com/2010/07/02/my-first-apex-plug-in-color-picker/</link>
		<comments>http://christopherbeck.wordpress.com/2010/07/02/my-first-apex-plug-in-color-picker/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 19:03:20 +0000</pubDate>
		<dc:creator>Christopher Beck</dc:creator>
				<category><![CDATA[APEX]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Plug-In]]></category>

		<guid isPermaLink="false">http://christopherbeck.wordpress.com/?p=202</guid>
		<description><![CDATA[For anyone who does not know by now, APEX 4.0 has been released.  And if you have not yet downloaded and upgraded, I say, &#8220;What are you waiting for?!?!?!&#8221;.  Click here NOW and download it.  I&#8217;ll wait.  *insert jeopardy music here*.  Ok, done?  Great! There are a ton of new features in this release.  One of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=christopherbeck.wordpress.com&amp;blog=4298178&amp;post=202&amp;subd=christopherbeck&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For anyone who does not know by now, <a title="Apex 4.0" href="http://apex.oracle.com/i/index.html" target="_blank">APEX 4.0</a> has been released.  And if you have not yet downloaded and upgraded, I say, &#8220;What are you waiting for?!?!?!&#8221;.  <a title="Download" href="http://www.oracle.com/technology/products/database/application_express/index.html" target="_blank">Click here NOW</a> and download it.  I&#8217;ll wait.  <em>*insert jeopardy music here*</em>.  Ok, done?  Great!</p>
<p>There are a <a href="http://www.oracle.com/technology/products/database/application_express/html/4.0_new_features.html" target="_blank">ton of new features</a> in this release.  One of the most significant ones are <a href="http://www.oracle.com/technology/products/database/application_express/html/plugins.html" target="_blank">Plug-Ins</a>.  In a nut shell, Plug-Ins give you, the APEX developer, to ability to extend the APEX development framework with custom item types, region types, and process and dynamic actions.</p>
<p>I finally got around to playing with them and lets just say I am impressed.  At first, the idea of writing Plug-Ins seems daunting, but after playing with them for an hour or so, it did not seem so hard.  It&#8217;s easy to take the example supplied with the sample application and and use it as a outline to make your own.  In fact, that is exactly what I did to make my first item Plug-In.  I encourage you to do the same.  You can also <a href="http://dl.dropbox.com/u/114340/item_type_plugin_beck_christopher_colorpicker.sql" target="_blank">grab my Plug-In </a>and see what I did as well.</p>
<p>In prior APEX releases, if you wanted to include a <a href="http://plugins.jquery.com/" target="_blank">jQuery plugin</a> on your page, you would have had to embed all the code into the page itself.   And there are many different places to include that code.  Each developer does it a bit differently.  I know myself, I was not very consistent going from page to page within the same application.  This made for maintenance nightmares.  Plug-Ins fix all of that.</p>
<p style="text-align:center;"><a href="http://christopherbeck.files.wordpress.com/2010/07/colorpicker.png"><img class="size-full wp-image-208 aligncenter" title="colorPicker" src="http://christopherbeck.files.wordpress.com/2010/07/colorpicker.png?w=600" alt=""   /></a></p>
<p>The Plug-In I built was a color picker.  I know APEX already has one, but let&#8217;s face it, it&#8217;s so Web 1.0.  I felt it needed a face lift.   But I  kinda cheated.   I did not write one from scratch.  Well to be completely honest, I did not write any of the JavaScript code for this color picker.  I downloaded a jQuery color picker called <a href="http://acko.net/dev/farbtastic" target="_blank">Farbtastic</a> written by <a href="http://acko.net/about" target="_blank">Steven Wittens</a> and built an APEX Plug-In with the <strong>apex_plugin</strong>, <strong>apex_javascript</strong>, and <strong>apex_css</strong> APIs.  And that is what is so powerful about this Plug-In framework.  Among other things, it allows you to leverage code and jQuery plugins in APEX natively.  So, now I can use my Plug-In on any page of my application as easily as I could use any other item type in APEX.  It&#8217;s listed right there in the item type select list with textbox, date picker, shuttle, &#8230; and the rest of the default item types.</p>
<p>You can check out <a href="http://apex.oracle.com/pls/apex/f?p=19903:11:327094171656454::NO" target="_blank">my color picker Plug-In</a> and <a href="http://dl.dropbox.com/u/114340/item_type_plugin_beck_christopher_colorpicker.sql" target="_blank">download</a> and install it yourself.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/christopherbeck.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/christopherbeck.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/christopherbeck.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/christopherbeck.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/christopherbeck.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/christopherbeck.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/christopherbeck.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/christopherbeck.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/christopherbeck.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/christopherbeck.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/christopherbeck.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/christopherbeck.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/christopherbeck.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/christopherbeck.wordpress.com/202/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=christopherbeck.wordpress.com&amp;blog=4298178&amp;post=202&amp;subd=christopherbeck&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://christopherbeck.wordpress.com/2010/07/02/my-first-apex-plug-in-color-picker/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1f43c7305915db8a38b359be077b2cc8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">beckdood</media:title>
		</media:content>

		<media:content url="http://christopherbeck.files.wordpress.com/2010/07/colorpicker.png" medium="image">
			<media:title type="html">colorPicker</media:title>
		</media:content>
	</item>
		<item>
		<title>Yet Another APEX Blogger.</title>
		<link>http://christopherbeck.wordpress.com/2010/02/24/yet-another-apex-blogger/</link>
		<comments>http://christopherbeck.wordpress.com/2010/02/24/yet-another-apex-blogger/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 16:28:29 +0000</pubDate>
		<dc:creator>Christopher Beck</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://christopherbeck.wordpress.com/?p=199</guid>
		<description><![CDATA[I would just like to welcome a former colleague and good friend, Brian Spendolini, to the APEX blogging community and I look to interesting and informative posts for him in the weeks and months to come.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=christopherbeck.wordpress.com&amp;blog=4298178&amp;post=199&amp;subd=christopherbeck&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I would just like to welcome a former colleague and good friend, <a title="Brian Spendolini" href="http://www.itworkedyesterday.com" target="_blank">Brian Spendolini</a>, to the APEX blogging community and I look to interesting and informative posts for him in the weeks and months to come.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/christopherbeck.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/christopherbeck.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/christopherbeck.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/christopherbeck.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/christopherbeck.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/christopherbeck.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/christopherbeck.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/christopherbeck.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/christopherbeck.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/christopherbeck.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/christopherbeck.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/christopherbeck.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/christopherbeck.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/christopherbeck.wordpress.com/199/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=christopherbeck.wordpress.com&amp;blog=4298178&amp;post=199&amp;subd=christopherbeck&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://christopherbeck.wordpress.com/2010/02/24/yet-another-apex-blogger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1f43c7305915db8a38b359be077b2cc8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">beckdood</media:title>
		</media:content>
	</item>
		<item>
		<title>Email BLOB Attachments From The Database</title>
		<link>http://christopherbeck.wordpress.com/2009/12/01/email-blob-attachments-from-the-database/</link>
		<comments>http://christopherbeck.wordpress.com/2009/12/01/email-blob-attachments-from-the-database/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 18:26:46 +0000</pubDate>
		<dc:creator>Christopher Beck</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[PL/SQL]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[BLOB]]></category>
		<category><![CDATA[email attachment]]></category>
		<category><![CDATA[SMTP]]></category>

		<guid isPermaLink="false">http://christopherbeck.wordpress.com/?p=175</guid>
		<description><![CDATA[Recently I was developing an oracle database application and had the requirement to send out an email with an attachment. Initially it sounded pretty easy. I&#8217;ll just use the APEX_MAIL package and its all handled for me. But then I remembered, this was not an APEX application I was developing. So then I thought, no [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=christopherbeck.wordpress.com&amp;blog=4298178&amp;post=175&amp;subd=christopherbeck&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently I was developing an oracle database application and had the requirement to send out an email with an attachment. Initially it sounded pretty easy. I&#8217;ll just use the <strong>APEX_MAIL</strong> package and its all handled for me. But then I remembered, this was not an APEX application I was developing. So then I thought, no problem, I&#8217;ll just use the <strong>UTL_MAIL</strong> package. There is an API to add attachments. But wait, you can only add <strong>VARCHAR </strong>and <strong>RAW </strong>attachments and there is a max length of 32K on them. Not very useful if you want to send a multi-megabyte document as an attachment ( ie. a blob). So I had to drop down to an even lower API, <strong>UTL_SMTP</strong> and handle it all myself. Oh, and the attachment needed to be zipped as well (to save space in the tubes of our interwebs). I found the exercise interesting and thought I would share it with you.</p>
<p>For this example we have a table</p>
<p><pre class="brush: sql;">
create table assets(
  id number primary key,
  name varchar2(100),
  content blob
  mime_type varchar2(100) );
</pre></p>
<p>And the code</p>
<p><pre class="brush: sql;">
procedure mail_asset(
  p_asset_id number,
  p_from varchar2,
  p_to varchar2,
  p_subject varchar2,
  p_message varchar2 ) is
--
  l_asset assets%rowtype;
  l_blob blob := to_blob('1');
  l_conn utl_smtp.connection;
  l_raw raw(57);
  l_len integer := 0;
  l_idx integer := 1;
  l_buff_size integer := 57;
  l_boundary varchar2(32) := sys_guid();
  l_attachment_name long;
begin

  -- Connect
  l_conn := utl_smtp.open_connection( 'mail.oracle.com' );
  utl_smtp.helo( l_conn, 'oracle.com' );
  utl_smtp.mail( l_conn, p_from );
  utl_smtp.rcpt( l_conn, p_to );
  utl_smtp.open_data(l_conn);

  -- Header
  utl_smtp.write_data( l_conn, 'From: ' || p_from || utl_tcp.crlf );
  utl_smtp.write_data( l_conn, 'To: ' || p_to || utl_tcp.crlf );
  utl_smtp.write_data( l_conn, 'Subject: ' || p_subject ||
                               utl_tcp.crlf );
  utl_smtp.write_data( l_conn, 'MIME-Version: 1.0' || utl_tcp.crlf );
  utl_smtp.write_data( l_conn, 'Content-Type: multipart/mixed; ' ||
                               utl_tcp.crlf );
  utl_smtp.write_data( l_conn, ' boundary= &quot;' || l_boundary || '&quot;' ||
                               utl_tcp.crlf );
  utl_smtp.write_data( l_conn, utl_tcp.crlf );

  -- Body
  utl_smtp.write_data( l_conn, '--' || l_boundary || utl_tcp.crlf );
  utl_smtp.write_data( l_conn, 'Content-Type: text/plain;' ||
                               utl_tcp.crlf );
  utl_smtp.write_data( l_conn, ' charset=US-ASCII' || utl_tcp.crlf );
  utl_smtp.write_data( l_conn, utl_tcp.crlf );
  utl_smtp.write_data( l_conn, l_message || utl_tcp.crlf );
  utl_smtp.write_data( l_conn, utl_tcp.crlf );

  -- Fetch the asset info
  for c in ( select *
               from assets
              where asset_id = p_asset_id ) loop

    -- Compress if a content and not already zipped.
    if ( c.mime_type != 'application/zip' then
      utl_compress.lz_compress( src =&gt; c.content,
                                dst =&gt; l_blob );
      l_attachment_name := c.name || '.gz';
    else
      l_blob := c.content;
      l_attachment_name := c.name;
    end if;

    -- Attachment
    utl_smtp.write_data( l_conn, '--' || l_boundary || utl_tcp.crlf );
    utl_smtp.write_data( l_conn, 'Content-Type: application/octet-stream'
                                 || utl_tcp.crlf );
    utl_smtp.write_data( l_conn, 'Content-Disposition: attachment; ' ||
                                 utl_tcp.crlf );
    utl_smtp.write_data( l_conn, ' filename=&quot;' || l_attachment_name || '&quot;'
                                 || utl_tcp.crlf );
    utl_smtp.write_data( l_conn, 'Content-Transfer-Encoding: base64' ||
                                 utl_tcp.crlf );
    utl_smtp.write_data( l_conn, utl_tcp.crlf );

    -- Loop through the blob
    -- chuck it up into 57-byte pieces
    -- and base64 encode it and write it into the mail buffer
    l_len := dbms_lob.getlength(l_blob);
    while l_idx &lt; l_len loop
      dbms_lob.read( l_blob, l_buff_size, l_idx, l_raw );
      utl_smtp.write_raw_data( l_conn, utl_encode.base64_encode(l_raw) );
      utl_smtp.write_data( l_conn, utl_tcp.crlf );
      l_idx := l_idx + l_buff_size;
    end loop;
    utl_smtp.write_data( l_conn, utl_tcp.crlf );

  end loop;

  -- Close Email
  utl_smtp.write_data( l_conn, '--' || l_boundary || '--' ||
                                         utl_tcp.crlf );
  utl_smtp.write_data( l_conn, utl_tcp.crlf || '.' || utl_tcp.crlf );
  utl_smtp.close_data( l_conn );
  utl_smtp.quit( l_conn );

exception
  -- smtp errors, close connection and reraise
  when utl_smtp.transient_error or
       utl_smtp.permanent_error then
    utl_smtp.quit( l_conn );
    raise;

end mail_asset;
</pre></p>
<p>Just a few things about the code.</p>
<p><strong>Line 15</strong> &#8211; I use sys_guid() to generate a random 32 character string which I use as the boundary marker in the email message. You can use any character string you like.</p>
<p><strong>Lines 20 and 21</strong> &#8211; You will need to change to your smtp server.</p>
<p><strong>Line 34</strong> &#8211; You will notice that there is a space in front of boundary. That is on purpose. The reason for that is that <strong>Content-Type</strong> (Line 32) and the <strong>boundary</strong> could be on the same line like this:</p>
<p><strong>Content-Type: multipart/mixed; boundary=&#8221;xxxxxxxxxxxx&#8221;</strong></p>
<p>But for formatting sake, I broke it up into two lines, so it needs to be sent to the smtp server like</p>
<p><strong>Content-Type: multipart/mixed;<br />
 boundary=&#8221;xxxxxxxxxxxx&#8221;</strong><br />
^ (single leading space)</p>
<p>with a leading space on boundary. I also did it on lines 42 and 68.</p>
<p><strong>Line 79</strong> &#8211; No you can not do larger reads. Each line of the encoded attachment needs to be 57 bytes.</p>
<p>In my example, I will only get at most 1 attachment because I pass in the asset_id and that is defined as the primary key. But if the query at line 48 was changed to possibly return more than a single row, the code would still work and we would have an email with multiple attachments.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/christopherbeck.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/christopherbeck.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/christopherbeck.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/christopherbeck.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/christopherbeck.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/christopherbeck.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/christopherbeck.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/christopherbeck.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/christopherbeck.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/christopherbeck.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/christopherbeck.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/christopherbeck.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/christopherbeck.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/christopherbeck.wordpress.com/175/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=christopherbeck.wordpress.com&amp;blog=4298178&amp;post=175&amp;subd=christopherbeck&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://christopherbeck.wordpress.com/2009/12/01/email-blob-attachments-from-the-database/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1f43c7305915db8a38b359be077b2cc8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">beckdood</media:title>
		</media:content>
	</item>
		<item>
		<title>Enhanced APEX Shuttle Item</title>
		<link>http://christopherbeck.wordpress.com/2009/04/28/enhanced-shuttle-item/</link>
		<comments>http://christopherbeck.wordpress.com/2009/04/28/enhanced-shuttle-item/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 01:07:55 +0000</pubDate>
		<dc:creator>Christopher Beck</dc:creator>
				<category><![CDATA[APEX]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[PL/SQL]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[shuttle]]></category>

		<guid isPermaLink="false">http://christopherbeck.wordpress.com/?p=158</guid>
		<description><![CDATA[Recently I have been really, really busy building some internal applications for my company. All of them using Oracle and APEX of course. To satisfy some of application&#8217;s requirements, and just for usability sake, I had to tweek the default behavior of the APEX shuttle item. The reason was the initial LOV that populated the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=christopherbeck.wordpress.com&amp;blog=4298178&amp;post=158&amp;subd=christopherbeck&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently I have been really, really busy building some internal applications for my company. All of them using Oracle and APEX of course. To satisfy some of application&#8217;s requirements, and just for usability sake, I had to tweek the default behavior of the APEX shuttle item.  The reason was the initial LOV that populated the shuttle contained over 500 values.  About 490+ too many as far as I was concerned.  The users felt the same way.  They complained that it was too hard to find what they were looking for, even though the list was in alphabetical order and I agreed.  So, I decided to add the functionality to allow the user to constrain the values in left-hand side of the shuttle.  Similar to the Popup LOVs with a filter option, but I wanted to use AJAX to accomplish it to avoid a page submit.  After a bunch of playing around and optimization, here is what I came up with:</p>
<p><a href="http://apex.oracle.com/pls/otn/f?p=19903:10">http://apex.oracle.com/pls/otn/f?p=19903:10</a><br />
<strong>Username/Password:  demo/demo</strong></p>
<p>I was surprised that it was not that hard to accomplish and there are very few moving parts.  All you need is a javascript function to make the AJAX call, an On Demand process to fetch only those values that meet the filter&#8217;s constraint and a way to trigger it.</p>
<p><strong>How It Works.</strong></p>
<p>As the user types in the textbox the shuttle automagically filters itself.  I use an onKeyUp event on the textbox P10_SEARCH_BY to trigger the AJAX call.</p>
<p><strong><code>onKeyUp="populateShuttle( this,'P10_SHUTTLE');"</code></strong></p>
<p>So everytime a KeyUp event happens in that textbox, a call to the populateShuttle function happens.  That function is responsible for making the AJAX call to the On-Demand Process, which fetches the appropriate values, and then parsing the results and repopulating the left hand side of the shuttle.</p>
<p><pre class="brush: jscript;">
function populateShuttle(filter,shuttleName)
{
  var right = $x(shuttleName+&quot;_RIGHT&quot;);

  for ( var i=0;i&lt;right.length; i++ )
    right.options[i].selected = true;

  var req = new htmldb_Get( null, 19903, 
                          'APPLICATION_PROCESS=populateShuttle', 0 );

  req.addParam( 'x01', $v(right) );
  req.addParam( 'x02', $v(filter) );

  var resp = eval(req.get());

  var left = $x(shuttleName+&quot;_LEFT&quot;);
  left.length=0;

  if (resp)
    for ( var i=0; i&lt;resp.length; i++ )
      left.options[i] = new Option(resp[i].data, resp[i].id);	

  req = null;
}
</pre></p>
<p>Although APEX treats the shuttle as a single element, it is in fact made up of many HTML elements, 10 images and 2 multiselect list boxes.  With a little poking around the HTML of a generated APEX page with a shuttle item on it, I was able to determine that the actual DOM names of the multiselect list boxes of a shuttle were <strong>[SHUTTLE_NAME]_LEFT</strong> and <strong>[SHUTTLE_NAME]_RIGHT</strong>.   How convenient.  Accessing the actual elements was then trivial.  I just used the APEX supplied function <strong>$x()</strong> function to get the elements.</p>
<p>The first thing I do is get the right textbox and loop over its values, selecting each one.  This is so when I fetch its value, I get all the elements in the list.  I need this information so when I fetch the values for the left hand side of the shuttle, based on the user&#8217;s filter, I do NOT bring back any values that have already been moved to the right hand side of the shuttle.  In my example say you had already selected KING and moved him to the right.  Then you type a &#8216;K&#8217; in the filter_by textbox, you will only get back CLARK and BLAKE even though KING also meets the constraint of containing a &#8216;K&#8217;.<br />
Next, I get the value of the right hand side of the shuttle and the value of the filter_by textbox, using the <strong>$v()</strong> function and send the values to the On Demand process via the APEX global variables <strong>g_x01</strong> and <strong>g_x02</strong>.</p>
<p>The On Demand process is just a simple PL/SQL block that is a query loop.</p>
<p><pre class="brush: jscript;">
declare
  l_selected long  := wwv_flow.g_x01;
  l_search long := wwv_flow.g_x02;
begin
  htp.prn('[');
  for c in (
    select ename, empno, rownum r
      from emp
     where regexp_like( ename, nvl(l_search,ename), 'i' )
       and nvl(instr(':'||l_selected||':',':'||empno||':'),0)=0 )
  loop
    htp.prn( case when c.r&amp;gt;1 then',' else null end ||
             '{ id: ' || c.empno ||
             ', data: &quot;' || c.ename || '&quot;}' );
  end loop;
  htp.prn(']');
end;
</pre></p>
<p>It fetches all the values that match the filter</p>
<p><code> where regexp_like( ename, nvl(l_search,ename), 'i' )</code></p>
<p>but not those already be selected by the user.</p>
<p><code> and nvl(instr(':'||l_selected||':',':'||empno||':'),0)=0)</code></p>
<p>Now it&#8217;s just a simple process of looping over the rows, packaging them up and sending them back.  I have become a big fan of <strong>JSON </strong>( JavaScript Object Notation <a href="http://www.json.org">http://www.json.org/</a> ) ,  so that how I am packaging up the payload to pass back.  Basically, I&#8217;m making the results into a javascript array of objects.  Each object has an id and data element.  The payload look something like this</p>
<p><code>[{id: 7839, data: "KING"}{id: 7698, data: "BLAKE"} ... ]</code></p>
<p>This makes it super simple easy to work with once it gets back to the calling javascript function.  All you need to do is apply an eval() on it and its transformed into a true javascript array of objects that can be easily looped over and referenced.</p>
<p>In one line of code, I call the On Demand process, getting back the JSON packed result and <strong>eval()</strong> it.</p>
<p><code>var resp = eval(req.get());</code></p>
<p>Now the variable resp is an Array of objects with two elements in each object, id and data.  Looping over the values and populating the left hand side of the shuttle is trivial now.</p>
<pre>
<code>  if (resp)
    for ( var i=0; i&lt;resp.length; i++ )
      left.options[i] = new Option(resp[i].data, resp[i].id);</code>
</pre>
<p>And there you have it.  I hope I have shown that with some minor tweeks, you can extend the functionality of the base APEX items to be much more functional and user friendly.  As always, comments ( good and bad ) are always welcome.<span id="more-158"></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/christopherbeck.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/christopherbeck.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/christopherbeck.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/christopherbeck.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/christopherbeck.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/christopherbeck.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/christopherbeck.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/christopherbeck.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/christopherbeck.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/christopherbeck.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/christopherbeck.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/christopherbeck.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/christopherbeck.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/christopherbeck.wordpress.com/158/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=christopherbeck.wordpress.com&amp;blog=4298178&amp;post=158&amp;subd=christopherbeck&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://christopherbeck.wordpress.com/2009/04/28/enhanced-shuttle-item/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1f43c7305915db8a38b359be077b2cc8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">beckdood</media:title>
		</media:content>
	</item>
		<item>
		<title>Pipelined Functions</title>
		<link>http://christopherbeck.wordpress.com/2008/12/05/pipelined-functions/</link>
		<comments>http://christopherbeck.wordpress.com/2008/12/05/pipelined-functions/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 17:25:11 +0000</pubDate>
		<dc:creator>Christopher Beck</dc:creator>
				<category><![CDATA[APEX]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[PL/SQL]]></category>
		<category><![CDATA[Pipeline Function]]></category>

		<guid isPermaLink="false">http://christopherbeck.wordpress.com/?p=146</guid>
		<description><![CDATA[Well, it&#8217;s been a quite while since I posted (I know, I’m slacking) so I thought I&#8217;d just quickly blog about what I just helped someone with yesterday. It required me to use a pipelined function. Not everyone has seen of them so I thought it may be interesting. Pipelined functions allow you to basically [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=christopherbeck.wordpress.com&amp;blog=4298178&amp;post=146&amp;subd=christopherbeck&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Well, it&#8217;s been a quite while since I posted (I know, I’m slacking) so I thought I&#8217;d just quickly blog about what I just helped someone with yesterday.  It required me to use a pipelined function.  Not everyone has seen of them so I thought it may be interesting.</p>
<p>Pipelined functions allow you to basically select from a function rather than a database table.</p>
<p>A colleague of mine had to build an APEX report of opportunities.  The report was to be constrained by a multiselect listbox of product ids.  Show all opportunities that have ANY of the selected product ids.  So far it sound pretty easy.  The tricky part was how the product ids were stored in the opportunity table.</p>
<p><pre class="brush: jscript;">
create table opportunity(
  name varchar2(100),
  product_ids varchar2(255)
);
</pre></p>
<p>The PRODUCT_IDS column was populated with a colon delimited list of all the products that were used in that opportunity.  Now before you yell that that is probably not the best way to store that data and that a master-detail table relationship is probably the better way to go, I 100% agree.  But unfortunately, when you inherit an application, you many times must make do with what the original developer put in place (and that is the case here).</p>
<p>We all know when you submit a multiselect listbox in APEX, it comes in as a colon delimited list of all the values that were selected.  What we need to do is tokenize that selectlist string and compare each value against the table.</p>
<p>I came up with two possible solutions:</p>
<p>1. Build the query by hand.</p>
<p>Using apex_util.string_to_table() on the input, loop over all the values and manually build the report query by hand.<span>  </span></p>
<p><pre class="brush: jscript;">
declare
  l_ids apex_application_global.vc_arr2;
  l_query varchar2(32767) := null;
begin
  l_ids := apex_util.string_to_table( :p9_product_ids );
  for i in 1 .. l_ids.count loop
    l_query := l_query || &lt;insert query here&gt;;
    if i &lt;&gt; l_ids.count then
      l_query := l_query || ' union all ';
    end if';
  end loop;
  return l_query;
end;
</pre></p>
<p>This would have worked just fine (besides having to run the query N times and union all them together).</p>
<p>But I like to use nifty, (and more optimized) options and so I implemented my other solution:</p>
<p>2. Use a pipelined function.</p>
<p>To use this, we need to create a type and a function that returns that type.</p>
<p><pre class="brush: jscript;">
create or replace type myTableType as
table of varchar2(255)
/
</pre></p>
<p><pre class="brush: jscript;">
create or replace
function to_myTableType( p_string varchar2 ) 
return myTableType PIPELINED is
  l_arr apex_application_global.vc_arr2;
begin
  l_arr := apex_util.string_to_table( p_string );
  for i in 1 .. l_arr.count loop
    PIPE ROW( ':' || l_arr(i) || ':' );
  end loop;
  return;
end;
/
</pre></p>
<p>Notice that the function is declared as PIPELINED in its declaration.  Also notice the PIPE ROW() syntax in the loop.  That is where the function returns multiple values as rows in a query.  Its using the string_to_table() function to tokenize the string and then looping over the tokens, pipes the results out as rows.  And finally, this function contains a return clause without returning anything.  It had already returned multiple values in the PIPE ROW() line.</p>
<p>Now that we have this we can write a single, simple query in APEX that looks like this:</p>
<p><pre class="brush: jscript;">
select o.name, o.product_ids
  from opportunity o,
        table( to_myTableType( :p1_product_ids )) p
 where instr( ':' || o.product_ids || ':', p.COLUMN_VALUE ) &gt; 0;
</pre></p>
<p>Check out a working version here:  <a href="http://apex.oracle.com/pls/otn/f?p=19903:9">http://apex.oracle.com/pls/otn/f?p=19903:9</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/christopherbeck.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/christopherbeck.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/christopherbeck.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/christopherbeck.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/christopherbeck.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/christopherbeck.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/christopherbeck.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/christopherbeck.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/christopherbeck.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/christopherbeck.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/christopherbeck.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/christopherbeck.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/christopherbeck.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/christopherbeck.wordpress.com/146/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=christopherbeck.wordpress.com&amp;blog=4298178&amp;post=146&amp;subd=christopherbeck&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://christopherbeck.wordpress.com/2008/12/05/pipelined-functions/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1f43c7305915db8a38b359be077b2cc8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">beckdood</media:title>
		</media:content>
	</item>
		<item>
		<title>WebLogic Server and APEX</title>
		<link>http://christopherbeck.wordpress.com/2008/09/15/weblogic-server-and-apex/</link>
		<comments>http://christopherbeck.wordpress.com/2008/09/15/weblogic-server-and-apex/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 20:10:07 +0000</pubDate>
		<dc:creator>Christopher Beck</dc:creator>
				<category><![CDATA[APEX]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[WebLogic]]></category>

		<guid isPermaLink="false">http://christopherbeck.wordpress.com/?p=125</guid>
		<description><![CDATA[A good friend and colleague of mine at Oracle, Mark Greynolds, shared with me his work with WebLogic and APEX and getting them to work together. I thought it was something that everyone would be interested in and asked him if he would be willing to document the steps and allow me to post them [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=christopherbeck.wordpress.com&amp;blog=4298178&amp;post=125&amp;subd=christopherbeck&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A good friend and colleague of mine at Oracle, <strong>Mark Greynolds</strong>, shared with me his work with <a href="http://www.oracle.com/appserver/weblogic/weblogic-suite.html" target="_blank">WebLogic</a> and APEX and getting them to work together.  I thought it was something that everyone would be interested in and asked him if he would be willing to document the steps and allow me to post them here on my blog.  He was and so here it is.</p>
<h2>WebLogic Server and APEX</h2>
<p>When a WebLogic Server (WLS) is the primary Web server, accessing APEX pages though the WLS requires a proxy. The configuration of APEX generally follows one of two configurations &#8211; Apache with mod_plsql or the Embedded PL/SQL gateway. When WebLogic (without Apache) is the main HTTP server, getting APEX to surface on the same port as WebLogic requires some form of proxy.</p>
<h2>Overall Approach</h2>
<p>This solution creates a very simple Web Application that invokes a Java Proxy Servlet when a user tries to access APEX pages. Wrapping this Web Application around the Java Proxy Servlet lets the WLS serve APEX without any port conflicts. The WLS Proxy Servlet is a fully documented out of the box tool.  To create and deploy the Web Application simply build the files outlined in this document, deploy the application and then access APEX.</p>
<h2>Exploded deployment</h2>
<p>For convenience, this solution takes advantage of the exploded deployment feature of the WSL. In addition to the ability to deploy jar, war and ear files, the WLS can deploy Web Applications as an exploded directory that contains the same contents of the archive file. An exploded archive directory contains the same files and directories as a jar archive. However, the files and directories reside directly in the file system instead of as a single archive file (JAR). This example uses the exploded deployment style to create the Web Application for this example.</p>
<h2>Default WebLogic application</h2>
<p>The default Web Application is what the server sends to browser clients who do not specify a recognized URI (or specify only &#8220;/&#8221; as the URI). Each server has only one default Web Application and for this solution to work, this application must be set as the default. If there is already a default, this servlet could be added to the existing application by using an exploded deployment of the default with modification to the web.xml to register the APEX proxy.</p>
<h2>Pre-requisites</h2>
<p><strong>1.</strong> An Oracle database successfully serving APEX pages. The APEX instance may be on the same or different machine and served from either Apache or the Embedded PL/SQL gateway. In this example, APEX uses the Embedded PL/SQL Gateway of a database running on the same machine as the WebLogic server and natively appears at the <strong>http://localhost:8080/</strong>apex URL.</p>
<p><strong>2.</strong> An Oracle WebLogic Server 10.3 running a Node Manger, the Administration Console and a Managed server. This example uses a domain created specifically for this exercise named APEXDemo. The WLS Administration console uses port 7001 and the Managed Server uses port 80.</p>
<p><strong>3.</strong> There is no other “default” WebLogic application for the Managed Server.</p>
<h2>Create the APEX Proxy Servlet</h2>
<p><strong>1.</strong> Create the following directory structure somewhere on disk. This example assumes the C:\ drive is used. Note: the <strong>apexproxy.war</strong> directory name mimics the normal J2EE naming convention for Web Application archive (WAR).</p>
<p><a href="http://christopherbeck.files.wordpress.com/2008/09/dir.png"><img class="aligncenter size-full wp-image-126" title="dir" src="http://christopherbeck.files.wordpress.com/2008/09/dir.png?w=600" alt=""   /></a></p>
<p><strong>2.</strong> In the <strong>apexproxy.war</strong> directory, create the <strong>index.html</strong> file. The WLS Managed Server renders this page when the server cannot map the browser’s URL to a valid destination. For this example, APEX becomes the default page due to a simple redirect to the full APEX path.</p>
<p><pre class="brush: xml;">

&lt;html&gt;
  &lt;head&gt;
    &lt;meta http-equiv=&quot;refresh&quot; content=&quot;0;url=apex&quot;&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;/body&gt;
&lt;/html&gt;

</pre></p>
<p><strong>3.</strong> In the <strong>WEB-INF</strong> directory, create the web.xml file that defines this simple Web Application.</p>
<p><pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;web-app&gt;
  &lt;display-name&gt;APEX Proxy&lt;/display-name&gt;
  &lt;servlet&gt;
    &lt;servlet-name&gt;ProxyServlet&lt;/servlet-name&gt;
    &lt;servlet-class&gt;
        weblogic.servlet.proxy.HttpProxyServlet
    &lt;/servlet-class&gt;
    &lt;init-param&gt;
&lt;param-name&gt;redirectURL&lt;/param-name&gt;
&lt;param-value&gt;http://localhost:8080&lt;/param-value&gt;
    &lt;/init-param&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
     &lt;servlet-name&gt;ProxyServlet&lt;/servlet-name&gt;
     &lt;url-pattern&gt;/apex/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;servlet-mapping&gt;
  &lt;servlet-name&gt;ProxyServlet&lt;/servlet-name&gt;
    &lt;url-pattern&gt;/i/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
&lt;/web-app&gt;

</pre></p>
<p>The <strong>&lt;servlet-class&gt;</strong> tag identifies the proxy servlet class and provides the<br />
redirection URL to use when the container invokes the servlet. The two<br />
<strong>&lt;servlet-mapping&gt;</strong> tags explicitly identify the two URL patterns used by APEX.<br />
The WLS documentation suggests using a single mapping of “/” but this causes every<br />
unmatched request to forward to the Oracle XML DB default splash page and ignores the<br />
<strong>index.html</strong> file.<br />
<strong>4.</strong> In the <strong>WEB-INF</strong> directory, also create the following <strong>weblogic.xml</strong> file. At deployment, WLS scans this file for the information on how to configure the deployment.</p>
<p><pre class="brush: xml;">
&lt;?xml version='1.0' encoding='UTF-8'?&gt;
&lt;weblogic-web-app
 xmlns=&quot;http://www.bea.com/ns/weblogic/weblogic-web-app&quot;
 xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
 xsi:schemaLocation=&quot;http://www.bea.com/ns/weblogic/weblogic-web-app
                     http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd&quot;&gt;
  &lt;session-descriptor&gt;&lt;/session-descriptor&gt;
  &lt;jsp-descriptor&gt;&lt;/jsp-descriptor&gt;
  &lt;container-descriptor&gt;&lt;/container-descriptor&gt;
  &lt;context-root&gt;/&lt;/context-root&gt;
  &lt;servlet-descriptor&gt;
    &lt;servlet-name&gt;ProxyServlet&lt;/servlet-name&gt;
  &lt;/servlet-descriptor&gt;
&lt;/weblogic-web-app&gt;
</pre></p>
<p>The <strong>&lt;context-root&gt;</strong> tag is the key for making this example function. This tag<br />
makes this the default application for the Managed Server.</p>
<h2>Deploy the Proxy Servlet</h2>
<p><strong>5.</strong> Begin the deployment by accessing the WLS Administration Console using the http://localhost:7001/console URL. For this example, the Administration Console’s Username and Password are <strong>weblogic</strong> and <strong>weblogic.</strong></p>
<p><a href="http://christopherbeck.files.wordpress.com/2008/09/login.png"><img class="aligncenter size-full wp-image-132" title="login" src="http://christopherbeck.files.wordpress.com/2008/09/login.png?w=600" alt=""   /></a></p>
<p><strong>6.</strong> On the left side navigation panel, click the <strong>Deployments</strong> link.</p>
<p><a href="http://christopherbeck.files.wordpress.com/2008/09/step-6.png"><img class="aligncenter size-full wp-image-133" title="step-6" src="http://christopherbeck.files.wordpress.com/2008/09/step-6.png?w=600" alt=""   /></a></p>
<p><strong>7.</strong> Click the <strong>Install</strong> button.</p>
<p><a href="http://christopherbeck.files.wordpress.com/2008/09/step-7.png"><img class="aligncenter size-full wp-image-134" title="step-7" src="http://christopherbeck.files.wordpress.com/2008/09/step-7.png?w=600" alt=""   /></a></p>
<p><strong>8.</strong> Use the <strong>Path:</strong> field to locate the <strong>C:\APEXProxy</strong> directory. NOTE: this page can<br />
navigate directories on the drive by entering C:\ and clicking the <strong>Next</strong> button. The server<br />
returns an error and shows the directories in a navigable list.</p>
<p><a href="http://christopherbeck.files.wordpress.com/2008/09/step-8.png"><img class="aligncenter size-full wp-image-135" title="step-8" src="http://christopherbeck.files.wordpress.com/2008/09/step-8.png?w=600" alt=""   /></a></p>
<p>Click the radio button next to the <strong>apexproxy.war</strong> directory name and then click the<br />
<strong>Next</strong> button. NOTE: do not type in the complete path to the war directory – clicking the<br />
radio button for the WAR automatically completes the Path specification.</p>
<p>9. Click the <strong>Next</strong> button to accept installing the deployment as an application.</p>
<p><a href="http://christopherbeck.files.wordpress.com/2008/09/step-9.png"><img class="aligncenter size-full wp-image-136" title="step-9" src="http://christopherbeck.files.wordpress.com/2008/09/step-9.png?w=600" alt=""   /></a></p>
<p>10. Select the desired server and click the <strong>Next</strong> button.</p>
<p><a href="http://christopherbeck.files.wordpress.com/2008/09/step-10.png"><img class="aligncenter size-full wp-image-137" title="step-10" src="http://christopherbeck.files.wordpress.com/2008/09/step-10.png?w=600" alt=""   /></a></p>
<p>11. Click the <strong>Finish</strong> button to accept default values for all the remaining deployment values<br />
and finish the deployment.</p>
<p>12. The Administration Console displays the configuration page for the newly deployed<br />
application with the following messages.</p>
<p><a href="http://christopherbeck.files.wordpress.com/2008/09/step-12-1.png"><img class="aligncenter size-full wp-image-139" title="step-12-1" src="http://christopherbeck.files.wordpress.com/2008/09/step-12-1.png?w=600" alt=""   /></a></p>
<p>Lower down the page, the server display the status of the new application.</p>
<p><a href="http://christopherbeck.files.wordpress.com/2008/09/step-12-2.png"><img class="aligncenter size-full wp-image-140" title="step-12-2" src="http://christopherbeck.files.wordpress.com/2008/09/step-12-2.png?w=600" alt=""   /></a></p>
<p>13. Enter the Managed Server URL in to a browser to see the APEX login page.</p>
<p>http://localhost</p>
<p>The browser receives a redirect from the index.html page and displays the APEX login<br />
screen.</p>
<p><a href="http://christopherbeck.files.wordpress.com/2008/09/step-13.png"><img class="aligncenter size-full wp-image-141" title="step-13" src="http://christopherbeck.files.wordpress.com/2008/09/step-13.png?w=600" alt=""   /></a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/christopherbeck.wordpress.com/125/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/christopherbeck.wordpress.com/125/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/christopherbeck.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/christopherbeck.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/christopherbeck.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/christopherbeck.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/christopherbeck.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/christopherbeck.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/christopherbeck.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/christopherbeck.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/christopherbeck.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/christopherbeck.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/christopherbeck.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/christopherbeck.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/christopherbeck.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/christopherbeck.wordpress.com/125/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=christopherbeck.wordpress.com&amp;blog=4298178&amp;post=125&amp;subd=christopherbeck&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://christopherbeck.wordpress.com/2008/09/15/weblogic-server-and-apex/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1f43c7305915db8a38b359be077b2cc8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">beckdood</media:title>
		</media:content>

		<media:content url="http://christopherbeck.files.wordpress.com/2008/09/dir.png" medium="image">
			<media:title type="html">dir</media:title>
		</media:content>

		<media:content url="http://christopherbeck.files.wordpress.com/2008/09/login.png" medium="image">
			<media:title type="html">login</media:title>
		</media:content>

		<media:content url="http://christopherbeck.files.wordpress.com/2008/09/step-6.png" medium="image">
			<media:title type="html">step-6</media:title>
		</media:content>

		<media:content url="http://christopherbeck.files.wordpress.com/2008/09/step-7.png" medium="image">
			<media:title type="html">step-7</media:title>
		</media:content>

		<media:content url="http://christopherbeck.files.wordpress.com/2008/09/step-8.png" medium="image">
			<media:title type="html">step-8</media:title>
		</media:content>

		<media:content url="http://christopherbeck.files.wordpress.com/2008/09/step-9.png" medium="image">
			<media:title type="html">step-9</media:title>
		</media:content>

		<media:content url="http://christopherbeck.files.wordpress.com/2008/09/step-10.png" medium="image">
			<media:title type="html">step-10</media:title>
		</media:content>

		<media:content url="http://christopherbeck.files.wordpress.com/2008/09/step-12-1.png" medium="image">
			<media:title type="html">step-12-1</media:title>
		</media:content>

		<media:content url="http://christopherbeck.files.wordpress.com/2008/09/step-12-2.png" medium="image">
			<media:title type="html">step-12-2</media:title>
		</media:content>

		<media:content url="http://christopherbeck.files.wordpress.com/2008/09/step-13.png" medium="image">
			<media:title type="html">step-13</media:title>
		</media:content>
	</item>
		<item>
		<title>Report Hierarchical Data With APEX</title>
		<link>http://christopherbeck.wordpress.com/2008/09/05/report-hierarchical-data-with-apex/</link>
		<comments>http://christopherbeck.wordpress.com/2008/09/05/report-hierarchical-data-with-apex/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 15:35:54 +0000</pubDate>
		<dc:creator>Christopher Beck</dc:creator>
				<category><![CDATA[APEX]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[CONNECT BY]]></category>
		<category><![CDATA[hierarchy]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://christopherbeck.wordpress.com/?p=113</guid>
		<description><![CDATA[Anyone familiar with Oracle and hearing the word hierarchical immediately thinks of the sql CONNECT BY clause.  And I would bet that when they think about displaying this data, they would use some sort of tree widget.  APEX has a built-in tree widget and for many applications, it works fine.   The drawback to the built-in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=christopherbeck.wordpress.com&amp;blog=4298178&amp;post=113&amp;subd=christopherbeck&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Anyone familiar with Oracle and hearing the word hierarchical immediately thinks of the sql <a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/queries003.htm" target="_blank">CONNECT BY</a> clause.  And I would bet that when they think about displaying this data, they would use some sort of tree widget.  APEX has a built-in tree widget and for many applications, it works fine.  </p>
<p>The drawback to the <a href="http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10499/nav.htm#insertedID4" target="_blank">built-in tree widget</a> is that it brings back the entire dataset on the initial page render.  Good and Bad.  Saves round trips to the server, but could take a lot of initial time depending on the size of the data.  Showing/hiding branches of the tree with many elements also can make the application feel sluggish.  </p>
<p>On my current project, I needed to build an interface against just such a dataset.  So I needed an alternative to the built-in tree.  I looked at either writing my own tree using javascript and AJAX or using an already developed one.  Neither one appealed to me.  They both added development complexity and maintaining them weighed on my final decision.</p>
<p>What I chose to do was build a breadcrumb-like report displaying the path traversed and a second report displaying the elements at the current level.  All default APEX functionality.  Simple clean interface.  Easily developed and easily maintained.  <a href="http://apex.oracle.com/pls/otn/f?p=19903:5" target="_blank">You can check it out here</a>.</p>
<p>Let me quickly walk you through how it was built:</p>
<p><strong>1.</strong> Create a report on the base table constrained by the hidden item.  The query should look something like:</p>
<p><pre class="brush: sql;">
select *
  from emp
 where nvl(mgr,-1) = :p5_empno
</pre></p>
<p>I then linked the <strong>ENAME</strong> column back to the same page passing the <strong>EMPNO</strong> value into <strong> <img src='http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> 5_EMPNO</strong>.<br />
 <br />
<strong> 2.</strong> Create a hidden Item to hold the manager&#8217;s id.  I put it in the step 1&#8242;s report region and called it <strong>P5_EMPNO</strong> and set its default value to<strong> -1</strong>.</p>
<p><strong>3.</strong> Create a PATH report to manage the traversing the data.  This is where the magic happens.  I make use of the <a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/functions168.htm#SQLRF06116" target="_blank">SYS_CONNECT_BY_PATH()</a> function in conjunction with the <strong>START WITH&#8230;CONNECT BY </strong>clause.  The query I used was:</p>
<p><pre class="brush: sql;">
select '&lt;a href=&quot;f?p=' || :app_id || ':5:' ||
         :app_session || 
         '::::p5_empno:-1&quot;&gt;Top&lt;/a&gt; &gt;&gt;&gt; ' || 
         substr(
           sys_connect_by_path( 
             '&lt;a href=&quot;f?p=' || :app_id || ':5:' ||
             :app_session || '::::p5_empno:' || empno ||
             '&quot;&gt;' || ename || '&lt;/a&gt;', ' : ' ), 4 ) path 
  from emp 
 where empno = :p5_empno 
 start with mgr is null 
connect by prior empno = mgr
</pre></p>
<p>Some other tweeks to this region.  No Pagination.  Report Template of Value Attribute Pairs.  Layout above the first report region.  No region template.</p>
<p><strong>4.</strong> ???</p>
<p><strong>5. Profit!</strong></p>
<p>Now you can use the main report to drill into the children of the row you selected, all the while maintaining the context of where you are in the hierarchy with the path.</p>
<p>It&#8217;s a quick simple technique, and 100% APEX.  No additional javascript libraries or custom coding to accomplish a clean and simple interface.  And it will be easily maintained, either by you, or by the developer that comes after you.</p>
<p>Let me know what you think.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/christopherbeck.wordpress.com/113/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/christopherbeck.wordpress.com/113/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/christopherbeck.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/christopherbeck.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/christopherbeck.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/christopherbeck.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/christopherbeck.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/christopherbeck.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/christopherbeck.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/christopherbeck.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/christopherbeck.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/christopherbeck.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/christopherbeck.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/christopherbeck.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/christopherbeck.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/christopherbeck.wordpress.com/113/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=christopherbeck.wordpress.com&amp;blog=4298178&amp;post=113&amp;subd=christopherbeck&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://christopherbeck.wordpress.com/2008/09/05/report-hierarchical-data-with-apex/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1f43c7305915db8a38b359be077b2cc8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">beckdood</media:title>
		</media:content>
	</item>
		<item>
		<title>Google Chrome &#8211; The Newest Thing In Browsers</title>
		<link>http://christopherbeck.wordpress.com/2008/09/02/google-chrome-the-newest-thing-in-browsers/</link>
		<comments>http://christopherbeck.wordpress.com/2008/09/02/google-chrome-the-newest-thing-in-browsers/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 18:59:58 +0000</pubDate>
		<dc:creator>Christopher Beck</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://christopherbeck.wordpress.com/?p=105</guid>
		<description><![CDATA[Google entered the browser world today with their own, built from the ground up, open sourced browser called Chrome.  You can download it here.  It&#8217;s currently in Beta ( but what of Google&#8217;s is not a beta ) and only available on XP and Vista ( but the Mac and Linux versions are in the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=christopherbeck.wordpress.com&amp;blog=4298178&amp;post=105&amp;subd=christopherbeck&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#0000ee;text-decoration:underline;"><br />
</span><img class="alignleft" src="http://www.google.com/chrome/intl/en/images/logo_sm.jpg" alt="" width="150" height="55" />Google entered the browser world today with their own, built from the ground up, open sourced browser called Chrome.  You can download it <a href="http://www.google.com/chrome" target="_blank">here</a>.  It&#8217;s currently in Beta ( but what of Google&#8217;s is not a beta ) and only available on XP and Vista ( but the Mac and Linux versions are in the works ).  I have not had time to do anything more than install it and post this using chrome.   Google released a <a href="http://www.google.com/googlebooks/chrome/" target="_blank">comicbook of sorts to describe all the new features and functions</a>.  It all sounds impressive.  I really like the idea that each tab is its own process and not a thread in a monster browser process.  </p>
<p style="text-align:center;"><a href="http://christopherbeck.files.wordpress.com/2008/09/taskmanager.png"><img class="alignnone size-large wp-image-110" src="http://christopherbeck.files.wordpress.com/2008/09/taskmanager.png?w=480&#038;h=282" alt="" width="480" height="282" /></a></p>
<p>Should help with the ever growing memory hogs like Firefox and IE.  Anyway, check it out and let me know what you find out.  Next stop for me is to put it through its paces with APEX.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/christopherbeck.wordpress.com/105/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/christopherbeck.wordpress.com/105/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/christopherbeck.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/christopherbeck.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/christopherbeck.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/christopherbeck.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/christopherbeck.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/christopherbeck.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/christopherbeck.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/christopherbeck.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/christopherbeck.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/christopherbeck.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/christopherbeck.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/christopherbeck.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/christopherbeck.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/christopherbeck.wordpress.com/105/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=christopherbeck.wordpress.com&amp;blog=4298178&amp;post=105&amp;subd=christopherbeck&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://christopherbeck.wordpress.com/2008/09/02/google-chrome-the-newest-thing-in-browsers/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1f43c7305915db8a38b359be077b2cc8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">beckdood</media:title>
		</media:content>

		<media:content url="http://www.google.com/chrome/intl/en/images/logo_sm.jpg" medium="image" />

		<media:content url="http://christopherbeck.files.wordpress.com/2008/09/taskmanager.png?w=480" medium="image" />
	</item>
		<item>
		<title>APEX 3.1.2 Is Available</title>
		<link>http://christopherbeck.wordpress.com/2008/08/29/apex-312-is-available/</link>
		<comments>http://christopherbeck.wordpress.com/2008/08/29/apex-312-is-available/#comments</comments>
		<pubDate>Fri, 29 Aug 2008 18:08:35 +0000</pubDate>
		<dc:creator>Christopher Beck</dc:creator>
				<category><![CDATA[APEX]]></category>
		<category><![CDATA[3.1.2]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://christopherbeck.wordpress.com/?p=91</guid>
		<description><![CDATA[In case you were not aware, Oracle has released a new version of Application Express. From the APEX site on OTN: Aug 28 Application Express 3.1.2 is now available. The full installation is available here, the patchset is available on MetaLink &#8211; patch number 7313609. Please read the Patch Set Notes for details on the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=christopherbeck.wordpress.com&amp;blog=4298178&amp;post=91&amp;subd=christopherbeck&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In case you were not aware, Oracle has released a new version of Application Express.  From the <a href="http://www.oracle.com/technology/products/database/application_express/index.html" target="_blank">APEX site on OTN</a>:</p>
<p style="padding-left:30px;"><strong>Aug 28 </strong></p>
<p class="navheader" style="padding-left:30px;"><strong>Application Express 3.1.2 is now available.  The full <a href="http://www.oracle.com/technology/products/database/application_express/download.html" target="_blank">installation</a> is available here, the patchset is available on <a href="http://metalink.oracle.com" target="_blank">MetaLink</a> &#8211; patch number 7313609.  Please read the <a href="http://www.oracle.com/technology/products/database/application_express/html/3.1.2_patchnote.html" target="_blank">Patch Set Notes</a> for details on the bugs fixed in this release.</strong></p>
<p>I just finished upgrading my local apex instance.  I chose to apply the patch instead of a full install and it worked fantastic.  Took less than 5 minutes to patch on my dell 620 laptop  running Ubuntu 7.10.  4 minutes to apply the patch and another minute to load the new images.</p>
<p style="text-align:center;"><a href="http://christopherbeck.files.wordpress.com/2008/08/elapsed_time.png"><img class="size-full wp-image-99 aligncenter" src="http://christopherbeck.files.wordpress.com/2008/08/elapsed_time.png?w=600" alt=""   /></a></p>
<p style="text-align:center;"><a href="http://christopherbeck.files.wordpress.com/2008/08/apex_3121.png"><img class="size-full wp-image-94 aligncenter" src="http://christopherbeck.files.wordpress.com/2008/08/apex_3121.png?w=600" alt=""   /></a></p>
<p>I read the install notes and there are more than <a href="http://www.oracle.com/technology/products/database/application_express/html/3.1.2_patchnote.html#CHDCBDAF" target="_blank">80 bug</a> fixes and enhancements.</p>
<p>Has anyone else installed it yet?  What do you all think?  I&#8217;ll blog my impressions once I kick the tires for a bit.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/christopherbeck.wordpress.com/91/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/christopherbeck.wordpress.com/91/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/christopherbeck.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/christopherbeck.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/christopherbeck.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/christopherbeck.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/christopherbeck.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/christopherbeck.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/christopherbeck.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/christopherbeck.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/christopherbeck.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/christopherbeck.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/christopherbeck.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/christopherbeck.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/christopherbeck.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/christopherbeck.wordpress.com/91/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=christopherbeck.wordpress.com&amp;blog=4298178&amp;post=91&amp;subd=christopherbeck&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://christopherbeck.wordpress.com/2008/08/29/apex-312-is-available/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1f43c7305915db8a38b359be077b2cc8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">beckdood</media:title>
		</media:content>

		<media:content url="http://christopherbeck.files.wordpress.com/2008/08/elapsed_time.png" medium="image" />

		<media:content url="http://christopherbeck.files.wordpress.com/2008/08/apex_3121.png" medium="image" />
	</item>
		<item>
		<title>Regular Expression Searching With APEX</title>
		<link>http://christopherbeck.wordpress.com/2008/08/26/regular-expression-searching-with-apex/</link>
		<comments>http://christopherbeck.wordpress.com/2008/08/26/regular-expression-searching-with-apex/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 15:15:39 +0000</pubDate>
		<dc:creator>Christopher Beck</dc:creator>
				<category><![CDATA[APEX]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[regexp_like]]></category>
		<category><![CDATA[regular expressions]]></category>

		<guid isPermaLink="false">http://christopherbeck.wordpress.com/?p=78</guid>
		<description><![CDATA[Ever since Oracle introduced regular expression functions in the database, I have been a big fan of them.  They really make certain tasks much easier and give you added functionality.  One place I always used them is in my APEX apps where I supply the user with a search box to constrain the results of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=christopherbeck.wordpress.com&amp;blog=4298178&amp;post=78&amp;subd=christopherbeck&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ever since Oracle introduced regular expression functions in the database, I have been a big fan of them.  They really make certain tasks much easier and give you added functionality.  One place I always used them is in my APEX apps where I supply the user with a search box to constrain the results of a query.</p>
<p>The old way I would have written the query constraint:</p>
<p><strong>where upper(COL1) like &#8216;%&#8217; || upper( <img src='http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> 1_SEARCH_TEXT ) || &#8216;%&#8217;</strong></p>
<p>Now using <strong>REGEXP_LIKE()</strong> you can achieve the same functionality while simplifying the constraint.  And you get the added bonus of advance searching for the power user.</p>
<p><strong>where regexp_like( COL1, nvl(:P1_REGEXP,COL1), &#8216;ix&#8217; ) </strong></p>
<p>The first thing you will probably notice is that there is no conditional operator in that expression.   None is needed.  The regexp_like function is a boolean function and is used as such.</p>
<p>So now, any basic search will work just as before.  But now, you can issue regular expression searches as well.  If you want all the entries that start with S, search for <strong>^s</strong></p>
<p>End with R, use <strong>r$</strong></p>
<p>Start with S and end with H, use <strong>^s.*h$</strong></p>
<p>Start with S or end with R, use <strong>^s|r$</strong></p>
<p>All 4 letter names, use <strong>^&#8230;.$</strong></p>
<p>Contains B, C, D or K, use <strong>[b-d,k]</strong><strong><br />
</strong></p>
<p>How about all names with double letters, use <strong>(.)\1</strong></p>
<p>There are many more things you can do.  If you want to read up about regular expressions in oracle, docs can be found <a href="http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28424/adfns_regexp.htm" target="_blank">here</a>.</p>
<p>Using regexp_like() opens up the advanced searching for all the regular expression junkies without compromising the simple searching and it add NO complexity to your applications.</p>
<p>I have staged a simple demo on apex.oracle.com, <a href="http://apex.oracle.com/pls/otn/f?p=19903:6" target="_blank">here</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/christopherbeck.wordpress.com/78/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/christopherbeck.wordpress.com/78/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/christopherbeck.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/christopherbeck.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/christopherbeck.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/christopherbeck.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/christopherbeck.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/christopherbeck.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/christopherbeck.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/christopherbeck.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/christopherbeck.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/christopherbeck.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/christopherbeck.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/christopherbeck.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/christopherbeck.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/christopherbeck.wordpress.com/78/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=christopherbeck.wordpress.com&amp;blog=4298178&amp;post=78&amp;subd=christopherbeck&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://christopherbeck.wordpress.com/2008/08/26/regular-expression-searching-with-apex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1f43c7305915db8a38b359be077b2cc8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">beckdood</media:title>
		</media:content>
	</item>
	</channel>
</rss>
