<?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>Sharing with the world</title>
	<atom:link href="http://theo.vanarem.nl/feed/" rel="self" type="application/rss+xml" />
	<link>http://theo.vanarem.nl</link>
	<description>Sharing with the world</description>
	<lastBuildDate>Fri, 20 Aug 2010 20:03:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Install VMWare tools</title>
		<link>http://theo.vanarem.nl/2010/08/20/install-vmware-tools/</link>
		<comments>http://theo.vanarem.nl/2010/08/20/install-vmware-tools/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 20:03:16 +0000</pubDate>
		<dc:creator>Theo van Arem</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[VMWare]]></category>
		<category><![CDATA[VMware vSphere Client]]></category>

		<guid isPermaLink="false">http://theo.vanarem.nl/?p=567</guid>
		<description><![CDATA[It&#8217;s a small but simple task to install VMWare tools on your virtual machine. I used the VMware vSphere Client to connect iso of the official VMWare client software as a cdrom to the cdrom drive of the running vm. Copy the tar.gz file to a temp directory Extract the archive file Run the installation [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s a small but simple task to install VMWare tools on your virtual machine.</p>
<p>I used the VMware vSphere Client to connect iso of the official VMWare client software as a cdrom to the cdrom drive of the running vm.<br />
<a href="http://theo.vanarem.nl/files/2010/08/Mount-CD-rom.png"><img src="http://theo.vanarem.nl/files/2010/08/Mount-CD-rom-300x182.png" alt="" title="Mount CD-rom" width="300" height="182" class="aligncenter size-medium wp-image-569" /></a></p>
<pre class="brush: bash; title: ; notranslate">
sudo mkdir /media/CD
sudo mount /dev/hda /media/CD
</pre>
<p>Copy the tar.gz file to a temp directory</p>
<pre class="brush: bash; title: ; notranslate">
mkdir /tmp
cp /media/CD/VMwareTools-4.0.0-208167.tar.gz /tmp
</pre>
<p>Extract the archive file</p>
<pre class="brush: bash; title: ; notranslate">
cd /tmp
tar xvzf VMwareTools-4.0.0-208167.tar.gz
</pre>
<p>Run the installation file</p>
<pre class="brush: bash; title: ; notranslate">
cd vmware-tools-distrib
sudo ./vmware-install.pl
</pre>
<p>The default parameters where sufficient for me so i could quickly continue I had to compile the tool again because there where no precompiled valid for my system. I neede to have a c ompiler that i had installed earlier</p>
<pre class="brush: bash; title: ; notranslate">
apt-get install gcc
</pre>
<p>after installation i restarted the vmxnet driver with the command dispayed in the terminal (i included the sudo command)</p>
<p>sudo /etc/init.d/networking stop<br />
sudo rmmod pcnet32<br />
sudo rmmod vmxnet<br />
sudo modprobe vmxnet<br />
sudo /etc/init.d/networking start</p>
<p>After this the client VMWare tools are installed.</p>
<img src="http://theo.vanarem.nl/?ak_action=api_record_view&id=567&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://theo.vanarem.nl/2010/08/20/install-vmware-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configure Hudson Subversion Credentials</title>
		<link>http://theo.vanarem.nl/2010/08/12/configure-hudson-subversion-credentials/</link>
		<comments>http://theo.vanarem.nl/2010/08/12/configure-hudson-subversion-credentials/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 13:47:34 +0000</pubDate>
		<dc:creator>Theo van Arem</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Credentials]]></category>
		<category><![CDATA[Hudson]]></category>
		<category><![CDATA[Repository]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://theo.vanarem.nl/?p=557</guid>
		<description><![CDATA[When hudson is using a secured subversion repository you need to supply the credentials for the used repository. You can enter your credentials using the following url: You will get a screen where you can register credentials connected to a repository]]></description>
			<content:encoded><![CDATA[<p>When hudson is using a secured subversion repository you need to supply the credentials for the used repository. You can enter your credentials using the following url:</p>
<pre class="brush: bash; title: ; notranslate">http://[server]:[port]/hudson/scm/SubversionSCM/enterCredential</pre>
<p>You will get a screen where you can register credentials connected to a repository</p>
<p><a href="http://theo.vanarem.nl/files/2010/08/SubversionAuthentication.png"><img src="http://theo.vanarem.nl/files/2010/08/SubversionAuthentication-300x178.png" alt="" title="SubversionAuthentication" width="300" height="178" class="aligncenter size-medium wp-image-559" /></a></p>
<img src="http://theo.vanarem.nl/?ak_action=api_record_view&id=557&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://theo.vanarem.nl/2010/08/12/configure-hudson-subversion-credentials/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with Hudson</title>
		<link>http://theo.vanarem.nl/2010/08/11/getting-started-with-hudson/</link>
		<comments>http://theo.vanarem.nl/2010/08/11/getting-started-with-hudson/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 11:10:20 +0000</pubDate>
		<dc:creator>Theo van Arem</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[Hudson]]></category>
		<category><![CDATA[jetty]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[winstone]]></category>

		<guid isPermaLink="false">http://theo.vanarem.nl/?p=534</guid>
		<description><![CDATA[To get started with hudson you need to download the latest hudson version Winstone is included in the war file so with a single command you can start hudson]]></description>
			<content:encoded><![CDATA[<p>To get started with hudson you need to download the <a href="http://hudson-ci.org/latest/hudson.war">latest hudson version</a></p>
<p><a href="http://winstone.sourceforge.net/">Winstone </a> is included in the war file so with a single command you can start hudson </p>
<pre class="brush: bash; title: ; notranslate">
set HUDSON_HOME=D:\workspace\BuildServer\hudson_home
set JAVA_OPTS=-XX:PermSize=50m -XX:MaxPermSize=100m -Xms64m -Xmx128m
java -DHUDSON_HOME=%HUDSON_HOME% -jar hudson.war --httpPort=8081
</pre>
<img src="http://theo.vanarem.nl/?ak_action=api_record_view&id=534&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://theo.vanarem.nl/2010/08/11/getting-started-with-hudson/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Include integration tests in maven build with TestNG</title>
		<link>http://theo.vanarem.nl/2010/08/05/include-integration-tests-in-maven-build/</link>
		<comments>http://theo.vanarem.nl/2010/08/05/include-integration-tests-in-maven-build/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 11:48:57 +0000</pubDate>
		<dc:creator>Theo van Arem</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[Integrationtest test]]></category>
		<category><![CDATA[testNG]]></category>

		<guid isPermaLink="false">http://theo.vanarem.nl/?p=541</guid>
		<description><![CDATA[To execute integration tests you can use testNG an other test framwork bases on junit framework. Test Suite Just create a simple testNG suite defined in a XML format: Annotations It calls the following Selenium test case where i have created a simple login script that logins with the supplied username and password (annotated with [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://theo.vanarem.nl/files/2010/08/maven-feather.png"><img src="http://theo.vanarem.nl/files/2010/08/maven-feather.png" alt="" title="maven-feather" width="90" height="30" class="alignright size-full wp-image-551" /></a>To execute integration tests you can use <a href="http://testng.org/doc/index.html">testNG </a>an other test framwork bases on junit framework. </p>
<p><strong>Test Suite</strong><br />
Just create a simple testNG suite defined in a XML format:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;suite name=&quot;LoginTestSuite&quot;&gt;
  &lt;test name=&quot;loginTest1-1&quot;&gt;
     &lt;parameter name=&quot;username&quot; value=&quot;jcooper&quot;/&gt;
     &lt;parameter name=&quot;password&quot; value=&quot;welcome1&quot;/&gt;
     &lt;parameter name=&quot;validTest&quot; value=&quot;true&quot;/&gt;
     &lt;classes&gt;
     &lt;class name=&quot;com.iteye.exchange.account.AllLoginTestsIT &quot;/&gt;
    &lt;/classes&gt;
  &lt;/test&gt;

  &lt;test name=&quot;loginTest1-2&quot;&gt;
     &lt;parameter name=&quot;username&quot; value=&quot;scot&quot;/&gt;
     &lt;parameter name=&quot;password&quot; value=&quot;dontknow&quot;/&gt;
     &lt;parameter name=&quot;validTest&quot; value=&quot;false&quot;/&gt;
     &lt;classes&gt;
     &lt;class name=&quot;com.iteye.exchange.account.AllLoginTestsIT &quot;/&gt;
    &lt;/classes&gt;
  &lt;/test&gt;

  &lt;test name=&quot;loginTest1-3&quot;&gt;
     &lt;parameter name=&quot;username&quot; value=&quot;unknown&quot;/&gt;
     &lt;parameter name=&quot;password&quot; value=&quot;hack&quot;/&gt;
     &lt;parameter name=&quot;validTest&quot; value=&quot;false&quot;/&gt;
     &lt;classes&gt;
     &lt;class name=&quot;com.iteye.exchange.account.AllLoginTestsIT &quot;/&gt;
    &lt;/classes&gt;
  &lt;/test&gt;
&lt;/suite&gt;
</pre>
<p><strong>Annotations</strong><br />
It calls the following Selenium test case where i have created a simple login script that logins with the supplied username and password (annotated with testng annotations ). It validates the tests if a valid or invalid repose is available in the HTML page. </p>
<p>Used annotations:</p>
<ol>
<li><strong>@BeforeClass</strong> you specify the setup method. In this case a connection to a running selenium server.</li>
<li><strong>@Test</strong> to specify a tests method. In this case the execution of the login script</li>
<li><strong>@Parameters</strong> to specify a tests method parameters. In this case the username, password and if it&#8217;s a valid test</li>
<li><strong>@AfterClass</strong> to specify the post test method. In this case the closure of the selenium server</li>
</ol>
<p><strong>Selenium Test case</strong><br />
The Selenium test case:</p>
<pre class="brush: java; title: ; notranslate">
package com.iteye.exchange.account;

import com.thoughtworks.selenium.*;
import org.testng.annotations.*;

public class AllLoginTestsIT extends SeleneseTestCase {
	private DefaultSelenium selenium;

	@BeforeClass
	public void setup() {
		selenium = new DefaultSelenium(&quot;localhost&quot;, 4444, &quot;*iexplore&quot;,
				&quot;http://localhost:8080/&quot;);
		selenium.start();
	}

	@Test
	@Parameters( { &quot;username&quot;, &quot;password&quot;, &quot;validTest&quot; })
	public void testLogin(String username, String password, Boolean validTest)
			throws Exception {
		selenium.open(&quot;/&quot;);
		selenium.type(&quot;username&quot;, username);
		selenium.type(&quot;password&quot;, password);
		selenium.click(&quot;//input[@value='Login']&quot;);
		selenium.waitForPageToLoad(&quot;30000&quot;);

		if (validTest) {
			verifyEquals(selenium.getText(&quot;//div[@id='nav']/div/span&quot;),
					username);
			selenium.click(&quot;link=Logout&quot;);
			selenium.waitForPageToLoad(&quot;30000&quot;);

		} else {
			verifyEquals(selenium
					.getText(&quot;//form[@id='id1']/div[2]/ul/li/span&quot;),
					&quot;Unknown username / password&quot;);
		}
	}

	@AfterClass
	public void tearDown() {
		selenium.stop();
	}
}
</pre>
<p><strong>Maven build file</strong></p>
<p>In the maven buildfile you need to include testng as dependency for the project (only needed in the test phase). I start and stop Jetty and Selenium in the pre-integration-test and post-integration-test phase so they are up and rud running when i execute the integration tests using the maven-failsafe plugin.</p>
<p>Don&#8217;t forget to include maven-failsafe to the verify phase to let the build fail if there is an error in a integration test.<br />
To let Jetty run as a demon process just give the daemon element a true value</p>
<pre class="brush: xml; title: ; notranslate">
..
&lt;dependencies&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.testng&lt;/groupId&gt;
    &lt;artifactId&gt;testng&lt;/artifactId&gt;
    &lt;version&gt;5.12.1&lt;/version&gt;
    &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependencies&gt;
  ...
    &lt;plugin&gt;
      &lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;
      &lt;artifactId&gt;jetty-maven-plugin&lt;/artifactId&gt;
      &lt;version&gt;7.0.1.v20091125&lt;/version&gt;
      &lt;executions&gt;
        &lt;execution&gt;
          &lt;id&gt;start-jetty&lt;/id&gt;
          &lt;phase&gt;pre-integration-test&lt;/phase&gt;
          &lt;goals&gt;
            &lt;goal&gt;run&lt;/goal&gt;
          &lt;/goals&gt;
          &lt;configuration&gt;
            &lt;daemon&gt;true&lt;/daemon&gt;
            &lt;scanIntervalSeconds&gt;2&lt;/scanIntervalSeconds&gt;
            &lt;stopPort&gt;9966&lt;/stopPort&gt;
            &lt;stopKey&gt;foo&lt;/stopKey&gt;
            &lt;webdefaultxml&gt;src/main/resources/webdefault.xml&lt;/webdefaultxml&gt;
          &lt;/configuration&gt;
        &lt;/execution&gt;
        &lt;execution&gt;
          &lt;id&gt;stop-jetty&lt;/id&gt;
          &lt;phase&gt;post-integration-test&lt;/phase&gt;
          &lt;goals&gt;
            &lt;goal&gt;stop&lt;/goal&gt;
          &lt;/goals&gt;
          &lt;configuration&gt;
            &lt;scanIntervalSeconds&gt;2&lt;/scanIntervalSeconds&gt;
            &lt;daemon&gt;true&lt;/daemon&gt;
            &lt;stopKey&gt;HALT&lt;/stopKey&gt;
            &lt;stopPort&gt;9100&lt;/stopPort&gt;
          &lt;/configuration&gt;
        &lt;/execution&gt;
      &lt;/executions&gt;
    &lt;/plugin&gt;
    &lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-failsafe-plugin&lt;/artifactId&gt;
      &lt;version&gt;2.5&lt;/version&gt;
      &lt;configuration&gt;
        &lt;suiteXmlFiles&gt;
          &lt;suiteXmlFile&gt;testng.xml&lt;/suiteXmlFile&gt;
        &lt;/suiteXmlFiles&gt;
        &lt;includes&gt;
          &lt;include&gt;**/*IT.java&lt;/include&gt;
        &lt;/includes&gt;
      &lt;/configuration&gt;
      &lt;executions&gt;
        &lt;execution&gt;
          &lt;id&gt;integration-test&lt;/id&gt;
          &lt;phase&gt;integration-test&lt;/phase&gt;
          &lt;goals&gt;
            &lt;goal&gt;integration-test&lt;/goal&gt;
          &lt;/goals&gt;
        &lt;/execution&gt;
        &lt;execution&gt;
          &lt;id&gt;verify&lt;/id&gt;
          &lt;phase&gt;verify&lt;/phase&gt;
          &lt;goals&gt;
            &lt;goal&gt;verify&lt;/goal&gt;
          &lt;/goals&gt;
        &lt;/execution&gt;
      &lt;/executions&gt;
    &lt;/plugin&gt;
    &lt;plugin&gt;
      &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
      &lt;artifactId&gt;selenium-maven-plugin&lt;/artifactId&gt;
      &lt;version&gt;1.0&lt;/version&gt;
      &lt;executions&gt;
        &lt;execution&gt;
          &lt;id&gt;start-sel&lt;/id&gt;
          &lt;phase&gt;pre-integration-test&lt;/phase&gt;
          &lt;goals&gt;
            &lt;goal&gt;start-server&lt;/goal&gt;
          &lt;/goals&gt;
          &lt;configuration&gt;
            &lt;background&gt;true&lt;/background&gt;
            &lt;logOutput&gt;true&lt;/logOutput&gt;
            &lt;multiWindow&gt;true&lt;/multiWindow&gt;
          &lt;/configuration&gt;
        &lt;/execution&gt;
        &lt;execution&gt;
          &lt;id&gt;stop-sel&lt;/id&gt;
          &lt;phase&gt;post-integration-test&lt;/phase&gt;
          &lt;goals&gt;
            &lt;goal&gt;stop-server&lt;/goal&gt;
          &lt;/goals&gt;
        &lt;/execution&gt;
      &lt;/executions&gt;
    &lt;/plugin&gt;
</pre>
<p>in this example the tests a straight forward and i didn&#8217;t use yet the added function that testNG has to offer. That is that you can specify test groups. To get a good explanation and example i refer to <a href="http://www.sonatype.com/books/mcookbook/reference/ch07s04.html">Maven Handbook Chapter 7.4 </a><br />
<strong>Resources</strong></p>
<ul>
<li><a href="http://testng.org/doc/index.html">testNG </a></li>
<li><a href="http://maven.apache.org/plugins/maven-failsafe-plugin/">maven-failsafe</a></li>
<li><a href="http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin">maven-jetty</a></li>
<li><a href="http://mojo.codehaus.org/selenium-maven-plugin/">maven-selenium</a></li>
<li><a href="http://www.sonatype.com/books/mcookbook/reference/ch07s04.html">Maven Handbook Chapter 7.4</a></li>
</ul>
<img src="http://theo.vanarem.nl/?ak_action=api_record_view&id=541&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://theo.vanarem.nl/2010/08/05/include-integration-tests-in-maven-build/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with Weblogic Scripting WLST</title>
		<link>http://theo.vanarem.nl/2010/07/13/getting-started-with-weblogic-scripting-wlst/</link>
		<comments>http://theo.vanarem.nl/2010/07/13/getting-started-with-weblogic-scripting-wlst/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 11:34:48 +0000</pubDate>
		<dc:creator>Theo van Arem</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Weblogic]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[Oracle Weblogic Server]]></category>
		<category><![CDATA[samples]]></category>
		<category><![CDATA[Weblogic server]]></category>
		<category><![CDATA[WLST]]></category>

		<guid isPermaLink="false">http://theo.vanarem.nl/?p=511</guid>
		<description><![CDATA[Using WLST is a good practice to specify configuration etc. How many times did you encounter that data sources where not configured as specified. Administrators are using configuration wizards to manual apply configurations. This is a time consuming process and can easly be simplified by using scripting language. In software development we are using this [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://theo.vanarem.nl/files/2010/07/middleware_lg_weblogic.png"><img src="http://theo.vanarem.nl/files/2010/07/middleware_lg_weblogic.png" alt="" title="middleware_lg_weblogic" width="150" height="205" class="alignright size-full wp-image-519" /></a>Using WLST is a good practice to specify configuration etc. How many times did you encounter that data sources where not configured as specified. Administrators are using configuration wizards to manual apply configurations. This is a time consuming process and can easly be simplified by using scripting language. In software development we are using this already a long time. Using ANT or Maven to compile application sources and run automated tests.</p>
<p>Still using scripts is often seen as a &#8216;thing&#8217; for programmers and system administrators somehow don&#8217;t have the trust in the use of scripts. Start using script and you will notice the decrease in workload when you have to apply configuration steps to your development environments {test, acceptation, production}. Scripts are executing alway the same logic and you reduce the type errors when configration changes are made by hand. How often you have you encountered a type error when a software release is promoted from Test to Acceptation. To get started with the Weblogic Scrpting language you can record the activities you preform within the Enterprise Manager.</p>
<p><strong>Recording actions in the console</strong><br />
Click in the console in int the top menu on Record<br />
<a href="http://theo.vanarem.nl/files/2010/07/Step1StartRecording.png"><img src="http://theo.vanarem.nl/files/2010/07/Step1StartRecording-300x190.png" alt="" title="Step1StartRecording" width="300" height="190" class="aligncenter size-medium wp-image-526" /></a><br />
You will get a notification that recording has been started and written to a mentioned location.<br />
<a href="http://theo.vanarem.nl/files/2010/07/Step2RecordingToLogfile.png"><img src="http://theo.vanarem.nl/files/2010/07/Step2RecordingToLogfile-300x190.png" alt="" title="Step2RecordingToLogfile" width="300" height="190" class="aligncenter size-medium wp-image-525" /></a><br />
Then you preform your configration action. In this case a created a datasource to my local XE database using the HR user.<br />
After that you press again record to stop the recording.<br />
<a href="http://theo.vanarem.nl/files/2010/07/Step4StopRecording.png"><img src="http://theo.vanarem.nl/files/2010/07/Step4StopRecording-300x191.png" alt="" title="Step4StopRecording" width="300" height="191" class="aligncenter size-medium wp-image-524" /></a><br />
After that you can press Preferences and select the tab &#8216;WLST Script Recording&#8217; to see where the script is stored and if you want to change future recordings you can adjust here the settings.<br />
<a href="http://theo.vanarem.nl/files/2010/07/Step5CheckTheRecordedScript.png"><img src="http://theo.vanarem.nl/files/2010/07/Step5CheckTheRecordedScript-300x191.png" alt="" title="Step5CheckTheRecordedScript" width="300" height="191" class="aligncenter size-medium wp-image-523" /></a></p>
<p>Below you see the content of the recording when creating a datasource:</p>
<pre class="brush: python; title: ; notranslate">

startEdit()

cd('/')
cmo.createJDBCSystemResource('hrDataSource')

cd('/JDBCSystemResources/hrDataSource/JDBCResource/hrDataSource')
cmo.setName('hrDataSource')

cd('/JDBCSystemResources/hrDataSource/JDBCResource/hrDataSource/JDBCDataSourceParams/hrDataSource')
set('JNDINames',jarray.array([String('jdbc/oracle/xe/hr')], String))

cd('/JDBCSystemResources/hrDataSource/JDBCResource/hrDataSource/JDBCDriverParams/hrDataSource')
cmo.setUrl('jdbc:oracle:thin:@weblogic11g:1521:xe')
cmo.setDriverName('oracle.jdbc.xa.client.OracleXADataSource')
setEncrypted('Password', 'Password_1278942495114', '/opt/oracle/middleware/user_projects/domains/single-server-domain/Script1278942290175Config', '/opt/oracle/middleware/user_projects/domains/single-server-domain/Script1278942290175Secret')

cd('/JDBCSystemResources/hrDataSource/JDBCResource/hrDataSource/JDBCConnectionPoolParams/hrDataSource')
cmo.setTestTableName('SQL SELECT 1 FROM DUAL\r\n\r\n\r\n')

cd('/JDBCSystemResources/hrDataSource/JDBCResource/hrDataSource/JDBCDriverParams/hrDataSource/Properties/hrDataSource')
cmo.createProperty('user')

cd('/JDBCSystemResources/hrDataSource/JDBCResource/hrDataSource/JDBCDriverParams/hrDataSource/Properties/hrDataSource/Properties/user')
cmo.setValue('hr')

cd('/JDBCSystemResources/hrDataSource/JDBCResource/hrDataSource/JDBCDataSourceParams/hrDataSource')
cmo.setGlobalTransactionsProtocol('TwoPhaseCommit')

cd('/SystemResources/hrDataSource')
set('Targets',jarray.array([ObjectName('com.bea:Name=AdminServer,Type=Server')], ObjectName))

activate()
</pre>
<p>All parameters are hard coded but it&#8217;s a point place to start with WLST.</p>
<p>Good practice is to separate the configuration parameters from the logic. This can be done by setting the configuration parameters at the beginning of the script or put the parameters in a seperate property file. I prefer this last option, this way the script doesn&#8217;t need to be altered when properties values are adjusted.</p>
<p>I encountered the issue that within the properties you can&#8217;t use a &#8216;.&#8217; as a separator i had to change this to make my script work.</p>
<pre class="brush: bash; title: ; notranslate">
weblogic.server.url=t3://weblogic11g:7001
weblogic.username=weblogic
weblogic.password=weblogic1

datasource_hr_name=hrDataSource
datasource_hr_jndiname=jdbc/oracle/xe/hr
datasource_hr_jdbc_url=jdbc:oracle:thin:@weblogic11g:1521:xe
datasource_hr_jdbc_drivername=oracle.jdbc.xa.client.OracleXADataSource
datasource_hr_username=hr
datasource_hr_password=hr
datasource_hr_test_sql=SELECT 1 FROM DUAL

datasource_hr_server_name=AdminServer
</pre>
<p>giving the following error:</p>
<pre class="brush: bash; title: ; notranslate">
Problem invoking WLST - Traceback (innermost last):
  File &quot;D:\workspace\IT-Eye\Weblog\WeblogicScriptingwlst\runwlstscript\hrDatasource.py&quot;, line 1, in ?
AttributeError: java package 'weblogic' has no attribute 'username'
</pre>
<p>I replaced the separator &#8216;.&#8217; with &#8216;_&#8217; and tried again:</p>
<pre class="brush: bash; title: ; notranslate">
c:wlst -loadProperties hrDatasource.properties hrDatasource.py
</pre>
<p>giving me the following result:</p>
<pre class="brush: bash; title: ; notranslate">
Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Connecting to t3://weblogic11g:7001 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'single-server-domain'.

Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.

Location changed to edit tree. This is a writable tree with
DomainMBean as the root. To make changes you will need to start
an edit session via startEdit().

For more help, use help(edit)
You already have an edit session in progress and hence WLST will
continue with your edit session.

Starting an edit session ...
Started edit session, please be sure to save and activate your
changes once you are done.
Saving all your changes ...
Saved all your changes successfully.
Activating all your changes, this may take a while ...
The edit lock associated with this edit session is released
once the activation is completed.
Activation completed
Disconnected from weblogic server: AdminServer
</pre>
<p><strong>WLST examples</strong></p>
<ul>
<li><a href="http://wlstbyexamples.blogspot.com/2010/02/configuring-generic-datasource.html">Generic Script Creating Datasource</a></li>
<li><a href="http://weblogic-wonders.com/weblogic/wlst/">Simple and Basic WLST Scripts</a></li>
<li><a href="http://weblogic-wonders.com/weblogic/2010/06/30/sending-email-alert-on-server-shutdown-using-wlst/">Sending email with WLST</a></li>
<li><a href="http://forums.oracle.com/forums/forum.jspa?forumID=729&#038;start=0">Weblogic WLST forum providing a lot of solutions and other examples</a></li>
</ul>
<p><strong>Documentation</strong></p>
<ul>
<li><a href="http://download.oracle.com/docs/cd/E14571_01/web.1111/e13813/toc.htm">WebLogic Scripting Tool Command Reference</a></li>
<li><a href="http://download.oracle.com/docs/cd/E14571_01/web.1111/e13715/toc.htm">Oracle WebLogic Scripting Tool</a></li>
<li><a href="http://download.oracle.com/docs/cd/E14571_01/core.1111/e10105/getstart.htm#CHDGGEAE">Getting Started</a></li>
</ul>
<img src="http://theo.vanarem.nl/?ak_action=api_record_view&id=511&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://theo.vanarem.nl/2010/07/13/getting-started-with-weblogic-scripting-wlst/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Oracle Service Bus and SOA suite in same server</title>
		<link>http://theo.vanarem.nl/2010/07/12/install-oracle-service-bus-and-soa-suite-in-same-server/</link>
		<comments>http://theo.vanarem.nl/2010/07/12/install-oracle-service-bus-and-soa-suite-in-same-server/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 11:05:09 +0000</pubDate>
		<dc:creator>Theo van Arem</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[OSB]]></category>
		<category><![CDATA[Oracle Service Bus]]></category>
		<category><![CDATA[Oracle SOA Suite 11g]]></category>
		<category><![CDATA[Weblogic]]></category>

		<guid isPermaLink="false">http://theo.vanarem.nl/?p=503</guid>
		<description><![CDATA[Today i installed a fresh Weblogic Development server for development. I decides to install SOA suite an OSB in on the same server following the blog OracleServiceBus in same Server of Manoj Neelapu. This is a great way of saving resources while running a Weblogic Server configuration. Chris Tomkins has made a viewlet demonstrating his [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://theo.vanarem.nl/files/2010/07/weblogic11g_clr.gif"><img src="http://theo.vanarem.nl/files/2010/07/weblogic11g_clr.gif" alt="" title="weblogic11g_clr" width="218" height="73" class="alignleft size-full wp-image-504" /></a>Today i installed a fresh Weblogic Development server for development. I decides to install SOA suite an OSB in on the same server following the blog <a href="http://blogs.oracle.com/mneelapu/2010/06/oracleservicebussoa_in_same_server.html">OracleServiceBus in same Server</a> of <a href="http://in.linkedin.com/in/mneelapu">Manoj Neelapu</a>. This is a great way of saving resources while running a Weblogic Server configuration.</p>
<p>Chris Tomkins has made a viewlet demonstrating his installation steps: <a href="http://blogs.oracle.com/christomkins/2010/05/soa_suite_11g_11113_creating_a.html">Creating a single server domain with SOA Suite and Oracle Service Bus functionality</a>.</p>
<img src="http://theo.vanarem.nl/?ak_action=api_record_view&id=503&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://theo.vanarem.nl/2010/07/12/install-oracle-service-bus-and-soa-suite-in-same-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>INST-07417 error while installing OSB 11g</title>
		<link>http://theo.vanarem.nl/2010/07/09/inst-07417-error-while-installing-osb-11g/</link>
		<comments>http://theo.vanarem.nl/2010/07/09/inst-07417-error-while-installing-osb-11g/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 12:10:45 +0000</pubDate>
		<dc:creator>Theo van Arem</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[OSB]]></category>
		<category><![CDATA[INST-07417]]></category>
		<category><![CDATA[oracle 11g]]></category>
		<category><![CDATA[Oracle Service Bus 11g]]></category>
		<category><![CDATA[OSB 11g]]></category>
		<category><![CDATA[OSB installation error]]></category>

		<guid isPermaLink="false">http://theo.vanarem.nl/?p=491</guid>
		<description><![CDATA[Today i was installing osb 11g on my vm ware server when i encounterd the following error: During the installation i have chosen all the available components: Oracle Server Bus Server Oracle Service Bus IDE Oracle Service Bus Examples I decided to not install the examples to see if that would help. I continued the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://theo.vanarem.nl/files/2010/07/OSB11gInstaller.png"><img src="http://theo.vanarem.nl/files/2010/07/OSB11gInstaller-150x150.png" alt="" title="OSB11gInstaller" width="0" height="0" class="alignleft size-thumbnail wp-image-497" /></a>Today i was installing osb 11g on my vm ware server when i encounterd the following error: </p>
<pre class="brush: bash; title: ; notranslate">
INST-07417: Evaluation Database has not been installed in the specified Weblogic Server Location. Provide a different Location.
</pre>
<p><a href="http://theo.vanarem.nl/files/2010/07/Error-INST-07417.png"><img src="http://theo.vanarem.nl/files/2010/07/Error-INST-07417-300x240.png" alt="" title="Error INST-07417" width="300" height="240" class="aligncenter size-medium wp-image-494" /></a><br />
During the installation i have chosen all the available components:</p>
<ul>
<li>Oracle Server Bus Server</li>
<li>Oracle Service Bus IDE</li>
<li>Oracle Service Bus Examples</li>
</ul>
<p>I decided to not install the examples to see if that would help.<br />
<a href="http://theo.vanarem.nl/files/2010/07/OracleServiceBusExamples.png"><img src="http://theo.vanarem.nl/files/2010/07/OracleServiceBusExamples-300x240.png" alt="" title="OracleServiceBusExamples" width="300" height="240" class="aligncenter size-medium wp-image-493" /></a><br />
I continued the installation and didn&#8217;t receive any errors. I got a nice installation summary.<br />
<a href="http://theo.vanarem.nl/files/2010/07/InstallationSummary.png"><img src="http://theo.vanarem.nl/files/2010/07/InstallationSummary-300x240.png" alt="" title="InstallationSummary" width="300" height="240" class="aligncenter size-medium wp-image-495" /></a></p>
<p>It&#8217;s quite strange that you can&#8217;t install the Examples directly with the installation of the server. Has anyone got an idea why this doesn&#8217;t work?</p>
<p><strong>environment</strong></p>
<ul>
<li>Oracle 10G XE database</li>
<li>RCU 11.1.1.3</li>
<li>Weblogic 10.3.3</li>
</ul>
<img src="http://theo.vanarem.nl/?ak_action=api_record_view&id=491&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://theo.vanarem.nl/2010/07/09/inst-07417-error-while-installing-osb-11g/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ADF checkbox representing a yes or no value</title>
		<link>http://theo.vanarem.nl/2010/07/07/adf-checkbox-representing-a-yes-or-no-value/</link>
		<comments>http://theo.vanarem.nl/2010/07/07/adf-checkbox-representing-a-yes-or-no-value/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 11:29:00 +0000</pubDate>
		<dc:creator>Theo van Arem</dc:creator>
				<category><![CDATA[ADF]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[checkbox]]></category>
		<category><![CDATA[dropdown box]]></category>
		<category><![CDATA[LOV]]></category>
		<category><![CDATA[Oracle ADF 11g]]></category>
		<category><![CDATA[Yes No values in Checkbox]]></category>

		<guid isPermaLink="false">http://theo.vanarem.nl/?p=450</guid>
		<description><![CDATA[In ADF you can present values as {&#8216;Y&#8217;,'N&#8217;} or {&#8216;YES&#8217; ,&#8217;NO} with a dropdown box. But when you have to have a high usability of you application you would like to use checkboxes for boolean values instead of drop down boxes. In ADF this can be achieved by putting the values into a LOV and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://theo.vanarem.nl/files/2010/07/oracle11gadf.gif"><img src="http://theo.vanarem.nl/files/2010/07/oracle11gadf.gif" alt="" title="oracle11gadf" width="226" height="85" class="alignleft size-full wp-image-478" /></a>In ADF you can present values as {&#8216;Y&#8217;,'N&#8217;} or {&#8216;YES&#8217; ,&#8217;NO} with a dropdown box. But when you have to have a high usability of you application you would like to use checkboxes for boolean values instead of drop down boxes. In ADF this can be achieved by putting the values into a LOV and adjust the display type to checkbox. To show how it&#8217;s done i have made the following step by step example:</p>
<p>I have created in the hr schema of the database a person table with different boolean indicators.</p>
<pre class="brush: sql; title: ; notranslate">
 CREATE TABLE &quot;HR&quot;.&quot;PERSONS&quot;
   (	&quot;ID&quot; NUMBER NOT NULL ENABLE,
	&quot;BLN&quot; NUMBER NOT NULL ENABLE,
	&quot;YNBLN&quot; VARCHAR2(1 BYTE) NOT NULL ENABLE,
	&quot;YESNOBLN&quot; VARCHAR2(20 BYTE),
        &quot;EMAIL&quot; VARCHAR2(20 BYTE),
	 CONSTRAINT &quot;PERSONS_PK&quot; PRIMARY KEY (&quot;ID&quot;)
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE &quot;USERS&quot;  ENABLE
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE &quot;USERS&quot; ;
</pre>
<p>In the three BLN columns i store in a different way a indicator value.</p>
<ul>
<li>Number: {1:true, 0:false}</li>
<li>Char: {Y:true, N:false}</li>
<li>String: {Yes:true;No:false}</li>
</ul>
<p>After creating the table i made a ADF model application and created a Entity Object on this table and  a view object based on the entity object.</p>
<p><a href="http://theo.vanarem.nl/files/2010/07/PersonView.png"><img src="http://theo.vanarem.nl/files/2010/07/PersonView-300x110.png" alt="" title="PersonView" width="300" height="110" class="aligncenter size-medium wp-image-457" /></a></p>
<p>When running the Application Module for a test you see the default presentation of the fields are input fields.<br />
<a href="http://theo.vanarem.nl/files/2010/07/AppModuleAllInputFields.png"><img src="http://theo.vanarem.nl/files/2010/07/AppModuleAllInputFields-300x187.png" alt="" title="AppModuleAllInputFields" width="300" height="187" class="aligncenter size-medium wp-image-459" /></a></p>
<p>Changing the presentation of the number boolean indicator is quite straight forward. In the entity object Person we change the Attribute Type of Bln from Number (as it&#8217;s defined in the database) to Boolean. Because the entity knows that the Database Column is a numbered datatype it will take care of the data conversions. After this change we restart the Application Module. We see now that the numbered value presentation is been replaced by an check-box. This is done because the entity objects treats the values as a Boolean instead of a numbered value, and this conversion is quite easy to do.<br />
<a href="http://theo.vanarem.nl/files/2010/07/AppModuleBlnToCheckbox.png"><img src="http://theo.vanarem.nl/files/2010/07/AppModuleBlnToCheckbox-300x181.png" alt="" title="AppModuleBlnToCheckbox" width="300" height="181" class="aligncenter size-medium wp-image-464" /></a></p>
<p>Converting a boolean value to {Y,N} or to {YES, NO} needs some more work. You can use different solutions, you can generate a specific entity class where you do the conversion from boolean to any other data type. I have chose to use a static LOV list to convert boolean values to other data types values.</p>
<p><a href="http://theo.vanarem.nl/files/2010/07/YesNoLOVStep1.png"><img src="http://theo.vanarem.nl/files/2010/07/YesNoLOVStep1-300x187.png" alt="" title="YesNoLOVStep1" width="300" height="187" class="aligncenter size-medium wp-image-467" /></a><br />
I created the LOV with three attribute values: Boolean, Char and String. This to show the working of different data types, it would be quite strange to have in a single application different way&#8217;s of storing boolean values.<br />
<a href="http://theo.vanarem.nl/files/2010/07/YesNoLOVAttributes.png"><img src="http://theo.vanarem.nl/files/2010/07/YesNoLOVAttributes-300x186.png" alt="" title="YesNoLOVAttributes" width="300" height="186" class="aligncenter size-medium wp-image-469" /></a><br />
I have given them the following values in a fixed list.<br />
<a href="http://theo.vanarem.nl/files/2010/07/YesNoLOVStep4.png"><img src="http://theo.vanarem.nl/files/2010/07/YesNoLOVStep4-300x187.png" alt="" title="YesNoLOVStep4" width="300" height="187" class="aligncenter size-medium wp-image-468" /></a><br />
After specifying the LOV we have to tell the View Object that it should use the values from the LOV to be stored as a representation of the check or unchecked state of the checkbox. This is done in the following way.</p>
<p>Open of the View Object the tab View Accessors and press the green + to add a View Accessors. Shuffle the YesNoLOV to the right pane.<br />
<a href="http://theo.vanarem.nl/files/2010/07/AddLOVViewAccessor.png"><img src="http://theo.vanarem.nl/files/2010/07/AddLOVViewAccessor-300x188.png" alt="" title="AddLOVViewAccessor" width="300" height="188" class="aligncenter size-medium wp-image-471" /></a></p>
<p>After adding the LOV as a View Accessor we go to the Attributes tab of the View Object and select the attribute that we want to change in this example Ynbln. We want to let the checkbox represent a Y value when checked and otherwise a N. To do this we select the Ynbln attribute and press the green + at the bottom of the screen to add a List of Values. Select in the Data Sourece List the added YesNoLOV1 that we created  as a View Accessor and specify the column that the checkbox should represent. In this case the column valueYN.<br />
<a href="http://theo.vanarem.nl/files/2010/07/AddLOVConfig.png"><img src="http://theo.vanarem.nl/files/2010/07/AddLOVConfig-300x300.png" alt="" title="AddLOVConfig" width="300" height="300" class="aligncenter size-medium wp-image-473" /></a></p>
<p>Select no the tab UI Hints. Uncheck here at the option &#8216;Include &#8220;No Selection&#8221; Item:&#8217; in the Choice List Options. We want always a value Y or N we don&#8217;t want a null value if the checkbox is not pressed.<br />
<a href="http://theo.vanarem.nl/files/2010/07/AddLOVUIHints.png"><img src="http://theo.vanarem.nl/files/2010/07/AddLOVUIHints-300x300.png" alt="" title="AddLOVUIHints" width="300" height="300" class="aligncenter size-medium wp-image-472" /></a></p>
<p>Now we have configured the presentation of this attribute. Default the View Object will represent the value with a dropdown listbox. To use the checkbox we have to open the View Object and edit the specified attribute &#8216;Ynbln&#8217;. We select the Control Hits item on the left and alter the Control Type to &#8216;Check Box&#8217;.<br />
<a href="http://theo.vanarem.nl/files/2010/07/ControlTypeCheckBox.png"><img src="http://theo.vanarem.nl/files/2010/07/ControlTypeCheckBox-300x187.png" alt="" title="ControlTypeCheckBox" width="300" height="187" class="aligncenter size-medium wp-image-475" /></a></p>
<p>Do you can do the same exercise for the attribute Yesnobln and use instead of the YNvalue the YesNo value. </p>
<p>To test the working of this solution run the Application Module and modify records. Check the modified records with SQL to check if the data that you have changed is stored in the correct format into the database.<br />
<a href="http://theo.vanarem.nl/files/2010/07/AppModuleAllYess.png"><img src="http://theo.vanarem.nl/files/2010/07/AppModuleAllYess-300x172.png" alt="" title="AppModuleAllYess" width="300" height="172" class="aligncenter size-medium wp-image-476" /></a><br />
As you see the corresponding results in the table.<br />
<a href="http://theo.vanarem.nl/files/2010/07/sqlCheckPersons.png"><img src="http://theo.vanarem.nl/files/2010/07/sqlCheckPersons-300x127.png" alt="" title="sqlCheckPersons" width="300" height="127" class="aligncenter size-medium wp-image-474" /></a></p>
<img src="http://theo.vanarem.nl/?ak_action=api_record_view&id=450&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://theo.vanarem.nl/2010/07/07/adf-checkbox-representing-a-yes-or-no-value/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Oracle APEX 4.0 Released</title>
		<link>http://theo.vanarem.nl/2010/06/23/oracle-apex-4-0-released/</link>
		<comments>http://theo.vanarem.nl/2010/06/23/oracle-apex-4-0-released/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 12:21:07 +0000</pubDate>
		<dc:creator>Theo van Arem</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[APEX 4.0]]></category>
		<category><![CDATA[Oracle APEX]]></category>

		<guid isPermaLink="false">http://theo.vanarem.nl/?p=444</guid>
		<description><![CDATA[Today Oracle APEX 4.0 got released!! Download the new version here]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.oracle.com/technology/products/database/application_express/index.html"><img src="http://www.oracle.com/technology/products/database/application_express/our_images/main_header.png" alt="APEX 4.0" /></a></p>
<p>Today Oracle APEX 4.0 got released!! Download the new version <a href="http://www.oracle.com/technology/products/database/application_express/index.html">here</a></p>
<img src="http://theo.vanarem.nl/?ak_action=api_record_view&id=444&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://theo.vanarem.nl/2010/06/23/oracle-apex-4-0-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using ADF GeoMap component</title>
		<link>http://theo.vanarem.nl/2010/06/23/using-adf-geomap-component/</link>
		<comments>http://theo.vanarem.nl/2010/06/23/using-adf-geomap-component/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 11:21:02 +0000</pubDate>
		<dc:creator>Theo van Arem</dc:creator>
				<category><![CDATA[ADF]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Spatial]]></category>
		<category><![CDATA[ADF 11g]]></category>
		<category><![CDATA[ADF autosubmit]]></category>
		<category><![CDATA[ADF PointStyleItem]]></category>
		<category><![CDATA[ADF sessionbean]]></category>
		<category><![CDATA[InputSlider]]></category>
		<category><![CDATA[Map]]></category>

		<guid isPermaLink="false">http://theo.vanarem.nl/?p=366</guid>
		<description><![CDATA[In preparation of an Oracle Spatial Presentation i have made a sample on how to implement Spatial data into an ADF Application. For this demo i used the sample data that comes with the MapViewer application. If you don&#8217;t have this sample data please install that first before you continue. Start your 11g JDeveloper Version [...]]]></description>
			<content:encoded><![CDATA[<p>In preparation of an Oracle Spatial Presentation i have made a sample on how to implement Spatial data into an ADF Application. For this demo i used the sample data that comes with the MapViewer application. If you don&#8217;t have this <a href="http://www.oracle.com/technology/software/products/mapviewer/htdocs/winsoft.html">sample data</a> please install that first before you continue.</p>
<p>Start your 11g JDeveloper<br />
<a href="http://theo.vanarem.nl/files/2010/06/OracleJDev11g.png"><img src="http://theo.vanarem.nl/files/2010/06/OracleJDev11g-300x190.png" alt="" title="OracleJDev11g" width="300" height="190" class="aligncenter size-medium wp-image-430" /></a><br />
<span id="more-366"></span></p>
<p>Version<br />
<a href="http://theo.vanarem.nl/files/2010/06/OracleJDev11gVersion.png"><br />
<img src="http://theo.vanarem.nl/files/2010/06/OracleJDev11gVersion-300x200.png" alt="" title="OracleJDev11gVersion" width="300" height="200" class="aligncenter size-medium wp-image-431" /></a><br />
Start your JDeveloper 11g and create a new application.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep01.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep01-300x219.png" alt="" title="adf11gStep01" width="300" height="219" class="aligncenter size-medium wp-image-425" /></a><br />
Give your application a name and a location. For the windows users don&#8217;t use any spaces in your location. This can give some strange errors.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep02.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep02-300x225.png" alt="" title="adf11gStep02" width="300" height="225" class="aligncenter size-medium wp-image-426" /></a><br />
Give your model a name i left all settings to default.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep03.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep03-300x225.png" alt="" title="adf11gStep03" width="300" height="225" class="aligncenter size-medium wp-image-424" /></a><br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep04.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep04-300x225.png" alt="" title="adf11gStep04" width="300" height="225" class="aligncenter size-medium wp-image-423" /></a><br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep05.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep05-300x225.png" alt="" title="adf11gStep05" width="300" height="225" class="aligncenter size-medium wp-image-422" /></a><br />
In the last step press finish to create your application<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep06.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep06-300x225.png" alt="" title="adf11gStep06" width="300" height="225" class="aligncenter size-medium wp-image-421" /></a><br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep07.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep07-300x195.png" alt="" title="adf11gStep07" width="300" height="195" class="aligncenter size-medium wp-image-420" /></a><br />
You will be presented with a nice overview of the items you can use to build your application. I will start with defining a database connection.<br />
Below i present my settings. Depending on your location of the database you have to adjust the parameters. Don&#8217;t forget to test you connection link to be sure that you have entered the right credentials and that you can establish a connection.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep08.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep08-300x300.png" alt="" title="adf11gStep08" width="300" height="300" class="aligncenter size-medium wp-image-419" /></a><br />
Now we start with creating Business Services.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep09.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep09-300x157.png" alt="" title="adf11gStep09" width="300" height="157" class="aligncenter size-medium wp-image-418" /></a><br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep10.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep10-300x101.png" alt="" title="adf11gStep10" width="300" height="101" class="aligncenter size-medium wp-image-417" /></a><br />
Press the button Create Entity Objects and Associations<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep11.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep11-300x142.png" alt="" title="adf11gStep11" width="300" height="142" class="aligncenter size-medium wp-image-416" /></a><br />
User the create mv_demo connection to create Business Components<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep12.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep12-300x189.png" alt="" title="adf11gStep12" width="300" height="189" class="aligncenter size-medium wp-image-415" /></a><br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep13.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep13-300x126.png" alt="" title="adf11gStep13" width="300" height="126" class="aligncenter size-medium wp-image-414" /></a><br />
Select some table to create Entity objects. I appended entity in the package name to split the entity objects from the view objects.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep14.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep14-300x187.png" alt="" title="adf11gStep14" width="300" height="187" class="aligncenter size-medium wp-image-413" /></a><br />
Select if you want to create also the customer employee view. I have appended view to the default package name to split the view objects from the entity objects.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep15.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep15-300x187.png" alt="" title="adf11gStep15" width="300" height="187" class="aligncenter size-medium wp-image-412" /></a><br />
Specify the objects that want to use only in read-only mode.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep16.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep16-300x187.png" alt="" title="adf11gStep16" width="300" height="187" class="aligncenter size-medium wp-image-411" /></a><br />
I have altered the package name of the Application Model to service to have this separated from the entity and view objects.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep17.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep17-300x187.png" alt="" title="adf11gStep17" width="300" height="187" class="aligncenter size-medium wp-image-410" /></a><br />
I din&#8217;t bother to create a Business Components Diagram<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep18.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep18-300x187.png" alt="" title="adf11gStep18" width="300" height="187" class="aligncenter size-medium wp-image-409" /></a><br />
As a last step you will get a summary of the objects that will be created<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep19.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep19-300x187.png" alt="" title="adf11gStep19" width="300" height="187" class="aligncenter size-medium wp-image-408" /></a><br />
Press finish and all the business components will be created within a few seconds.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep20.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep20-300x139.png" alt="" title="adf11gStep20" width="300" height="139" class="aligncenter size-medium wp-image-407" /></a><br />
Adjusting CitiesView object.</p>
<p>In this example i will use the cities to be presented on the map. Because they are stored in a SDO_GEOMETRY object type i have to extract them before i can use the wizard to create a GeoMap.<br />
Select in the model project the view objects tree and open CitiesView. Select in the window the Query attribute and click on the little pencil to edit the query.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep21.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep21-300x177.png" alt="" title="adf11gStep21" width="300" height="177" class="aligncenter size-medium wp-image-406" /></a><br />
Alter the query and append the following lines (selected in the screenshot)</p>
<pre class="brush: sql; title: ; notranslate">
,
Cities.LOCATION.SDO_POINT.y as ypos,
Cities.LOCATION.SDO_POINT.x as xpos
</pre>
<p><a href="http://theo.vanarem.nl/files/2010/06/adf11gStep22.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep22-300x187.png" alt="" title="adf11gStep22" width="300" height="187" class="aligncenter size-medium wp-image-405" /></a><br />
After editing the Query lines we have to check if what we have changed it working. So we select our Application Module with the Model project and with a right mouse click we get a drop down menu where can select Run.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep23.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep23-300x177.png" alt="" title="adf11gStep23" width="300" height="177" class="aligncenter size-medium wp-image-404" /></a><br />
A simple application will run the model. This application enables us to validate the working of the model and identify possible errors located in the model. Testing on this level is important. For example if you have implemented some business rules. In this case we want to check if the fields of xpos and ypos are correctly filled in before we continue.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep24.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep24-300x225.png" alt="" title="adf11gStep24" width="300" height="225" class="aligncenter size-medium wp-image-403" /></a></p>
<p>Now we have established a Model project with a working CitiesView object that gives us the information that we need to continue.</p>
<p>We go to our ViewController project and add a new item to this project<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep25.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep25-259x300.png" alt="" title="adf11gStep25" width="259" height="300" class="aligncenter size-medium wp-image-402" /></a><br />
Add a new JSF page to the ViewController project<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep26.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep26-300x219.png" alt="" title="adf11gStep26" width="300" height="219" class="aligncenter size-medium wp-image-401" /></a><br />
Give the jsp file a name and check &#8216;create as XML Document&#8217;. As a Page layout specify &#8216;Blank Page&#8217; we will create our own layout.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep27.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep27-300x256.png" alt="" title="adf11gStep27" width="300" height="256" class="aligncenter size-medium wp-image-400" /></a><br />
The JSF page gets generated.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep28.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep28-300x108.png" alt="" title="adf11gStep28" width="300" height="108" class="aligncenter size-medium wp-image-399" /></a><br />
You will now have the following items visible in your JDeveloper. We will start with creating the layout of the page.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep29.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep29-300x201.png" alt="" title="adf11gStep29" width="300" height="201" class="aligncenter size-medium wp-image-398" /></a><br />
Drag a Panel Splitter on your form. And adjust the properties of the splitter that a alignment of the two area&#8217;s is vertical (Splitter has to run from the left to the right of the window).<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep30.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep30-300x201.png" alt="" title="adf11gStep30" width="300" height="201" class="aligncenter size-medium wp-image-397" /></a><br />
Drag in the second (bottom area) a &#8216;Panel Tabbed&#8217; and rename the name of the tab to Cities.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep31.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep31-300x201.png" alt="" title="adf11gStep31" width="300" height="201" class="aligncenter size-medium wp-image-396" /></a></p>
<p>Now drag from the DataControls CitiesView1 onto the tabbed Panel. When releasing the mouse button you will get a menu and select from there &#8216;ADF Read-only Form &#8230;&#8217;.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep32.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep32-300x229.png" alt="" title="adf11gStep32" width="300" height="229" class="aligncenter size-medium wp-image-395" /></a><br />
You will be prompted with a window where you have to select the items that you want to display. I have removed the items that are selected in the screenshot.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep33.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep33-300x250.png" alt="" title="adf11gStep33" width="300" height="250" class="aligncenter size-medium wp-image-394" /></a><br />
After generation your JDeveloper will look something like this:<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep34.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep34-300x201.png" alt="" title="adf11gStep34" width="300" height="201" class="aligncenter size-medium wp-image-393" /></a></p>
<p><strong>Adding a GeoMap on the ADF page</strong><br />
Drag again the CitiesView1 from the DataControls but now to the first area above the splitter. On release of the mouse button you will get a menu and select now &#8216;Map and Point Theme &#8230;&#8217; we want to show here the map.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep35.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep35-300x226.png" alt="" title="adf11gStep35" width="300" height="226" class="aligncenter size-medium wp-image-392" /></a><br />
We have to specify now the map server that will supply us with a map. Installing a complete map server with mapviewer can be a challenge so i decided to use the educational map viewer that oracle supplies on their e learning server.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep36.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep36-300x212.png" alt="" title="adf11gStep36" width="300" height="212" class="aligncenter size-medium wp-image-391" /></a><br />
Click on the &#8216;+&#8217; button to add a new map configuration. Give it a functional name. and press the &#8216;+&#8217; behind the MapViewer URL. In this example we will not dive into GeoCoder. I can do that an other time <img src='http://theo.vanarem.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep37.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep37-300x126.png" alt="" title="adf11gStep37" width="300" height="126" class="aligncenter size-medium wp-image-390" /></a></p>
<pre class="brush: bash; title: ; notranslate">
name: elearningmap
url: http://elocation.oracle.com/mapviewer
</pre>
<p>Also for this item press the &#8216;Test Connection&#8217; button to check if the parameters are entered correctly and that you can establish a valid connection.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep38.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep38-247x300.png" alt="" title="adf11gStep38" width="247" height="300" class="aligncenter size-medium wp-image-389" /></a><br />
As i wrote before we leave the Geocoder url empty.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep39.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep39-300x126.png" alt="" title="adf11gStep39" width="300" height="126" class="aligncenter size-medium wp-image-388" /></a><br />
Enter the parameters as specified below to point to the US map in the &#8216;Los Angeles&#8217; area.</p>
<pre class="brush: bash; title: ; notranslate">
DataSource: ELOCATION_MERCATOR
Base Map: WORLD_MAP
Starting X: -120
Starting Y: 35
Zoom Level: 6
</pre>
<p><a href="http://theo.vanarem.nl/files/2010/06/adf11gStep40.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep40-300x212.png" alt="" title="adf11gStep40" width="300" height="212" class="aligncenter size-medium wp-image-387" /></a></p>
<p><strong>Adding a Point Theme to the GeoMap</strong><br />
After specifying the base map we have to specify a point theme to specify where a point needs to be displayed and how it should look. Give the point theme an useful name and specify the right items to the X and Y properties, don&#8217;t forget the other items <img src='http://theo.vanarem.nl/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> .<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep41.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep41-300x243.png" alt="" title="adf11gStep41" width="300" height="243" class="aligncenter size-medium wp-image-386" /></a><br />
After pressing the &#8216;OK&#8217; button your JDeveloper will look something like this:<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep42.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep42-300x201.png" alt="" title="adf11gStep42" width="300" height="201" class="aligncenter size-medium wp-image-385" /></a></p>
<p>We have now a nice map but we don&#8217;t have any interaction. We establish this to add some partial triggers to some components so we force a refresh when items have been altered.</p>
<p>Select the panelFormLayout of the adf form in the bottom of your screen. use the Structure window to help you select the correct item. Afther that search for &#8216;PartialTriggers&#8217; in the Property window.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep42.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep42-300x201.png" alt="" title="adf11gStep42" width="300" height="201" class="aligncenter size-medium wp-image-385" /></a></p>
<p>When you have found this property click on the dropdown arrow and select edit.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep43.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep43-300x209.png" alt="" title="adf11gStep43" width="300" height="209" class="aligncenter size-medium wp-image-384" /></a><br />
we have to specify now the item that will trigger a refresh of the form. Select the MAP item and move it to the Selected area.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep44.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep44-300x211.png" alt="" title="adf11gStep44" width="300" height="211" class="aligncenter size-medium wp-image-383" /></a></p>
<p>Now it&#8217;s a good moment to check if your application is showing also on runtime the map. Save all documents and run the application when by pressing the run button &#8216;Green triangle&#8217; in toolbar.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep45.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep45-300x113.png" alt="" title="adf11gStep45" width="300" height="113" class="aligncenter size-medium wp-image-382" /></a></p>
<p><strong>Configure Point Style Item</strong><br />
After checking the application we can make some adjustments to the application to make it more interesting for the user. Let&#8217;s add Point Style Items to show the different population of cities with different color flags.</p>
<p>We start by adding two Point Style Item elements to the existing mapPointTheme that we have added to the page earlier.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep46.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep46-300x183.png" alt="" title="adf11gStep46" width="300" height="183" class="aligncenter size-medium wp-image-381" /></a><br />
Adjust the max value and the BuiltInImage to the sepecified values shown below:</p>
<ul>
<li>MaxValue : 5000.0</li>
<li>BuiltInImage : &#8216;Flag_Green&#8217;</li>
</ul>
<p><a href="http://theo.vanarem.nl/files/2010/06/adf11gStep47.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep47-105x300.png" alt="" title="adf11gStep47" width="105" height="300" class="aligncenter size-medium wp-image-380" /></a><br />
Do the same with the second point theme but alter the values like displayed below:</p>
<ul>
<li>MinValue : 5001.0</li>
<li>BuiltInImage : &#8216;Flag_Red&#8217;</li>
</ul>
<p><a href="http://theo.vanarem.nl/files/2010/06/adf11gStep48.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep48-106x300.png" alt="" title="adf11gStep48" width="106" height="300" class="aligncenter size-medium wp-image-379" /></a><br />
Save all settings and redeploy our application. You will see that all the flags are read. Adjust the values to a more sensible value for example 50000. Adjust the values and refresh the browser window. You will have then the following map on your screen.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep49.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep49-300x205.png" alt="" title="adf11gStep49" width="300" height="205" class="aligncenter size-medium wp-image-378" /></a></p>
<p><strong>Create input Number Slider to control the color of the flags</strong><br />
Add at the bottom of the ADF form a Input Number Slider.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep50.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep50-300x242.png" alt="" title="adf11gStep50" width="300" height="242" class="aligncenter size-medium wp-image-377" /></a></p>
<p>Adjust the properties of the slider to the following values:</p>
<ul>
<li>Label: red</li>
<li>Maximum: 100</li>
<li>Major Increment: 25</li>
<li>Minimum Increment: 10</li>
<li>Value: 30</li>
<li>AutoSubmit : True</li>
</ul>
<p>Setting the AutoSubmit value to True will result in an automatically post of the value after altering.</p>
<p>Now we have to bind the value of the slider to a session bean to keep track of the value of the slider. Go to the Properties of the InputNumberSlider and find the property Binding. Click on the dropdown button and select Edit.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep51.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep51-275x300.png" alt="" title="adf11gStep51" width="275" height="300" class="aligncenter size-medium wp-image-376" /></a><br />
You will be prompted with a window to specify a Manged Bean.<br />
Click on the button &#8216;New&#8230;&#8217; to create a MangedBean<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep52.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep52-300x126.png" alt="" title="adf11gStep52" width="300" height="126" class="aligncenter size-medium wp-image-375" /></a><br />
Fill in the Creation Properties of the mangedBean like specified below.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep53.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep53-300x186.png" alt="" title="adf11gStep53" width="300" height="186" class="aligncenter size-medium wp-image-374" /></a><br />
After creation of the SessionBean we have to add a property to store the value of the slider. Press the button to create a new property and give it a sensible name &#8216;redSlider&#8217;.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep54.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep54-300x112.png" alt="" title="adf11gStep54" width="300" height="112" class="aligncenter size-medium wp-image-373" /></a><br />
You will have now a window like this:<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep55.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep55-300x126.png" alt="" title="adf11gStep55" width="300" height="126" class="aligncenter size-medium wp-image-372" /></a><br />
Press &#8216;OK&#8217; to create the session bean.</p>
<p>Now we have a value slider input that&#8217;s connection to the session bean to store the value of the slider. What we have to do now it to link the value of the PointStyleItems to the value of the session bean.<br />
Select the first mapPointThemeItem and go to the maxValue property in the Porperty Inspector. Select from the dropdown menu Expression Builder.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep56.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep56-300x167.png" alt="" title="adf11gStep56" width="300" height="167" class="aligncenter size-medium wp-image-371" /></a><br />
You will get a window where you can create an expression. Enter the following expression:</p>
<pre class="brush: bash; title: ; notranslate">
#{CitiesSessionBean.redSlider.value*10000}
</pre>
<p><a href="http://theo.vanarem.nl/files/2010/06/adf11gStep57.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep57-300x280.png" alt="" title="adf11gStep57" width="300" height="280" class="aligncenter size-medium wp-image-370" /></a><br />
Do the same for the second mapPointThemeItem where we have specified a minimum value. Enter there the following expression:</p>
<pre class="brush: bash; title: ; notranslate">
#{CitiesSessionBean.redSlider.value*10000 + 1}
</pre>
<p><a href="http://theo.vanarem.nl/files/2010/06/adf11gStep58.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep58-300x280.png" alt="" title="adf11gStep58" width="300" height="280" class="aligncenter size-medium wp-image-369" /></a><br />
Now we have connected the visual items to the session bean and have defined that a change of the value results in a automatic submit of the value of de sliderinput. We now have to configure the trigger event that the map gets refreshed after we change the value of the slider.</p>
<p>This is a simple action we select the map item in the Structure window and search in the property inspector for PartialTriggers. Select in the pull down menu Edit.<br />
<a href="http://theo.vanarem.nl/files/2010/06/adf11gStep59.png"><img src="http://theo.vanarem.nl/files/2010/06/adf11gStep59-300x109.png" alt="" title="adf11gStep59" width="300" height="109" class="aligncenter size-medium wp-image-368" /></a><br />
Add the InputNumberSlider of the form to the selected items. Now when we change the value of the slider the maps will be regenerated resulting that the PointStyleItems we be re rendered with the value from the sessionbean.</p>
<p>This example is based on a demonstration given by <a href="http://theo.vanarem.nl/2010/06/11/add-maps-to-your-java-applications-the-easy-way/">Shay Shmeltzers</a></p>
<img src="http://theo.vanarem.nl/?ak_action=api_record_view&id=366&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://theo.vanarem.nl/2010/06/23/using-adf-geomap-component/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

