<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-33895171</id><updated>2011-06-24T14:16:13.271-07:00</updated><title type='text'>Flextastic</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://flextastic.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33895171/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://flextastic.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>DaviddeB</name><uri>http://www.blogger.com/profile/11339082093961537259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-33895171.post-116428190993966194</id><published>2006-11-23T03:12:00.000-08:00</published><updated>2006-11-23T03:44:19.570-08:00</updated><title type='text'>flexDAO</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Objective:&lt;/span&gt;&lt;br /&gt;This post is centered around setting up and using FarataSystems excellent FlexDAO ant project to generate all server side code to interact with a Mysql Database. Instead of re stating what is availabe in the docs I´m going to list a few gotyas and config options that I faced while trying to get my own code up and running.&lt;br /&gt;&lt;br /&gt;First off you´ll need the code avaiable here (version .11 at this time) : &lt;a href="http://www.faratasystems.com/download/daoFlex/daoFlex.zip"&gt;http://www.faratasystems.com/download/daoFlex/daoFlex.zip&lt;/a&gt;&lt;br /&gt;Inside the zip you´ll find a docs folder that contains an explaination of how to go about setting up the example application. I managed to get the example running without too much hassle. &lt;br /&gt;&lt;br /&gt;When it came to setting up my own code I had a little more trouble, here are some tips when doing it with your own database. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Tips&lt;/span&gt;&lt;br /&gt;I tried initially to set it up inside my default flex application (running Tomcat 5.5), As this flex app has a config file (flex.xml) located in Catalina/localhost Tomcat doesn´t like you also specifying a context.xml file in the META-INF directory (I got a 'could not create resource error').  I also tried migrating the  Resource code from my context file to the flex.xml file which sort of worked (The fill button did not work but on an append the grid filled); Solution I copied the folder containing the example application and added my classes and generated code there.&lt;br /&gt; &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Things you need to change:&lt;/span&gt;&lt;br /&gt;Make sure you change the reference in the WEB-INF/web.xml file to point to the same database resource.&lt;br /&gt;Make sure you change the reference in the META-INF/config.xml file to point to the same database resource.&lt;br /&gt;Make sure you add the doaflex.swc to the Flex project (As per documentation 9.3. Add theriabook_daoflex.swc)&lt;br /&gt;Remember to copy your newly generated .class files to WEB-INF\classes folder&lt;br /&gt;Remember to copy your newly generated .as files to your root web application folder&lt;br /&gt;Remeber to have the Tomcat server stopped when running code generation.&lt;br /&gt;Look in the logs folder of Tomcat when you get an error.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Optional Changes&lt;/span&gt;&lt;br /&gt;If you want to use dataservices the AutoSync option is turned off by default in the generated code, to turn it on modify xls/DataServiceGridTest.xsl in the dao folder and change the line: &lt;span style="font-style:italic;"&gt;ds.autoSyncEnabled=false&lt;/span&gt;; to &lt;span style="font-style:italic;"&gt;ds.autoSyncEnabled=true;&lt;/span&gt;.&lt;br /&gt;To enable paging modify xls/data-management-config.xsl in the  dao folder and change&lt;br /&gt;&lt;span style="font-style:italic;"&gt;paging enabled="false"&lt;/span&gt; to &lt;span style="font-style:italic;"&gt;paging enabled="true" pageSize="200"  &lt;/span&gt; with the page size any value you want.&lt;br /&gt;&lt;br /&gt;Well I hope this helps you generate your code faster, leave a comment if you get stuck, I may have forgotten to put in a step.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33895171-116428190993966194?l=flextastic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flextastic.blogspot.com/feeds/116428190993966194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33895171&amp;postID=116428190993966194' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33895171/posts/default/116428190993966194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33895171/posts/default/116428190993966194'/><link rel='alternate' type='text/html' href='http://flextastic.blogspot.com/2006/11/flexdao.html' title='flexDAO'/><author><name>DaviddeB</name><uri>http://www.blogger.com/profile/11339082093961537259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33895171.post-115747123994020944</id><published>2006-09-05T07:42:00.000-07:00</published><updated>2006-11-23T02:56:25.126-08:00</updated><title type='text'>Adding AS3 code generation from Eclipse</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Update:&lt;/span&gt;&lt;br /&gt;Peter Martin has written a great postpost explaining the same issue check it out here: http://weblogs.macromedia.com/pmartin/archives/2006/04/xdoclet_woes.cfm&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Objective:&lt;/span&gt;&lt;br /&gt;I wanted to be able to generate my AS3 classes directly from the Java source code the Java guys create, I found that Joe berkovitz had built a xdoclet 2 plugin, so I set forth to incorporate it into our current Eclipse development environment using Ant. I hope this helps anyone else out there trying todo the same. While reading if you find any errors or omissions pelase leave a comment.&lt;br /&gt;Kudos to Joe, the Xdoclet 2 team, doclipse and Juan (one of our resdent java guys) to get this up and running working.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Required Links:&lt;/span&gt;&lt;br /&gt;&lt;a href="http://joeberkovitz.com/blog/2006/04/14/xdoclet2-update/"&gt;joeberkovitz's xdoclet 2 code&lt;/a&gt; - xdoclet-plugin-actionscript-1.0.3.20060414.jar&lt;br /&gt;&lt;a href="http://xdoclet.codehaus.org/"&gt;Xdoclet 2 v 1.0.3&lt;/a&gt; - xdoclet-plugins-1.0.3.tar.gz&lt;br /&gt;&lt;a href="http://www.beust.com/doclipse/"&gt;doclipse plugin for Xdoclet2&lt;/a&gt; - com.beust.doclipse.zip&lt;br /&gt;&lt;br /&gt;If velocity is not installed&lt;br /&gt;&lt;a href="http://jakarta.apache.org/site/downloads/downloads_velocity.cgi"&gt;Logkit-1.01.jar&lt;/a&gt; - inside velicity1.4.zip in folder &lt;span style="font-style: italic;"&gt;velocity-1.4/build/lib&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. Update the Xdoclet Plugin&lt;/span&gt;&lt;br /&gt;Extract the directory &lt;span style="font-style: italic;"&gt;xdoclet-plugins-1.0.3 &lt;/span&gt;from the downloaded tar.gz file.&lt;br /&gt;Delete the file &lt;span style="font-style: italic;"&gt;xdoclet-plugin-actionscript-1.0.3.jar &lt;/span&gt;from the plugins directory and replace it with &lt;span style="font-style: italic;"&gt;xdoclet-plugin-actionscript-1.0.3.20060414.jar &lt;/span&gt; downloaded from&lt;a href="http://joeberkovitz.com/blog/2006/04/14/xdoclet2-update/"&gt;joeberkovitz's xdoclet 2 code &lt;/a&gt;&lt;br /&gt;If velocity is not installed copy the &lt;span style="font-style: italic;"&gt;logkit-1.01.jar&lt;/span&gt; to the &lt;span style="font-style: italic;"&gt;lib &lt;/span&gt;directory of  &lt;span style="font-style: italic;"&gt;xdoclet-plugins-1.0.3 &lt;/span&gt; folder.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. Get Xdoclet 2 talking to Ant&lt;br /&gt;&lt;/span&gt;I´m not savey with correct directory structure for Java development so forgive me if the following is incorrect.&lt;br /&gt;Copy the newly updated &lt;span style="font-style: italic;"&gt;xdoclet-plugins-1.0.3 &lt;/span&gt; folder to your eclipse folder. (Mine is en D:\eclipse, the rest of the config file will assume this).&lt;br /&gt;&lt;br /&gt;Open Eclipse and create the folder &lt;span style="font-weight: bold;"&gt;lib &lt;/span&gt;and a folder &lt;span style="font-weight: bold;"&gt;tmp &lt;/span&gt;in your new java project and create a new &lt;span style="font-style: italic;"&gt;build.xml&lt;/span&gt; file.&lt;br /&gt;&lt;br /&gt;Here is and example of mine:&lt;br /&gt;&amp;lt;!-- build.xml for generating AS3 files --&amp;gt;&lt;br /&gt;&amp;lt;project&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;property name="xdoclet2.libs.dir" location="&lt;span style="font-weight: bold;"&gt;D:/eclipse/xdoclet-plugins-1.0.3/lib&lt;/span&gt;"/&amp;gt;&lt;br /&gt;&amp;lt;fileset id="xdoclet2.libs.set" dir="${xdoclet2.libs.dir}" includes="**/*.jar"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;property name="xdoclet2.plugins.dir" location="&lt;span style="font-weight: bold;"&gt;D:/eclipse/xdoclet-plugins-1.0.3/plugins&lt;/span&gt;"/&amp;gt;&lt;br /&gt;&amp;lt;fileset id="xdoclet2.plugins.set" dir="${xdoclet2.plugins.dir}" includes="**/*.jar"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- where your generated AS source lives --&amp;gt;&lt;br /&gt;&amp;lt;property name="generated" value="&lt;span style="font-weight: bold;"&gt;C:\fds2\jrun4\servers\default\flex\projectDirectory&lt;/span&gt;"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- Won't generate anything --&amp;gt;&lt;br /&gt;&amp;lt;property name="classOutput" value="&lt;span style="font-weight: bold;"&gt;C:\fds2\jrun4\servers\default\flex\WEB-INF\classes&lt;/span&gt;"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- where your project Java source lives --&amp;gt;&lt;br /&gt;&amp;lt;property name="src" value="src/"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- where your project jar lives --&amp;gt;&lt;br /&gt;&amp;lt;property name="lib" value="lib/"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;target name="generate-flex-classes"&amp;gt;&lt;br /&gt;&amp;lt;path id="xdoclet2.task.classpath"&amp;gt;&lt;br /&gt;&amp;lt;fileset refid="xdoclet2.libs.set"/&amp;gt;&lt;br /&gt;&amp;lt;fileset refid="xdoclet2.plugins.set"/&amp;gt;&lt;br /&gt;&amp;lt;pathelement path="${classOutput}"/&amp;gt;&lt;br /&gt;&amp;lt;fileset dir="${lib}" includes="**/*.jar"/&amp;gt;&lt;br /&gt;&amp;lt;/path&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;taskdef name="xdoclet" classname="org.xdoclet.ant.XDocletTask" classpathref="xdoclet2.task.classpath"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;xdoclet&amp;gt;&lt;br /&gt;&amp;lt;fileset dir="${src}"&amp;gt;&lt;br /&gt;&amp;lt;include name="**/*.java"/&amp;gt;&lt;br /&gt;&amp;lt;/fileset&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- Note: use ActionScript3Plugin instead for AS3 --&amp;gt;&lt;br /&gt;&amp;lt;component classname="org.xdoclet.plugin.actionscript.ActionScript3Plugin" destdir="${generated}"/&amp;gt;&lt;br /&gt;&amp;lt;/xdoclet&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;touch file="&lt;span style="font-weight: bold;"&gt;tmp&lt;/span&gt;"/&amp;gt;&lt;br /&gt;&amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/project&amp;gt;&lt;br /&gt;&lt;br /&gt;Change all the &lt;span style="font-weight: bold;"&gt;bold &lt;/span&gt;variables to correct directories for your project and environment.&lt;br /&gt;&lt;br /&gt;Add the new build.xml file to the Ant view.  Note:it won't run yet!!.&lt;br /&gt;&lt;br /&gt;Now we add the references to the Xdoclet2 jars (now for the part where I´m not sure if this is best practice nor the most neat, but it works and if you have a cleaner solution please comment it below.)&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Go to  &lt;span style="font-style: italic;"&gt;Window / Preferences &lt;/span&gt;in Eclipse  and open the Ant view. &lt;/li&gt;&lt;li&gt;Select &lt;span style="font-style: italic;"&gt;Runtime&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;Select &lt;span style="font-style: italic;"&gt;Ant Home Entries&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Click &lt;span style="font-style: italic;"&gt;Add External JARs&lt;/span&gt;&lt;/li&gt;&lt;li&gt;navigate to your&lt;span style="font-style: italic;"&gt; xdoclet-plugins-1.0.3 lib  folder (&lt;/span&gt;mine is in D:\eclipse\xdoclet-plugins-1.0.3\lib) and select all.&lt;/li&gt;&lt;li&gt;Click &lt;span style="font-style: italic;"&gt;Add External JARs&lt;/span&gt;&lt;/li&gt;&lt;li&gt;navigate to your&lt;span style="font-style: italic;"&gt; xdoclet-plugins-1.0.3 plugins folder (&lt;/span&gt;mine is in D:\eclipse\xdoclet-plugins-1.0.3\plugins) and select &lt;span style="font-style: italic;"&gt;xdoclet-plugin-actionscript-1.0.3.20060414.jar&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt;Now the final step add the references to your java code to specify them to be converted to AS3 Classes.&lt;br /&gt;&lt;br /&gt;Add:&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;*@actionscript.class&lt;br /&gt;*managed=true&lt;br /&gt;* */&lt;br /&gt;&lt;br /&gt;or&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;*@actionscript.property&lt;br /&gt;*bindable=true&lt;br /&gt;* */&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;to the start of every class you wish to have converted to a AS3 class.&lt;br /&gt;&lt;br /&gt;Run you Ant build file. With any luck your build should succeed and you will have freasly generated AS3 classes in your output root (if you look at the build.xml file above, mine was &lt;span style="font-weight: bold;"&gt;C:\fds2\jrun4\servers\default\flex\projectDirectory&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. Optional Install doclipse:&lt;br /&gt;&lt;/span&gt;You can install doclipse if you want Eclipse to automatically add code hits when creating AS3 comments in the class file.&lt;br /&gt;Download the zipfile &lt;span style="font-style: italic;"&gt;com.beust.doclipse.zip&lt;/span&gt;, extract the folder &lt;span style="font-style: italic;"&gt;com.beust.doclipse_0.7.0&lt;/span&gt; o the plugins directory of Eclipse. Start eclipse and check doclipse is installed by launching Eclipse and opening  the Windows / Preferences menu.  You should see an item "Doclipse" in the  tree on the left-hand side.&lt;br /&gt;&lt;br /&gt;create a xml file called  &lt;span style="font-style: italic;"&gt;doclipseAs3.xml&lt;/span&gt; and place it in the &lt;span style="font-style: italic;"&gt;xdoclet-plugins-1.0.3 &lt;/span&gt; folder (it doesn´t matter where but here is were we have all the other things we have been doing.)&lt;br /&gt;Paste the following into the file:&lt;br /&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="ISO-8859-1"?&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;doclipse&amp;gt;&lt;br /&gt;&amp;lt;description&amp;gt;Action Script 3 generator&amp;lt;/description&amp;gt;&lt;br /&gt;&amp;lt;tag name="@actionscript.class"&lt;br /&gt;doc="defines actionscript class to be generated from java class file"&lt;br /&gt;target="class"&amp;gt;&lt;br /&gt; &amp;lt;attribute name="managed" doc="is the class managed" allowed="true false" required="false"/&amp;gt;&lt;br /&gt; &amp;lt;attribute name="bindable" doc="is the class bindable" allowed="true false" required="false"/&amp;gt;&lt;br /&gt;&amp;lt;/tag&amp;gt;&lt;br /&gt;&amp;lt;tag name="@actionscript.property"&lt;br /&gt;doc="defines actionscript class to be generated from java class file"&lt;br /&gt;target="method field"&amp;gt;&lt;br /&gt; &amp;lt;attribute name="managed" doc="is the  property managed" allowed="true false" required="false"/&amp;gt;&lt;br /&gt; &amp;lt;attribute name="bindable" doc="is the property bindable" allowed="true false" required="false"/&amp;gt;&lt;br /&gt;&amp;lt;/tag&amp;gt;&lt;br /&gt;&amp;lt;/doclipse&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;In Eclipse goto Windows / Preferences menu.&lt;/li&gt;&lt;li&gt; Select External files&lt;/li&gt;&lt;li&gt;browse to the directory where you stored &lt;span style="font-style: italic;"&gt;doclipseAs3.xml&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Ensure that the xml file appears in the gidbox below and select Apply.&lt;/li&gt;&lt;li&gt;Click OK.&lt;/li&gt;&lt;/ul&gt;now when you are in a class file and you make a comment with /** when you type the @ symbol you will get code hinting to generate the correct AS3 plugin comments.&lt;br /&gt;&lt;br /&gt;Summary&lt;br /&gt;Well I hope this has helped anyone out there that wrestling with atogeneration of AS3. Enjoy and please leave comments if you foud this useful or if somthing should be corrected or amended.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33895171-115747123994020944?l=flextastic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flextastic.blogspot.com/feeds/115747123994020944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33895171&amp;postID=115747123994020944' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33895171/posts/default/115747123994020944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33895171/posts/default/115747123994020944'/><link rel='alternate' type='text/html' href='http://flextastic.blogspot.com/2006/09/adding-as3-code-generation-from.html' title='Adding AS3 code generation from Eclipse'/><author><name>DaviddeB</name><uri>http://www.blogger.com/profile/11339082093961537259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33895171.post-115746506388202050</id><published>2006-09-05T07:02:00.000-07:00</published><updated>2006-09-05T07:04:23.893-07:00</updated><title type='text'>Welcome</title><content type='html'>Welcome all, here I intend to post insights/solutons/hacks into Flex 2 development as I come across them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/33895171-115746506388202050?l=flextastic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flextastic.blogspot.com/feeds/115746506388202050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=33895171&amp;postID=115746506388202050' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33895171/posts/default/115746506388202050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33895171/posts/default/115746506388202050'/><link rel='alternate' type='text/html' href='http://flextastic.blogspot.com/2006/09/welcome.html' title='Welcome'/><author><name>DaviddeB</name><uri>http://www.blogger.com/profile/11339082093961537259</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
