<?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:blogger='http://schemas.google.com/blogger/2008' 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-1397058413243630272</id><updated>2024-09-17T05:23:50.269-03:00</updated><category term="adobe flex"/><category term="flex 4"/><category term="flash builder"/><category term="flex"/><category term="action script"/><category term="Java"/><category term="sdk"/><category term="AdvancedDataGrid"/><category term="DataGrid"/><category term="Hibernate"/><category term="JPA"/><category term="TextArea"/><category term="air"/><category term="apache"/><category term="beta"/><category term="component"/><category term="css"/><category term="csv"/><category term="código fonte"/><category term="data bind"/><category term="erro"/><category term="evento"/><category term="exemplo"/><category term="flexmania"/><category term="framework"/><category term="hiberante"/><category term="item renderer"/><category term="jboss"/><category term="locale"/><category term="mxml"/><category term="patch"/><category term="piada"/><category term="position columns"/><category term="precojusto"/><category term="save"/><category term="style"/><category term="width"/><title type='text'>Desenvolvendo em Flex</title><subtitle type='html'>Dicas sobre Adobe Flex, Java, BlazeDS, Jboss, Hibernate, JPA, AIR, entre outras.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>25</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-9023700745835309158</id><published>2014-01-16T17:08:00.000-02:00</published><updated>2014-01-16T17:08:52.611-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jboss"/><title type='text'>Conectando JVisualVM com JBoss AS 7</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Uma das ferramentas disponíveis para análise de memória do Java é o jvisualvm disponibilizado pela própria Oracle no Java JDK.&lt;br /&gt;
&lt;br /&gt;Aqui utilizei o &lt;a href=&quot;http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html#jdk-6u45-oth-JPR&quot; target=&quot;_blank&quot;&gt;Java JDK 6u45&lt;/a&gt;&amp;nbsp;&amp;nbsp;e o &lt;a href=&quot;http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.zip&quot; target=&quot;_blank&quot;&gt;Jboss AS 7.1.1 Final&lt;/a&gt;, vamos a prática:&lt;br /&gt;
&lt;br /&gt;
Vou partir do princípio que você já possui as variáveis de ambiente JBOSS_HOME e JAVA_HOME definidas.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Configurando o Jboss para aceitar a conexão JMX:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Abra o &lt;b&gt;CMD.exe&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Digite: &lt;b&gt;cd %JBOSS_HOME%\bin&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Adicione um usuário ao Jboss (se já possuir um não precisa):&amp;nbsp;&lt;b&gt;add-user.bat -a usuario senha&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Abra o client do Jboss:&amp;nbsp;&lt;b&gt;jboss-cli.bat&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;digite para habilitar as configurações JMX&lt;b&gt;:&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;ul&gt;
&lt;li&gt;connect --controller&lt;/li&gt;
&lt;li&gt;/subsystem=jmx :read-resource-description(recursive=true)&lt;/li&gt;
&lt;li&gt;quit&lt;/li&gt;
&lt;/ul&gt;
&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Inicie o Jboss normalmente.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Iniciando o JVisualVM:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;No CMD digite todas as linhas abaixo:&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;set JBOSS_MODULEPATH=%JBOSS_HOME%/modules&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;set CLASSPATH=&quot;&quot;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;rem lib necessarias&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;set CLASSPATH=%CLASSPATH%;&quot;%JBOSS_MODULEPATH%\org\jboss\remoting3\remoting-jmx\main\remoting-jmx-1.0.2.Final.jar&quot;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;set CLASSPATH=%CLASSPATH%;&quot;%JBOSS_MODULEPATH%\org\jboss\remoting3\main\jboss-remoting-3.2.3.GA.jar&quot;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;set CLASSPATH=%CLASSPATH%;&quot;%JBOSS_MODULEPATH%\org\jboss\remoting3\remoting-jmx\main\remoting-jmx-1.0.2.Final.jar&quot;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;set CLASSPATH=%CLASSPATH%;&quot;%JBOSS_MODULEPATH%\org\jboss\logging\jul-to-slf4j-stub\main\jul-to-slf4j-stub-1.0.0.Final.jar&quot;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;set CLASSPATH=%CLASSPATH%;&quot;%JBOSS_MODULEPATH%\org\jboss\logging\main\jboss-logging-3.1.0.GA.jar&quot;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;set CLASSPATH=%CLASSPATH%;&quot;%JBOSS_MODULEPATH%\org\jboss\xnio\main\xnio-api-3.0.3.GA.jar&quot;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;set CLASSPATH=%CLASSPATH%;&quot;%JBOSS_MODULEPATH%\org\jboss\xnio\nio\main\xnio-nio-3.0.3.GA.jar&quot;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;set CLASSPATH=%CLASSPATH%;&quot;%JBOSS_MODULEPATH%\org\jboss\xnio\nio\main\xnio-nio-3.0.3.GA.jar&quot;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;set CLASSPATH=%CLASSPATH%;&quot;%JBOSS_MODULEPATH%\org\jboss\sasl\main\jboss-sasl-1.0.0.Final.jar&quot;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;set CLASSPATH=%CLASSPATH%;&quot;%JBOSS_MODULEPATH%\org\jboss\marshalling\main\jboss-marshalling-1.3.11.GA.jar&quot;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;set CLASSPATH=%CLASSPATH%;&quot;%JBOSS_MODULEPATH%\org\jboss\marshalling\river\main\jboss-marshalling-river-1.3.11.GA.jar&quot;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;set CLASSPATH=%CLASSPATH%;&quot;%JBOSS_MODULEPATH%\org\jboss\marshalling\river\main\jboss-marshalling-river-1.3.11.GA.jar&quot;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;jvisualvm -cp:a %CLASSPATH%&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Irá abrir o Java VisualVM:&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://akquinetblog.files.wordpress.com/2012/11/01-visualvm-startscreen.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://akquinetblog.files.wordpress.com/2012/11/01-visualvm-startscreen.png&quot; height=&quot;240&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Clique com o botão direito em &lt;b&gt;Local&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Depois em &lt;b&gt;Add JMX Connection&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Insira o seguinte no campo&lt;b&gt; &lt;/b&gt;Connection:&amp;nbsp;&lt;b&gt;service:jmx:remoting-jmx://localhost:9999&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Insira o&amp;nbsp;usuário&amp;nbsp;e senha que você informou la em cima no &lt;b&gt;add-user.bat&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Vai ficar mais ou menos assim:&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://akquinetblog.files.wordpress.com/2012/11/05-visualvm-jmx-connection-jboss-remoting.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://akquinetblog.files.wordpress.com/2012/11/05-visualvm-jmx-connection-jboss-remoting.png&quot; height=&quot;268&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Se tudo ocorreu bem, você já pode verificar as configurações do Jboss e também o uso de memória do mesmo.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Dúvidas??&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Aprendido e copiado daqui:&amp;nbsp;&lt;a href=&quot;http://akquinetblog.files.wordpress.com/2012/11/06-visualvm-jbossas7-remote.png&quot;&gt;http://akquinetblog.files.wordpress.com/2012/11/06-visualvm-jbossas7-remote.png&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/9023700745835309158/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2014/01/conectando-jvisualvm-com-jboss-as-7.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/9023700745835309158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/9023700745835309158'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2014/01/conectando-jvisualvm-com-jboss-as-7.html' title='Conectando JVisualVM com JBoss AS 7'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Joinville - SC, Brasil</georss:featurename><georss:point>-26.3049935 -48.849150399999985</georss:point><georss:box>-26.760595499999997 -49.494597399999982 -25.8493915 -48.203703399999988</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-6601873808270868973</id><published>2013-06-20T11:04:00.000-03:00</published><updated>2013-08-16T14:02:59.154-03:00</updated><title type='text'>Adobe Flash Builder 4.7 com Apache SDK 4.10</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
ATUALIZAÇÃO: 16/08/2013 ApacheFlex 4.10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Pequeno tutorial (copiado e traduzido do &lt;a href=&quot;http://flex.apache.org/doc-getstarted.html&quot; target=&quot;_blank&quot;&gt;Apache Flex&lt;/a&gt;) para instalar o Adobe Flash Builder 4.7 junto com a ultima versão do SDK o Apache Flex SDK 4.10 que foi lançado dia 06/08/2013.&lt;br /&gt;
&lt;br /&gt;
Então, vamos começar:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Faça download do Adobe Flash Builder 4.7 neste link:&amp;nbsp;&lt;a href=&quot;https://creative.adobe.com/products/flash-builder&quot;&gt;https://creative.adobe.com/products/flash-builder&lt;/a&gt;&amp;nbsp;com cerca de 1,2Gb (para isso você precisa ter uma conta da adobe), esta versão tem 60 dias de avaliação, após isso, para continuar utilizando você deve comprá-lo, cerca de 250 obamas.&lt;/li&gt;
&lt;li&gt;Instale o FlashBuilder normalmente, seguindo as informações da tela.&lt;/li&gt;
&lt;li&gt;Faça download da ultima versão do SDK Installer no logo abaixo&lt;br /&gt;
&lt;iframe frameborder=&quot;0&quot; height=&quot;84&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; name=&quot;afSDKInstallBadgeSmall&quot; scrolling=&quot;no&quot; src=&quot;http://flex.apache.org/installerbadge/index.html&quot; width=&quot;402&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;ou pelo link: &lt;a href=&quot;http://flex.apache.org/installer.html&quot;&gt;http://flex.apache.org/installer.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Após o término do download, instale o Apache SDK 4.10 de acordo com as instruções de tela.&lt;/li&gt;
&lt;li&gt;Após a instalação do SDK, abra o FlashBuilder, insira seu login e senha da Adobe para ativar os 60 dias de teste.&lt;/li&gt;
&lt;li&gt;Agora vamos configurar o SDK dentro do FlashBuilder. Com o FlashBuilder aberto, vá no menu Windows &amp;gt; Preference, então expanda o item &quot;Flash Builder&quot;, vá até o item &quot;Installed Flex SDKs&quot;, clique em &quot;ADD&quot; e selecione a pasta de instalação do SDK (passo 4), por padrão está dentro da pasta do FlashBuilder\sdks, ex: &quot;C:\Program Files\Adobe\Adobe Flash Builder 4.7\sdks\4.10\&quot;. Automaticamente será preenchido o campo &quot;Flex SDK name&quot; com o seguinte nome &quot;Apache Flex 4.10 FP11.1 en_US&quot;, clique em OK e OK novamente.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Pronto, seu FlashBuilder está pronto para utilizar o novo SDK.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Agora basta criar um novo projeto, e selecionar o SDK correto.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Links de interesse:&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://flex.apache.org/index.html&quot;&gt;http://flex.apache.org/index.html&lt;/a&gt;&amp;nbsp;(inglês)&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://www.adobe.com/br/products/flash-builder.html&quot;&gt;http://www.adobe.com/br/products/flash-builder.html&lt;/a&gt;&amp;nbsp;(inglês)&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://help.adobe.com/en_US/flashbuilder/using/index.html&quot;&gt;http://help.adobe.com/en_US/flashbuilder/using/index.html&lt;/a&gt;&amp;nbsp;(inglês)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Vídeo aulas:&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://flex.apache.org/doc-videos.html&quot;&gt;http://flex.apache.org/doc-videos.html&lt;/a&gt;&amp;nbsp;(inglês)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Qualquer dúvida postem comentários abaixo.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Divulgue e comente!!&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/6601873808270868973/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2013/06/adobe-flash-builder-47-com-apache-sdk.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/6601873808270868973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/6601873808270868973'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2013/06/adobe-flash-builder-47-com-apache-sdk.html' title='Adobe Flash Builder 4.7 com Apache SDK 4.10'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-6607729712812679673</id><published>2013-06-19T14:47:00.003-03:00</published><updated>2013-06-19T14:47:44.506-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="csv"/><category scheme="http://www.blogger.com/atom/ns#" term="hiberante"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Exportar Tabela Sql para CSV</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Método simples e eficaz de exportar uma tabela de algum banco de dados para um arquivo CSV.&lt;br /&gt;
Útil para quando não se tem acesso ao editor do banco para exportar os dados.&lt;br /&gt;
&lt;br /&gt;
Precisa apenas do Session com o Hibernate já criado (&lt;a href=&quot;http://docs.jboss.org/hibernate/orm/3.5/reference/pt-BR/html/session-configuration.html&quot; target=&quot;_blank&quot;&gt;exemplo&lt;/a&gt;) para a função saber em qual banco conectar.&lt;br /&gt;
&lt;br /&gt;
Função:&lt;br /&gt;
&lt;pre class=&quot;brush: java;&quot;&gt;import java.io.File;
import java.io.FileOutputStream;
import java.util.List;

import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.Transaction;



public class ExportTableToCsv {

 /**
  * @param args
  * @throws Exception 
  */
 public static void main(String[] args) throws Exception {
  exportTableToCsv(&quot;CAD_CLIENTE&quot;, new File(&quot;C:\\temp\\out.csv&quot;), HibernateSessionFactory.getSession());
  
  System.out.println(&quot;OK&quot;);
 }
 
 /**
  * Export table to CSV file.
  * @param table: name of table
  * @param fileOut: file where you saved the CSV
  * @param em: Input the &quot;org.hibernate.Session&quot;, session connection to the database
  * @throws Exception
  */
 private static void exportTableToCsv(String table, File fileOut, Session em) throws Exception{
  Transaction trans = em.beginTransaction();
  try {
   Query query = em.createSQLQuery(&quot;SELECT COLUMNS.NAME AS COLUNA &quot;+
     &quot;FROM SYSOBJECTS AS TABLE, &quot;+
     &quot;     SYSCOLUMNS AS COLUMNS &quot;+
     &quot;WHERE TABLE.ID = COLUMNS.ID &quot;+
     &quot;  AND TABLE.NAME = &#39;&quot;+table+&quot;&#39; &quot;);
   @SuppressWarnings(&quot;rawtypes&quot;)
   List list = query.list();
   if(list.size()==0){
    throw new Exception(&quot;Table &#39;&quot;+table+&quot;&#39; does not exist.&quot;);
   }
   
   String texto = &quot;&quot;;
   for (int i = 0; i &amp;lt; list.size(); i++) {
    texto+= (String) list.get(i) + &quot;;&quot;;
   }
   texto+=&quot;\n&quot;;
   

   query = em.createSQLQuery(&quot;SELECT * FROM &quot;+table);
   list = query.list();
   trans.commit();
   
   for (int i = 0; i &amp;lt; list.size(); i++) {
    Object[] object = (Object[]) list.get(i);

    for (Object obj : object) {
     if(obj!=null){
      texto+= obj.toString().replace(&quot;;&quot;,&quot;|&quot;) + &quot;;&quot;;
     }else{
      texto+= &quot;null;&quot;;
     }
    }
    texto+=&quot;\n&quot;;
   }
   
   FileOutputStream fileOutputStream = new FileOutputStream(fileOut);
   fileOutputStream.write(texto.getBytes());
   
   fileOutputStream.flush();
   fileOutputStream.close();
  } catch (Exception e) {
   e.printStackTrace();
   if (trans!=null&amp;amp;&amp;amp;trans.isActive()) {
    trans.rollback();
   }
   throw e;
  } finally {
   em.close();
  }
 }
}
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Por hoje é isso pessoal.&lt;br /&gt;
COMPARTILHE, COMENTE, AGRADEÇA.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/6607729712812679673/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2013/06/exportar-tabela-sql-para-csv.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/6607729712812679673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/6607729712812679673'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2013/06/exportar-tabela-sql-para-csv.html' title='Exportar Tabela Sql para CSV'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Joinville - SC, República Federativa do Brasil</georss:featurename><georss:point>-26.3050883 -48.846093099999962</georss:point><georss:box>-26.760755800000002 -49.491540099999959 -25.8494208 -48.200646099999965</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-4569646881518840277</id><published>2013-05-08T09:30:00.000-03:00</published><updated>2013-05-08T09:32:55.048-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="action script"/><category scheme="http://www.blogger.com/atom/ns#" term="exemplo"/><category scheme="http://www.blogger.com/atom/ns#" term="flex"/><title type='text'>Copiar, Colar, Selecionar tudo em um DataGrid ou AdvancedDataGrid</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Olá pessoal, após muito tempo sumido, por falta de tempo. Voltei para mais um post.&lt;br /&gt;
Hoje vou mostrar algo que tive que implementar em um DataGrid ou AdvancedDataGrid.&lt;br /&gt;
&lt;br /&gt;
Necessidade:&lt;br /&gt;
Poder copiar os registros selecionados para o clipboard, também poder adicionar registros vindos de uma tabela &amp;nbsp;no excel, através do CTRL+C e CTRL+V.&lt;br /&gt;
&lt;br /&gt;
Solução:&lt;br /&gt;
Implementar as funções de COPY e PASTE em um datagrid, podendo copiar os itens selecionados, e também adicionar novos itens (desde que estejam com a mesma quantidade de colunas).&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
Na prática:&lt;br /&gt;
&lt;object data=&quot;https://dl.dropboxusercontent.com/u/3995876/GridCtrlV/GridCtrlV.html&quot; height=&quot;200&quot; width=&quot;500&quot;&gt; &lt;embed src=&quot;https://dl.dropboxusercontent.com/u/3995876/GridCtrlV/GridCtrlV.html&quot; width=&quot;500&quot; height=&quot;200&quot;&gt; &lt;/embed&gt; Error: Embedded data could not be displayed. &lt;/object&gt;
&lt;br /&gt;
Pode utilizar os atalhos do teclado também.&lt;br /&gt;
Você pode colar o texto abaixo em cima do grid:&lt;br /&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 256px;&quot;&gt;
 &lt;colgroup&gt;&lt;col span=&quot;4&quot; style=&quot;width: 48pt;&quot; width=&quot;64&quot;&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt; width: 48pt;&quot; width=&quot;64&quot;&gt;&lt;i&gt;abc1&lt;/i&gt;&lt;/td&gt;
  &lt;td style=&quot;width: 48pt;&quot; width=&quot;64&quot;&gt;&lt;i&gt;cdf2&lt;/i&gt;&lt;/td&gt;
  &lt;td style=&quot;width: 48pt;&quot; width=&quot;64&quot;&gt;&lt;i&gt;ghi3&lt;/i&gt;&lt;/td&gt;
  &lt;td style=&quot;width: 48pt;&quot; width=&quot;64&quot;&gt;&lt;i&gt;jkl4&lt;/i&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;
  &lt;td height=&quot;20&quot; style=&quot;height: 15.0pt;&quot;&gt;&lt;i&gt;mno5&lt;/i&gt;&lt;/td&gt;
  &lt;td&gt;&lt;i&gt;pqr6&lt;/i&gt;&lt;/td&gt;
  &lt;td&gt;&lt;i&gt;stu7&lt;/i&gt;&lt;/td&gt;
  &lt;td&gt;&lt;i&gt;vxz8&lt;/i&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
Código:&lt;br /&gt;
&lt;pre class=&quot;brush: xml;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;
&amp;lt;s:Application creationComplete=&quot;application1_creationCompleteHandler(event)&quot;
               minHeight=&quot;600&quot;
               minWidth=&quot;955&quot;
               xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot;
               xmlns:mx=&quot;library://ns.adobe.com/flex/mx&quot;
               xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot;
               xmlns:ui=&quot;flash.ui.*&quot;&amp;gt;
    &amp;lt;fx:Script&amp;gt;
        &amp;lt;![CDATA[
            import flash.desktop.Clipboard;
            import flash.desktop.ClipboardFormats;
            import flash.events.Event;
            
            import mx.collections.ArrayCollection;
            import mx.events.FlexEvent;
            
            [Bindable]
            private var array:ArrayCollection = null;
            
            private function onEvent(evt:Event):void {
                switch (evt.type) {
                    case &quot;paste&quot;:  {
                        var clipboadStr:String = Clipboard.generalClipboard.getData(ClipboardFormats.TEXT_FORMAT) as String;
                        
                        var arrayItem:Array = clipboadStr.split(&quot;\n&quot;);
                        
                        for each (var item:String in arrayItem) {
                            if (item.length&amp;gt;0) {
                                var arrayValorItem:Array = item.split(&quot;\t&quot;);
                                var obj:Object = new Object();
                                var cont:int = 0;
                                
                                for each (var col1:Object in evt.currentTarget.columns) {
                                    obj[col1.dataField] = arrayValorItem[cont];
                                    cont++;
                                }
                                evt.currentTarget.dataProvider.addItem(obj);
                            }
                        }
                        break;
                    }
                    case &quot;cut&quot;:  {
                        break;
                    }
                    case &quot;copy&quot;:  {
                        if (evt.currentTarget.selectedItems.length&amp;gt;0) {
                            var str:String = &quot;&quot;;
                            
                            for each (var itemObj:Object in evt.currentTarget.selectedItems) {
                                for each (var col:Object in evt.currentTarget.columns) {
                                    str += itemObj[col.dataField]+&quot;\t&quot;;
                                }
                                str += &quot;\n&quot;;
                            }
                            System.setClipboard(str);
                        }
                        break;
                    }
                    case &quot;selectAll&quot;:  {
                        var indexArr:Array = [];
                        
                        for (var i:uint = 0; i&amp;lt;evt.currentTarget.dataProvider.length; i++) {
                            indexArr.push(i);
                        }
                        evt.currentTarget.selectedIndices = indexArr;
                        break;
                    }
                    default:  {
                        break;
                    }
                }
            }
            
            private function menuSelect(evt:ContextMenuEvent):void {
                evt.currentTarget.contextMenu.hideBuiltInItems();
            }
            
            protected function application1_creationCompleteHandler(event:FlexEvent):void {
                array = new ArrayCollection();
                
                var obj:Object = new Object();
                obj.coluna1 = &quot;asd1&quot;;
                obj.coluna2 = &quot;asd2&quot;;
                obj.coluna3 = &quot;asd3&quot;;
                obj.coluna4 = &quot;asd4&quot;;
                array.addItem(obj);
                
                obj = new Object();
                obj.coluna1 = &quot;qwe1&quot;;
                obj.coluna2 = &quot;qwe2&quot;;
                obj.coluna3 = &quot;qwe3&quot;;
                obj.coluna4 = &quot;qwe4&quot;;
                array.addItem(obj);
                
                obj = new Object();
                obj.coluna1 = &quot;zxc1&quot;;
                obj.coluna2 = &quot;zxc2&quot;;
                obj.coluna3 = &quot;zxc3&quot;;
                obj.coluna4 = &quot;zxc4&quot;;
                array.addItem(obj);
            
            }
        ]]&amp;gt;
    &amp;lt;/fx:Script&amp;gt;

    &amp;lt;fx:Declarations&amp;gt;
        &amp;lt;!-- Place non-visual elements (e.g., services, value objects) here --&amp;gt;
    &amp;lt;/fx:Declarations&amp;gt;

    &amp;lt;mx:VBox&amp;gt;
        &amp;lt;mx:DataGrid id=&quot;dgMain&quot;
                     width=&quot;100%&quot;
                     height=&quot;100%&quot;
                     allowMultipleSelection=&quot;true&quot;
                     copy=&quot;onEvent(event)&quot;
                     cut=&quot;onEvent(event)&quot;
                     dataProvider=&quot;{array}&quot;
                     paste=&quot;onEvent(event)&quot;
                     selectAll=&quot;onEvent(event)&quot;&amp;gt;
            &amp;lt;mx:contextMenu&amp;gt;
                &amp;lt;!-- contextMenu: Habilita as opções com o botão direito do mouse --&amp;gt;
                &amp;lt;ui:ContextMenu clipboardMenu=&quot;true&quot;
                                menuSelect=&quot;menuSelect(event);&quot;&amp;gt;
                    &amp;lt;ui:clipboardItems&amp;gt;
                        &amp;lt;ui:ContextMenuClipboardItems copy=&quot;true&quot;
                                                      cut=&quot;false&quot;
                                                      paste=&quot;true&quot;
                                                      selectAll=&quot;true&quot;/&amp;gt;
                    &amp;lt;/ui:clipboardItems&amp;gt;
                &amp;lt;/ui:ContextMenu&amp;gt;
            &amp;lt;/mx:contextMenu&amp;gt;

            &amp;lt;mx:columns&amp;gt;
                &amp;lt;mx:DataGridColumn dataField=&quot;coluna1&quot;
                                   headerText=&quot;Coluna 1&quot;/&amp;gt;

                &amp;lt;mx:DataGridColumn dataField=&quot;coluna2&quot;
                                   headerText=&quot;Coluna 2&quot;/&amp;gt;

                &amp;lt;mx:DataGridColumn dataField=&quot;coluna3&quot;
                                   headerText=&quot;Coluna 3&quot;/&amp;gt;

                &amp;lt;mx:DataGridColumn dataField=&quot;coluna4&quot;
                                   headerText=&quot;Coluna 4&quot;/&amp;gt;
            &amp;lt;/mx:columns&amp;gt;
        &amp;lt;/mx:DataGrid&amp;gt;
    &amp;lt;/mx:VBox&amp;gt;
&amp;lt;/s:Application&amp;gt;

&lt;/pre&gt;
Bom pessoal, por hoje é isso, espero que tenham gostado.&lt;br /&gt;
&lt;br /&gt;
Comentem, divulguem, curtam.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/4569646881518840277/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2013/05/copiar-colar-selecionar-tudo-em-um.html#comment-form' title='5 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/4569646881518840277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/4569646881518840277'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2013/05/copiar-colar-selecionar-tudo-em-um.html' title='Copiar, Colar, Selecionar tudo em um DataGrid ou AdvancedDataGrid'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total><georss:featurename>Joinville - SC, República Federativa do Brasil</georss:featurename><georss:point>-26.3050883 -48.846093099999962</georss:point><georss:box>-26.7607588 -49.491540099999959 -25.8494178 -48.200646099999965</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-3318723280657950729</id><published>2011-12-15T08:13:00.001-02:00</published><updated>2011-12-15T08:13:59.608-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="apache"/><category scheme="http://www.blogger.com/atom/ns#" term="flex"/><category scheme="http://www.blogger.com/atom/ns#" term="sdk"/><title type='text'>Ajude o Flex - Seja um Committer</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Após toda a história da Adobe &quot;doar&quot; o Flex SDK para a &lt;a href=&quot;http://www.google.com/search?q=Apache+Software+Foundation&quot; target=&quot;_blank&quot;&gt;Apache Software Foundation&lt;/a&gt;&amp;nbsp; (&lt;a href=&quot;http://blogs.adobe.com/flex/2011/11/your-questions-about-flex.html&quot; target=&quot;_blank&quot;&gt;mais info&lt;/a&gt;)... &lt;br /&gt;
&lt;br /&gt;
Você que sempre teve ótimas idéias para o Flex, gosta de desenvolver em Flex, quer ajudar o Flex a se tornar cada vez melhor, agora você pode. Se inscreva para ser um COMMITTER do Flex SDK.&lt;br /&gt;
&lt;br /&gt;
Mais informações &lt;a href=&quot;http://blogs.adobe.com/flex/2011/12/call-for-committers.html&quot; target=&quot;_blank&quot;&gt;aqui&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Abraço!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/3318723280657950729/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/12/ajude-o-flex-seja-um-committer.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/3318723280657950729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/3318723280657950729'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/12/ajude-o-flex-seja-um-committer.html' title='Ajude o Flex - Seja um Committer'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Joinville - SC, Brasil</georss:featurename><georss:point>-26.3050883 -48.8460931</georss:point><georss:box>-26.532839300000003 -49.1619501 -26.0773373 -48.530236099999996</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-3457734987827875792</id><published>2011-12-05T08:03:00.001-02:00</published><updated>2011-12-05T08:08:04.390-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="flex"/><category scheme="http://www.blogger.com/atom/ns#" term="patch"/><title type='text'>Flex Patch de segurança</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;pt&quot;&gt;&lt;span class=&quot;hps&quot;&gt;Devido a uma&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;vulnerabilidade no&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;SDK&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;do Flex,&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;muitas aplicações&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;estão vulneráveis ​​a&lt;/span&gt; &lt;a href=&quot;http://pt.wikipedia.org/wiki/Cross-site_scripting&quot; target=&quot;_blank&quot;&gt;&lt;span class=&quot;hps&quot;&gt;cross-site&lt;/span&gt; &lt;span class=&quot;hps atn&quot;&gt;scripting (&lt;/span&gt;&lt;span class=&quot;&quot;&gt;XSS)&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;e deve ser&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;corrigida&lt;/span&gt;&lt;span class=&quot;&quot;&gt;, a fim de&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;proteger os dados&lt;/span&gt; &lt;span class=&quot;hps&quot;&gt;do usuário.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;pt&quot;&gt;&lt;span class=&quot;hps&quot;&gt;Os links para download do patch são:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;pt&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;a href=&quot;http://www.adobe.com/go/flexsdk3securitybuild&quot; target=&quot;_blank&quot;&gt;FLEX SDK&amp;nbsp; 3.x&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;pt&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;a href=&quot;http://www.adobe.com/go/flexsdk4securitybuild&quot; target=&quot;_blank&quot;&gt;FLEX SDK 4.x&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;pt&quot;&gt;&lt;span class=&quot;hps&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;&quot; id=&quot;result_box&quot; lang=&quot;pt&quot;&gt;&lt;span class=&quot;hps&quot;&gt;Mais informações &lt;a href=&quot;http://kb2.adobe.com/cps/915/cpsid_91544.html&quot; target=&quot;_blank&quot;&gt;aqui&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/3457734987827875792/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/12/flex-patch-de-seguranca.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/3457734987827875792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/3457734987827875792'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/12/flex-patch-de-seguranca.html' title='Flex Patch de segurança'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Joinville - SC, Brasil</georss:featurename><georss:point>-26.3050883 -48.8460931</georss:point><georss:box>-26.532839300000003 -49.1619501 -26.0773373 -48.530236099999996</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-1562613788295337399</id><published>2011-11-16T16:05:00.001-02:00</published><updated>2011-11-16T16:06:14.319-02:00</updated><title type='text'>Onde está o futuro do Flex?</title><content type='html'>Palavras perfeitas do Igor Costa, vale a pena ler todo o post dele:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.igorcosta.com/blog/?p=1472&quot;&gt;http://www.igorcosta.com/blog/?p=1472&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/1562613788295337399/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/11/onde-esta-o-futuro-do-flex.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/1562613788295337399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/1562613788295337399'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/11/onde-esta-o-futuro-do-flex.html' title='Onde está o futuro do Flex?'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-6010103000518417713</id><published>2011-10-13T08:47:00.001-03:00</published><updated>2011-10-13T08:50:10.068-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="flash builder"/><category scheme="http://www.blogger.com/atom/ns#" term="flex 4"/><title type='text'>Download FlashBuilder e Flex SDK 4.6</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;Como falei em outro post meu (&lt;/span&gt;&lt;a href=&quot;http://desenvolvendoemflex.blogspot.com/2011/09/flex-sdk-46-e-flash-builder-46.html&quot;&gt;http://desenvolvendoemflex.blogspot.com/2011/09/flex-sdk-46-e-flash-builder-46.html&lt;/a&gt;) e para&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;&amp;nbsp;quem se inscreveu para o pré-release do&lt;b&gt; flash builder&lt;/b&gt; e&lt;b&gt; flex sdk 4.6&lt;/b&gt; , já esta liberado para o &lt;b&gt;download&lt;/b&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;&lt;a href=&quot;https://prerelease.adobe.com/&quot;&gt;https://prerelease.adobe.com/&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;Já estou baixando o meu...&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;Divirta-se utilizando as novas funcionalidades :D&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/6010103000518417713/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/10/como-falei-em-outro-post-meu.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/6010103000518417713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/6010103000518417713'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/10/como-falei-em-outro-post-meu.html' title='Download FlashBuilder e Flex SDK 4.6'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-7214515473942543413</id><published>2011-09-22T17:07:00.003-03:00</published><updated>2011-09-23T12:50:01.782-03:00</updated><title type='text'>Componente LinkBar decorado</title><content type='html'>Olá pessoal.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Estava procurando pela internet como deixar o LinkBar mais bonito, e hoje meu amigo &lt;a href=&quot;http://twitter.com/fredy_gadotti&quot;&gt;@fredy_gadotti&lt;/a&gt; encontrou a solução.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Vejam:&lt;br /&gt;
&lt;iframe height=&quot;150&quot; src=&quot;http://www.eaigurus.com/src/LinkBarGarland/NiceTab.html&quot; width=&quot;100%&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;Fonte disponível, botão direito do mouse e &quot;View Source&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Achado em&amp;nbsp;&lt;a href=&quot;http://eaigurus.com/blog/?p=19&quot;&gt;http://eaigurus.com/blog/?p=19&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Vlw pessoal.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/7214515473942543413/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/09/componente-linkbar-decorado.html#comment-form' title='3 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/7214515473942543413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/7214515473942543413'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/09/componente-linkbar-decorado.html' title='Componente LinkBar decorado'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-7769790929390630584</id><published>2011-09-21T08:35:00.002-03:00</published><updated>2011-09-21T08:49:44.973-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="flash builder"/><category scheme="http://www.blogger.com/atom/ns#" term="flex 4"/><category scheme="http://www.blogger.com/atom/ns#" term="sdk"/><title type='text'>Flex SDK 4.6 e Flash Builder 4.6</title><content type='html'>A &lt;b&gt;Adobe &lt;/b&gt;lançou o &lt;b&gt;pre-release&lt;/b&gt; do &lt;b&gt;Flex SDK 4.6&lt;/b&gt;&amp;nbsp;(&lt;a href=&quot;http://www.adobe.com/go/flexprerelease/&quot;&gt;aqui&lt;/a&gt;) com muitos componentes novos e alguns Bugs corrigidos.&lt;br /&gt;
&lt;br /&gt;
Mais informações &lt;a href=&quot;http://www.adobe.com/devnet/flex/articles/whats-new-flex-flash-builder-46.html&quot;&gt;aqui&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/7769790929390630584/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/09/flex-sdk-46-e-flash-builder-46.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/7769790929390630584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/7769790929390630584'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/09/flex-sdk-46-e-flash-builder-46.html' title='Flex SDK 4.6 e Flash Builder 4.6'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Joinville - SC, Brasil</georss:featurename><georss:point>-26.3050883 -48.8460931</georss:point><georss:box>-26.532839300000003 -49.1619501 -26.0773373 -48.530236099999996</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-8791890771577186028</id><published>2011-07-13T18:20:00.000-03:00</published><updated>2011-07-13T18:20:26.904-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="adobe flex"/><category scheme="http://www.blogger.com/atom/ns#" term="air"/><category scheme="http://www.blogger.com/atom/ns#" term="beta"/><title type='text'>Adobe lança Beta do AIR 3.0 e do FlashPlayer 11</title><content type='html'>A &lt;a href=&quot;http://www.adobe.com/br/&quot;&gt;Adobe&lt;/a&gt; lançou hoje (13/07/2011) o &lt;b&gt;BETA &lt;/b&gt;do &lt;b&gt;AIR&amp;nbsp;3.0&lt;/b&gt; e do &lt;b&gt;FlashPlayer 11&lt;/b&gt;, onde foram corrigidas algumas questões de segurança e de performance, também adicionaram suporte a 64bits.&lt;br /&gt;
&lt;br /&gt;
Você poderá fazer o download das versões betas aqui: &lt;a href=&quot;http://labs.adobe.com/technologies/flashplatformruntimes/air3/&quot;&gt;AIR 3.0&lt;/a&gt;&amp;nbsp;e &lt;a href=&quot;http://labs.adobe.com/technologies/flashplatformruntimes/flashplayer11/&quot;&gt;FlashPlayer11&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Agora é só testar!!!</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/8791890771577186028/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/07/adobe-lanca-beta-do-air-30-e-do.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/8791890771577186028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/8791890771577186028'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/07/adobe-lanca-beta-do-air-30-e-do.html' title='Adobe lança Beta do AIR 3.0 e do FlashPlayer 11'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-2041693516528529307</id><published>2011-06-24T19:19:00.000-03:00</published><updated>2011-06-24T19:19:57.257-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="flex"/><category scheme="http://www.blogger.com/atom/ns#" term="piada"/><title type='text'>(off) Quadrinho</title><content type='html'>Quadrinho para alegrar o fim de semana:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://vidadeprogramador.com.br/2011/06/24/programador-flex&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://vidadeprogramador.com.br/wp-content/uploads/2011/06/tirinha149.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/2041693516528529307/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/06/off-quadrinho.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/2041693516528529307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/2041693516528529307'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/06/off-quadrinho.html' title='(off) Quadrinho'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-5030323006832823409</id><published>2011-06-16T19:17:00.000-03:00</published><updated>2011-06-16T19:17:11.319-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="adobe flex"/><category scheme="http://www.blogger.com/atom/ns#" term="locale"/><title type='text'>Flex com Multilinguagem (internacionalização)</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;Olá!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hoje vou mostrar como fazer um sistema &lt;b&gt;Multilinguagem&lt;/b&gt; (alterando &lt;b&gt;locales&lt;/b&gt;) no &lt;b&gt;Flex&lt;/b&gt;. Conforme o exemplo:&lt;br /&gt;
&lt;iframe height=&quot;160&quot; src=&quot;http://pontosistemas.com.br/samuel/MultiIdiomas/MultiIdiomas.html&quot; width=&quot;100%&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;*Para ver o fonte, clique com o botão direito do mouse e ViewSource.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Para isso você precisa ter os locales das linguagens. Os locales podem ser baixados nesses links:&lt;br /&gt;
&lt;ul&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;a href=&quot;http://pontosistemas.com.br/samuel/pt_BR_3.zip&quot;&gt;3.x (pt_BR)&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;a href=&quot;http://opensource.adobe.com/svn/opensource/flex/sdk/branches/4.x/frameworks/locale/&quot;&gt;4.x (vários)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;Estes locales devem ser colocados no diretório: &quot;{instalaçãodoflex}/sdks/{versaodosdk}/frameworks/locale/&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Configurando o projeto&lt;/b&gt;&lt;br /&gt;
Clique com o botão direito do mouse no projeto, vá em &quot;properties&quot; depois em &quot;Flex Compiler&quot;, em &quot;&lt;b&gt;Additional compiler arguments:&lt;/b&gt;&quot; coloque o seguinte:&lt;br /&gt;
&amp;nbsp; &lt;b&gt;-locale en_US pt_BR -source-path+=../locale/{locale}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
Ficando assim:&lt;br /&gt;
&lt;a href=&quot;http://pontosistemas.com.br/samuel/MultiIdiomas/flexcompile.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;78&quot; src=&quot;http://pontosistemas.com.br/samuel/MultiIdiomas/flexcompile.png&quot; width=&quot;517&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Após configurar o locale do seu projeto, você deve criar as pastas &quot;{projeto}/locale/en_US&quot; e &quot;{projeto}/locale/pt_BR&quot; e adicionar o arquivo &quot;localization.properties&quot; dentro de cada pasta.&lt;br /&gt;
&lt;br /&gt;
en_US&lt;br /&gt;
&lt;pre class=&quot;brush: actionscript3;&quot;&gt;label_selecione_linguagem=Select your language
label_nome=Name
label_sobrenome=Last Name
send_btn=Send
&lt;/pre&gt;&lt;br /&gt;
pt_BR&lt;br /&gt;
&lt;pre class=&quot;brush: actionscript3;&quot;&gt;label_selecione_linguagem=Selecione a linguagem
label_nome=Nome
label_sobrenome=Sobrenome
send_btn=Enviar
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Para ler estes arquivos faz assim:&lt;br /&gt;
&lt;pre class=&quot;brush: xml;&quot;&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;
&amp;lt;s:Application viewSourceURL=&amp;quot;srcview/index.html&amp;quot;
               xmlns:fx=&amp;quot;http://ns.adobe.com/mxml/2009&amp;quot;
               xmlns:mx=&amp;quot;library://ns.adobe.com/flex/mx&amp;quot;
               xmlns:s=&amp;quot;library://ns.adobe.com/flex/spark&amp;quot;&amp;gt;
    &amp;lt;s:layout&amp;gt;
        &amp;lt;s:VerticalLayout/&amp;gt;
    &amp;lt;/s:layout&amp;gt;

    &amp;lt;fx:Script&amp;gt;
        &amp;lt;![CDATA[
            import mx.resources.ResourceBundle;
            
            [Bindable]
            private var locales:Array = [&amp;#39;pt_BR&amp;#39;, &amp;#39;en_US&amp;#39;];
            
            private static const LOCALIZATION:String = &amp;#39;localization&amp;#39;;
            
            private function changeLanguage():void {
                this.resourceManager.localeChain = [cbxLanguage.selectedItem];
            }
        ]]&amp;gt;
    &amp;lt;/fx:Script&amp;gt;

    &amp;lt;fx:Metadata&amp;gt;
  [ResourceBundle(&amp;#39;localization&amp;#39;)]
 &amp;lt;/fx:Metadata&amp;gt;

    &amp;lt;mx:Form&amp;gt;
        &amp;lt;mx:FormItem label=&amp;quot;{resourceManager.getString( LOCALIZATION , &amp;#39;label_selecione_linguagem&amp;#39; )}:&amp;quot;&amp;gt;
            &amp;lt;mx:ComboBox id=&amp;quot;cbxLanguage&amp;quot;
                         change=&amp;quot;changeLanguage()&amp;quot;
                         dataProvider=&amp;quot;{locales}&amp;quot;/&amp;gt;
        &amp;lt;/mx:FormItem&amp;gt;

        &amp;lt;mx:FormItem label=&amp;quot;{resourceManager.getString( LOCALIZATION , &amp;#39;label_nome&amp;#39; )}:&amp;quot;&amp;gt;
            &amp;lt;s:TextInput/&amp;gt;
        &amp;lt;/mx:FormItem&amp;gt;

        &amp;lt;mx:FormItem label=&amp;quot;{resourceManager.getString( LOCALIZATION , &amp;#39;label_sobrenome&amp;#39; )}:&amp;quot;&amp;gt;
            &amp;lt;s:TextInput/&amp;gt;
        &amp;lt;/mx:FormItem&amp;gt;

        &amp;lt;s:Button label=&amp;quot;{resourceManager.getString( LOCALIZATION , &amp;#39;send_btn&amp;#39; )}&amp;quot;/&amp;gt;
    &amp;lt;/mx:Form&amp;gt;
&amp;lt;/s:Application&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
sendo a variável LOCALIZATION o nome do arquivo criado (pode ter vários).&lt;br /&gt;
para ler cada linha do arquivo utiliza-se: &lt;br /&gt;
&lt;pre class=&quot;brush: actionscript3;&quot;&gt;resourceManager.getString(LOCALIZATION, &#39;string&#39;)
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Por hoje é isso!!&lt;br /&gt;
&lt;br /&gt;
Comente!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/5030323006832823409/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/06/flex-com-multilinguagem.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/5030323006832823409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/5030323006832823409'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/06/flex-com-multilinguagem.html' title='Flex com Multilinguagem (internacionalização)'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total><georss:featurename>Joinville - SC, Brasil</georss:featurename><georss:point>-26.3050883 -48.846093099999962</georss:point><georss:box>-26.4927043 -49.072184599999964 -26.117472300000003 -48.620001599999959</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-5604952388643174833</id><published>2011-06-11T18:04:00.000-03:00</published><updated>2011-06-11T18:04:34.610-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="adobe flex"/><category scheme="http://www.blogger.com/atom/ns#" term="evento"/><category scheme="http://www.blogger.com/atom/ns#" term="flex 4"/><category scheme="http://www.blogger.com/atom/ns#" term="flexmania"/><title type='text'>#FlexMania 2011</title><content type='html'>Olá!&lt;br /&gt;
&lt;br /&gt;
Este ano ocorre a 3ª edição do &lt;a href=&quot;http://www.flexmania.com.br&quot;&gt;FlexMania&lt;/a&gt;. É um &lt;b&gt;evento &lt;/b&gt;online e &lt;b&gt;gratuito&lt;/b&gt; que junta vários &lt;a href=&quot;http://www.flexmania.com.br/palestrantes.php&quot;&gt;palestrantes&lt;/a&gt; falando sobre diversos &lt;a href=&quot;http://www.flexmania.com.br/agenda.php&quot;&gt;assuntos&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
O evento acontece dias &lt;b&gt;07, 08, 09 e 10 de Julho de 2011&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Eu e todos aqui da &lt;a href=&quot;http://twitter.com/PontoSistemas&quot;&gt;@PontoSistemas&lt;/a&gt; vamos participar!!&lt;br /&gt;
&lt;br /&gt;
Para saber mais acesse: &lt;a href=&quot;http://www.flexmania.com.br/&quot;&gt;http://www.flexmania.com.br/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Até mais!</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/5604952388643174833/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/06/flexmania-2011.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/5604952388643174833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/5604952388643174833'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/06/flexmania-2011.html' title='#FlexMania 2011'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Joinville - SC, Brasil</georss:featurename><georss:point>-26.3050883 -48.846093099999962</georss:point><georss:box>-26.4927043 -49.072184599999964 -26.117472300000003 -48.620001599999959</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-8922059468954606019</id><published>2011-06-10T18:40:00.000-03:00</published><updated>2011-06-10T18:40:27.258-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="action script"/><category scheme="http://www.blogger.com/atom/ns#" term="adobe flex"/><title type='text'>Variáveis Globais no Flex.</title><content type='html'>Olá.&lt;br /&gt;
&lt;br /&gt;
Neste post vou mostrar como fazer com que uma (ou várias) variável seja utilizada e compartilhe o mesmo valor em toda a aplicação.&lt;br /&gt;
&lt;br /&gt;
Para isto basta criar uma classe, com o método &lt;b&gt;getInstance()&lt;/b&gt; e chamar esta classe em qualquer lugar do sistema através do getInstance(), e pronto você terá a mesma variável com o mesmo valor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Classe de exemplo:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;VariaveisGlobais.as&lt;/i&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: actionscript3;&quot;&gt;package com.blogspot.desenvolvendoemflex.utils {
 import mx.collections.ArrayCollection;
    
    [Bindable]
    public class VariaveisGlobais {
        private static var instance:VariaveisGlobais;
        
        public var variavel:ArrayCollection;
  
        public static function getInstance():VariaveisGlobais {
            if (instance==null) {
                instance = new VariaveisGlobais();
            }
            return instance;
        }
    }
}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
para utiliza-la basta instanciar desta maneira em qualquer parte de seu programa:&lt;br /&gt;
&lt;pre class=&quot;brush: actionscript3;&quot;&gt;            [Bindable]
            public var varGlobal:VariaveisGlobais = VariaveisGlobais.getInstance();
&lt;/pre&gt;&lt;br /&gt;
Tenha cuidado ao utilizar desta forma, pois dependendo da quantidade de variáveis e informações, pode ficar pesado o sistema.&lt;br /&gt;
&lt;br /&gt;
Por hoje é isso!&lt;br /&gt;
&lt;br /&gt;
Até a próxima.&lt;br /&gt;
&lt;br /&gt;
Comentem!!</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/8922059468954606019/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/06/variaveis-globais-no-flex.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/8922059468954606019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/8922059468954606019'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/06/variaveis-globais-no-flex.html' title='Variáveis Globais no Flex.'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total><georss:featurename>Joinville - SC, Brasil</georss:featurename><georss:point>-26.3050883 -48.846093099999962</georss:point><georss:box>-26.4927043 -49.072184599999964 -26.117472300000003 -48.620001599999959</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-632620376282080349</id><published>2011-06-08T19:48:00.000-03:00</published><updated>2011-06-08T19:48:29.689-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Hibernate"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="JPA"/><title type='text'>Java + JPA + Hibernate + DAO Genérico</title><content type='html'>Olá, hoje vou mostrar como fazer um &lt;b&gt;DAO Genérico&lt;/b&gt; no Java (contendo  SaveOrUpdate, Remove, FindAll, FindByID) que pode ser usado por todos os DAOs. Facilitando a criação de novos projetos, podendo ser usado com a integração com o Adobe Flex através do RemoteObject.&lt;br /&gt;
&lt;br /&gt;
Isto é para quem não quer usar nenhuma espécie de Framework (ex: &lt;a href=&quot;http://www.springsource.org/&quot;&gt;Spring&lt;/a&gt;, que faz isso de uma forma mais genérica).&lt;br /&gt;
&lt;br /&gt;
Primeiramente criei minha classe contendo todos os métodos (save, update, delete, find), para minha classe ficar &quot;genérica&quot; ao invés de receber as entidades específicas, recebe Object (pode passar as Entidades que o java consegue reconhecer). Após criar esta classe contendo os métodos, é só criar os DAOs extendendo da classe genérica, com isso já terá todos os métodos implementados. Podendo fazer validações específicas para cada DAO.&lt;br /&gt;
&lt;br /&gt;
Vamos a prática:&lt;br /&gt;
&lt;br /&gt;
Este é minha classe genérica contendo todos os métodos.&lt;br /&gt;
&lt;i&gt;GenericDAO.java&lt;/i&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: java;&quot;&gt;package com.blogspot.desenvolvendoemflex.util;

import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.util.ArrayList;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.Transaction;

/**
 * @author SAMUEL FACCHINELLO
 * @version 1.0
 */
public class GenericDAO {

 /**
  * Salva ou Atualiza dependendo se já existe ou não o objeto no banco de dados. 
  * @param o: Entidade a ser Salva (se ainda não existir) ou a ser Atualizada (se já existir)
  * @return Retorna a Entidade passada como parâmetro.
  * @throws Exception
  */
 public Object saveOrUpdate(Object o) throws Exception {
  Session em = HibernateSessionFactory.getSession();
  Transaction trans = em.beginTransaction();
  try {
   trans.begin();
   em.merge(o);
   trans.commit();
   return o;
  } catch (Exception e) {
   if (trans.isActive()) {
    trans.rollback();
   }
   e.printStackTrace();
   throw e;
  } finally {
   em.close();
  }
 }

 /**
  * Salva ou Atualiza dependendo se já existe ou não o objeto no banco de dados. 
  * @param list: lista das Entidades a serem Salvas (se ainda não existir) ou a serem Atualizadas (se já existir)
  * @return Retorna a Entidade passada como parâmetro.
  * @throws Exception
  */
 public void saveOrUpdateAll(ArrayList&amp;lt;Object&amp;gt; list) throws Exception {
  Session em = HibernateSessionFactory.getSession();
  Transaction trans = em.beginTransaction();
  try {
   trans.begin();
   for (Object o : list) {
    em.merge(o);
   }
   trans.commit();
  } catch (Exception e) {
   if (trans.isActive()) {
    trans.rollback();
   }
   e.printStackTrace();
   throw e;
  } finally {
   em.close();
  }
 }

 /**
  * Remove a Entidade do banco de dados.
  * @param o: Entidade a ser removido do banco de dados.
  * @throws Exception
  */
 public void remove(Object o) throws Exception {
  Session em = HibernateSessionFactory.getSession();
  Transaction trans = em.beginTransaction();
  try {
   trans.begin();
   em.delete(o);
   trans.commit();
  } catch (Exception e) {
   if (trans.isActive()) {
    trans.rollback();
   }
   throw e;
  } finally {
   em.close();
  }
 }

 /**
  * Remove a Entidade do banco de dados.
  * @param list: Lista de Entidades a serem removidas do banco de dados.
  * @throws Exception
  */
 public void removeAll(ArrayList&amp;lt;Object&amp;gt; list) throws Exception {
  Session em = HibernateSessionFactory.getSession();
  Transaction trans = em.beginTransaction();
  try {
   trans.begin();
   for (Object o : list) {
    em.delete(o);
   }
   trans.commit();
  } catch (Exception e) {
   if (trans.isActive()) {
    trans.rollback();
   }
   throw e;
  } finally {
   em.close();
  }
 }

 /**
  * Retorna a lista de itens salvo no banco de dados de acordo com a Entidade passada como parâmetro.
  * @param classe : Entidade que deverá buscar no banco de dados.
  * @return List contendo todos os objetos encontrados da entidade passada como parâmetro.
  */
 @SuppressWarnings(&quot;unchecked&quot;)
 public static List findAll(Class classe) {
  Session em = HibernateSessionFactory.getSession();
  Query query = em.createQuery(&quot;Select a from &quot; + classe.getName() + &quot; a&quot;);
  return query.list();
 }

 /**
  * Faz a busca no banco pelo ID da entidade
  * @param classe : Entidade a ser buscada
  * @param id : valor a ser procurado
  * @return Objeto encontrado no banco, caso não encontre será retornado NULL
  * @throws Exception
  */
 @SuppressWarnings(&quot;unchecked&quot;)
 public static Object findById(Class classe, Object id) throws Exception {
  if (classe == null) {
   throw new Exception(&quot;classe não pode ser nula.&quot;);
  }

  if (id == null) {
   throw new Exception(&quot;id não pode ser nulo.&quot;);
  }

  Field[] fields = classe.getDeclaredFields();
  String chave = &quot;&quot;;
  for (Field field : fields) {
   if (field.getAnnotation(Id.class) != null) {
    chave = field.getName();
    break;
   }
  }

  if (chave.equals(&quot;&quot;)) {
   throw new Exception(&quot;Annotation @Id não encontrada na classe &quot; + classe.getName());
  }

  Session em = HibernateSessionFactory.getSession();
  Query query = em.createQuery(&quot;Select a from &quot; + classe.getName() + &quot; a&quot; +
          &quot; where a.&quot; + chave + &quot; = :id&quot;).setParameter(&quot;id&quot;, id);
  query.setMaxResults(1);
  return query.uniqueResult();
 }

 /**
  * Retorna objeto de acordo com a UniqueConstraint definida na Entidade
  * @param classe : Entidade a ser buscada
  * @param ids : Array contendo os IDS a serem buscados (na mesma ordem em que a UniqueConstraint foi definido)
  * @return Objeto encontrado no banco, caso não encontre será retornado NULL 
  * @throws Exception
  */
 @SuppressWarnings(&quot;unchecked&quot;)
 public static Object findByUniqueConstraints(Class classe, ArrayList&amp;lt;Object&amp;gt; ids) throws Exception {
  if (classe == null) {
   throw new Exception(&quot;classe não pode ser nula.&quot;);
  }

  if (ids == null || ids.size() == 0) {
   throw new Exception(&quot;ids não pode ser nulo.&quot;);
  }

  ArrayList&amp;lt;String&amp;gt; chaves = new ArrayList&amp;lt;String&amp;gt;();
  ArrayList&amp;lt;Class&amp;gt; tipos = new ArrayList&amp;lt;Class&amp;gt;();
  Annotation annotation = classe.getAnnotation(Table.class);
  if (annotation != null) {
   Table table = (Table) annotation;

   for (UniqueConstraint uniqueConstraint : table.uniqueConstraints()) {
    for (String column : uniqueConstraint.columnNames()) {
     tipos.add(classe.getDeclaredField(column).getType());
     chaves.add(column);
    }
   }
  } else {
   throw new Exception(&quot;Annotation @Table não encontrada na classe &quot; + classe.getName());
  }

  if (chaves.size() == 0) {
   throw new Exception(&quot;UniqueConstraints não encontrada na annotation @Table da classe &quot; + classe.getName());
  }

  if (chaves.size() != ids.size()) {
   throw new Exception(&quot;O número de parâmetros passados não confere com o número de UniqueConstraints encontrados na classe &quot; + classe.getName() + &quot;. &quot; + ids.size() + &quot; foram passados, mas &quot; + chaves.size() + &quot; eram esparados.&quot;);
  }

  String str = &quot;&quot;;
  for (int i = 0; i &amp;lt; chaves.size(); i++) {
   if (!ids.get(i).getClass().equals(tipos.get(i))) {
    throw new Exception(&quot;Tipos de dados incompatíveis. O parâmetro número &quot; + i + &quot; é incompatível, foi passado:&quot; + ids.get(i).getClass().toString() + &quot; e estava esperando: &quot; + tipos.get(i).toString());
   }
   if (str.length() == 0) {
    str = &quot; where a.&quot; + chaves.get(i) + &quot; = &quot; + ids.get(i);
   } else {
    str += &quot; and &quot; + chaves.get(i) + &quot; = &quot; + ids.get(i);
   }
  }

  Session em = HibernateSessionFactory.getSession();
  Query query = em.createQuery(&quot;Select a from &quot; + classe.getName() + &quot; a &quot; + str);
  query.setMaxResults(1);
  return query.uniqueResult();
 }
}

&lt;/pre&gt;&lt;br /&gt;
Aqui esta meu DAO com uma validação:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;BancosDAO.java&lt;/i&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: java;&quot;&gt;package com.blogspot.desenvolvendoemflex.dao;

import com.blogspot.desenvolvendoemflex.entity.Bancos;
import com.blogspot.desenvolvendoemflex.util.GenericDAO;

public class BancosDAO extends GenericDAO {
 public Object saveOrUpdate(Bancos o) throws Exception {
  //TODO: aqui é possivel fazer algumas validações
  if (o.getDescricao() == null || o.getDescricao().equals(&quot;&quot;)) {
   throw new Exception(&quot;Descrição é obrigatório.&quot;);
  }
  //TODO: chamo a classe genérica passando por parâmetro minha Entidade &quot;Banco&quot;.
  return super.saveOrUpdate(o);
 }
}
&lt;/pre&gt;&lt;br /&gt;
A Entidade, contendo as &lt;b&gt;&lt;a href=&quot;http://docs.jboss.org/hibernate/annotations/3.5/reference/en/html/&quot;&gt;Annotations&lt;/a&gt;&lt;/b&gt; @Entity e @Table (com @UniqueConstraint para teste do &lt;b&gt;findByUniqueConstraints&lt;/b&gt;)&lt;br /&gt;
&lt;i&gt;Bancos.java&lt;/i&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: java;&quot;&gt;
package com.blogspot.desenvolvendoemflex.entity;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

@Entity
/*TODO: uniqueConstraints usado para exemplo do FIND, neste caso ele não era necessário*/
@Table(uniqueConstraints = { @UniqueConstraint(columnNames = &quot;cod&quot;) })
public class Bancos {

 @Id
 private Integer cod;

 private String descricao;

 public Integer getCod() {
  return cod;
 }

 public void setCod(Integer cod) {
  this.cod = cod;
 }

 public String getDescricao() {
  return descricao;
 }

 public void setDescricao(String descricao) {
  this.descricao = descricao;
 }

}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Para testar, basta chamar o DAO de qualquer lugar, passando os parâmetros necessários em qualquer um dos métodos do &lt;b&gt;GenericDao&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Exemplo de utilização:&lt;br /&gt;
&lt;pre class=&quot;brush: java;&quot;&gt;  BancosDAO bancosDAO = new BancosDAO();
  Bancos bancos = new Bancos();
  bancos.setCod(1);
  bancos.setDescricao(&amp;quot;Banco 1&amp;quot;);

  bancosDAO.saveOrUpdate(bancos);

  bancos.setCod(2);
  bancos.setDescricao(&amp;quot;Banco 2&amp;quot;);
  bancosDAO.saveOrUpdate(bancos);

  ArrayList&amp;lt;Bancos&amp;gt; allBancos = (ArrayList&amp;lt;Bancos&amp;gt;) BancosDAO.findAll(Bancos.class);

  for (Bancos banco : allBancos) {
   System.out.println(banco.getDescricao());
  }

  bancosDAO.remove(BancosDAO.findById(Bancos.class, 2));

  BancosDAO.findAll(Bancos.class);
  
  /*TODO: Passando um array contendo a UniqueConstraint para pesquisa no banco */
  ArrayList&amp;lt;Object&amp;gt; ids = new ArrayList&amp;lt;Object&amp;gt;();
  ids.add(1);
  BancosDAO.findByUniqueConstraints(Bancos.class, ids);
  
  /*TODO: tratando o erro, Descrição é obrigatório */
  bancos.setCod(2);
  bancos.setDescricao(&amp;quot;&amp;quot;);
  bancosDAO.saveOrUpdate(bancos);
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Espero que tenha ajudado.&lt;br /&gt;
&lt;br /&gt;
Obrigado.&lt;br /&gt;
&lt;br /&gt;
Deixe um comentário.</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/632620376282080349/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/06/java-jpa-hibernate-dao-generico.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/632620376282080349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/632620376282080349'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/06/java-jpa-hibernate-dao-generico.html' title='Java + JPA + Hibernate + DAO Genérico'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Joinville - SC, Brasil</georss:featurename><georss:point>-26.273499 -48.832824899999991</georss:point><georss:box>-26.461115 -49.058916399999994 -26.085883000000003 -48.606733399999989</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-7780916189513471289</id><published>2011-05-28T17:42:00.000-03:00</published><updated>2011-05-28T17:42:16.141-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="adobe flex"/><category scheme="http://www.blogger.com/atom/ns#" term="component"/><category scheme="http://www.blogger.com/atom/ns#" term="TextArea"/><title type='text'>TextArea com atalho para Desfazer e Refazer</title><content type='html'>Por padrão o componente &lt;b&gt;TextArea&lt;/b&gt; do Flex não possui função de &lt;b&gt;desfazer &lt;/b&gt;e &lt;b&gt;refazer&lt;/b&gt;, com isso resolvi implementar estas duas funções.&lt;br /&gt;
&lt;br /&gt;
Para testar é só digitar um texto, e pressionar Ctrl+Z para desfazer e Ctrl+Y para refazer.&lt;br /&gt;
&lt;iframe height=&quot;250&quot; src=&quot;http://www.pontosistemas.com.br/samuel/TextAreaUndo/Tests.html&quot; width=&quot;100%&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
*download do fonte: botão direito &quot;View Source&quot;&lt;br /&gt;
&lt;br /&gt;
Código Fonte:&lt;br /&gt;
&lt;pre class=&quot;brush: java;&quot;&gt;/*############################################################*/
/*                                                            */
/*   Powered by: Samuel Facchinello                           */
/*   http://desenvolvendoemflex.blogspot.com/                 */
/*                                                            */
/*############################################################*/
package com.blogspot.desenvolvendoemflex.utils {
    import flash.events.Event;
    import flash.events.KeyboardEvent;
    
    import mx.collections.ArrayCollection;
    import mx.controls.Alert;
    import mx.controls.TextArea;
    
    /**
     *
     * @author SAMUEL FACCHINELLO
     * @site http://desenvolvendoemflex.blogspot.com/
     */
    public class TextAreaWithUndo extends TextArea {
        
        /**
         * Variable of control position Undo or Redo
         * */
        [Bindable]
        private var _position:int = -1;
        
        public function get position():int {
            return _position;
        }
        
        /**
         * Variable that stores all typed letters
         * */
        [Bindable]
        private var _array:ArrayCollection = new ArrayCollection();
        
        public function get array():ArrayCollection {
            return _array;
        }
        
        /**
         * Constructor
         *
         */
        public function TextAreaWithUndo() {
            super();
            //add value default
            addValue(&quot;&quot;);
            
            //add Event on KeyDown
            addEventListener(KeyboardEvent.KEY_DOWN, myKeyDown);
        }
        
        /**
         * Function with KeyDown
         * @param eventObj: KeyboardEvent
         *
         */
        private function myKeyDown(eventObj:KeyboardEvent):void {
            // Was Ctrl key pressed?
            if (eventObj.ctrlKey) {
                var valueReturn:String = null;
                
                switch (eventObj.keyCode) {
                    
                    case 90: // Was Ctrl-Z pressed?  
                        valueReturn = returnPrevisionValue();
                        break;
                    
                    case 89: // Was Ctrl-Y pressed?  
                        valueReturn = returnNextValue();
                        break;
                    
                    default:
                        break;
                }
                
                //if return exist
                if (valueReturn!=null) {
                    //set text with return functions
                    text = valueReturn;
                    
                    //select last _position in TextArea
                    setSelection(text.length, text.length);
                }
            } else {
                //only adds to the list if any of these characters.
                //list from here: http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00000520.html
                if ((eventObj.keyCode&amp;gt;=65&amp;amp;&amp;amp;eventObj.keyCode&amp;lt;=90)||(eventObj.keyCode&amp;gt;=48&amp;amp;&amp;amp;eventObj.keyCode&amp;lt;=57)||(eventObj.keyCode&amp;gt;=96&amp;amp;&amp;amp;eventObj.keyCode&amp;lt;=111)||(eventObj.keyCode&amp;gt;=186&amp;amp;&amp;amp;eventObj.keyCode&amp;lt;=222)) {
                    addValue(text);
                }
            }
        }
        
        /**
         * Function that adds the letters in the array
         * @param value: propertie &quot;text&quot; of TextArea
         *
         */
        private function addValue(value:String):void {
            //it was press Ctrl + Z ever, and was entered some value, clears the values ​​of the position in which this forward
            if (_array.length&amp;gt;0&amp;amp;&amp;amp;_array.length-1&amp;gt;_position) {
                for (var i:int = _array.length-1; i&amp;gt;_position; i--) {
                    _array.removeItemAt(i);
                }
            }
            
            //if the value is being added is equal to the last added, not added!
            if (_array.length&amp;gt;0) {
                if (value==_array.getItemAt(_array.length-1)) {
                    return;
                }
            }
            
            _array.addItem(value);
            _position++;
        }
        
        /**
         * triggered when press Ctrl + Y
         * @return : Returns the next value from the list according to position
         *
         */
        private function returnNextValue():String {
            if (_position+1&amp;gt;=0&amp;amp;&amp;amp;_position+1&amp;lt;_array.length) {
                _position++;
                return _array.getItemAt(_position) as String;
            }
            
            return null;
        }
        
        /**
         * triggered when press Ctrl + Z
         * @return : Returns the Prevision value from the list according to position
         *
         */
        private function returnPrevisionValue():String {
            if (_position-1&amp;gt;=0) {
                _position--;
                return _array.getItemAt(_position) as String;
            }
            
            return null;
        }
    }
}
&lt;/pre&gt;&lt;br /&gt;
Adicionei este componente ao Google Code, pode ser visto aqui: &lt;a href=&quot;http://code.google.com/p/textarea-with-undo/&quot;&gt;http://code.google.com/p/textarea-with-undo/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Qualquer elogio, dúvida, sugestão ou melhoria para o componente, deixe um comentário!!&lt;br /&gt;
&lt;br /&gt;
Abraço, até a próxima.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Tradução para o inglês com o Google Translate. :)</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/7780916189513471289/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/05/textarea-com-atalho-para-desfazer-e.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/7780916189513471289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/7780916189513471289'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/05/textarea-com-atalho-para-desfazer-e.html' title='TextArea com atalho para Desfazer e Refazer'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-802611051580275223</id><published>2011-05-25T16:16:00.005-03:00</published><updated>2011-05-27T21:56:55.214-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="adobe flex"/><category scheme="http://www.blogger.com/atom/ns#" term="css"/><category scheme="http://www.blogger.com/atom/ns#" term="style"/><title type='text'>Carregando CSS diferentes em runtime</title><content type='html'>&lt;div&gt;Muitas vezes precisamos que uma mesma aplicação fique com&amp;nbsp;aparências&amp;nbsp;diferentes de acordo com o gosto de cada um, por isso&amp;nbsp;vou mostrar como carregar um ou vários &lt;b&gt;CSS&lt;/b&gt; em &lt;b&gt;runtime &lt;/b&gt;no Flex.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Procurando na internet sobre isso, me deparei com o blog do Fabio Silva dizendo como fazer, então resolvi implementar e mostrar para vocês como fazer.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;Como faz?&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;O &lt;b&gt;css&lt;/b&gt;&amp;nbsp;deve ser &lt;b&gt;compilado&lt;/b&gt;, (no FlashBuilder) basta clicar com o botão direito do mouse no arquivo do CSS e marcar a opção &quot;Compile CSS to SWF&quot;, com isso o CSS será compilado como um arquivo externo, no formato &quot;.swf&quot;, ao rodar sua aplicação&amp;nbsp;basta usar a função:&lt;/div&gt;&lt;div&gt;&lt;b&gt;StyleManager.loadStyleDeclarations(&quot;./css/css.swf&quot;);&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Exemplo:&lt;/div&gt;&lt;iframe height=&quot;250&quot; src=&quot;http://www.pontosistemas.com.br/samuel/CssDinamico/CssExterno.html&quot; width=&quot;100%&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;div&gt;&lt;b&gt;Para fazer o download do fonte clique com o botão direito e depois em &quot;view source&quot;.&lt;/b&gt;&lt;br /&gt;
ou&lt;br /&gt;
&lt;br /&gt;
Código Fonte:&lt;br /&gt;
&lt;pre class=&quot;brush: xml;&quot;&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;
&amp;lt;s:Application minHeight=&amp;quot;600&amp;quot;
               minWidth=&amp;quot;955&amp;quot;
               viewSourceURL=&amp;quot;srcview/index.html&amp;quot;
               xmlns:fx=&amp;quot;http://ns.adobe.com/mxml/2009&amp;quot;
               xmlns:mx=&amp;quot;library://ns.adobe.com/flex/mx&amp;quot;
               xmlns:s=&amp;quot;library://ns.adobe.com/flex/spark&amp;quot;&amp;gt;
    &amp;lt;s:layout&amp;gt;
        &amp;lt;s:VerticalLayout/&amp;gt;
    &amp;lt;/s:layout&amp;gt;

    &amp;lt;fx:Script&amp;gt;
        &amp;lt;![CDATA[
            protected function button1_clickHandler(event:MouseEvent):void {
                //função que carrega o CSS
                StyleManager.loadStyleDeclarations(&amp;quot;./css/css.swf&amp;quot;);
            }
            
            protected function button2_clickHandler(event:MouseEvent):void {
                //função que carrega o CSS
                StyleManager.loadStyleDeclarations(&amp;quot;./css/css2.swf&amp;quot;);
            }
        ]]&amp;gt;
    &amp;lt;/fx:Script&amp;gt;

    &amp;lt;s:Label text=&amp;quot;Label Spark&amp;quot;/&amp;gt;

    &amp;lt;mx:Label text=&amp;quot;Label MX&amp;quot;/&amp;gt;

    &amp;lt;s:Button label=&amp;quot;carregar CSS 1&amp;quot;
              click=&amp;quot;button1_clickHandler(event)&amp;quot;/&amp;gt;

    &amp;lt;mx:Button label=&amp;quot;carregar CSS 2&amp;quot;
               click=&amp;quot;button2_clickHandler(event)&amp;quot;/&amp;gt;
&amp;lt;/s:Application&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
Por hoje é isso!!!&lt;br /&gt;
&lt;br /&gt;
Sigam o blog e comentem!!&lt;br /&gt;
&lt;br /&gt;
Fontes:&lt;br /&gt;
&lt;a href=&quot;http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/styles/StyleManager.html&quot;&gt;http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/styles/StyleManager.html&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://fabiophx.blogspot.com/2010/09/carregando-css-em-run-time.html&quot;&gt;http://fabiophx.blogspot.com/2010/09/carregando-css-em-run-time.html&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/802611051580275223/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/05/carregando-css-diferentes-em-runtime.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/802611051580275223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/802611051580275223'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/05/carregando-css-diferentes-em-runtime.html' title='Carregando CSS diferentes em runtime'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-3170497176122768248</id><published>2011-05-20T19:27:00.005-03:00</published><updated>2011-05-27T22:05:43.947-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="adobe flex"/><category scheme="http://www.blogger.com/atom/ns#" term="AdvancedDataGrid"/><category scheme="http://www.blogger.com/atom/ns#" term="código fonte"/><category scheme="http://www.blogger.com/atom/ns#" term="DataGrid"/><category scheme="http://www.blogger.com/atom/ns#" term="position columns"/><category scheme="http://www.blogger.com/atom/ns#" term="save"/><category scheme="http://www.blogger.com/atom/ns#" term="width"/><title type='text'>Salvar tamanho e posição das colunas em um DataGrid</title><content type='html'>Hoje surgiu um problema aqui na &lt;a href=&quot;http://twitter.com/PontoSistemas&quot;&gt;@PontoSistemas&lt;/a&gt;, onde teríamos que salvar a posição e o tamanho da coluna de acordo com o que o cliente preferir, como cada pessoa organiza a tela de um jeito diferente. Tudo isso porque toda vez que o DataGrid é construído novamente, ele volta ao estado inicial.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;A idéia:&lt;/b&gt;&lt;br /&gt;
Ao organizar ou alterar os tamanhos das colunas de um DataGrid/AdvancedDataGrid salve as posições e os tamanhos das colunas.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;A solução:&lt;/b&gt;&lt;br /&gt;
Altere o tamanho e/ou a ordem das colunas, e recarregue a página. Elas irão voltar na mesma ordem e tamanho que você as deixou.&lt;br /&gt;
&lt;br /&gt;
&lt;iframe height=&quot;160&quot; quality=&quot;high&quot; src=&quot;http://www.pontosistemas.com.br/samuel/SalvarColunas/SalvarColunas.html&quot; width=&quot;100%&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
Clique com o botão direito em cima do DataGrid, depois em &quot;view source&quot; para visualizar o código fonte.&lt;br /&gt;
ou&lt;br /&gt;
&lt;br /&gt;
SalvarColunas.mxml&lt;br /&gt;
&lt;pre class=&quot;brush: xml;&quot;&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;
&amp;lt;s:Application viewSourceURL=&amp;quot;srcview/index.html&amp;quot;
               xmlns:fx=&amp;quot;http://ns.adobe.com/mxml/2009&amp;quot;
               xmlns:mx=&amp;quot;library://ns.adobe.com/flex/mx&amp;quot;
               xmlns:s=&amp;quot;library://ns.adobe.com/flex/spark&amp;quot;&amp;gt;
    &amp;lt;fx:Script&amp;gt;
        &amp;lt;![CDATA[
            import mx.collections.ArrayCollection;
            import mx.controls.Alert;
            import mx.controls.DataGrid;
            import mx.events.FlexEvent;
            import mx.utils.ObjectUtil;
            
            /* salvar ordem das colunas */
            public function reordenarColunas(event:Event, nomeSharedObj:String):void {
                var grid:* = event.currentTarget;
                
                if (grid is DataGrid||grid is AdvancedDataGrid) {
                    var colunas:ArrayCollection = null;
                    
                    //le informações salvas
                    var shared:SharedObjectHelper = new SharedObjectHelper(nomeSharedObj);
                    
                    if (shared.getObjects()) {
                        if (shared.getObjects().length&amp;gt;0) {
                            if (shared.getObjects()!=null) {
                                colunas = shared.getObjects();
                            }
                        }
                    }
                    
                    if (colunas==null) { //se nao tiver nada salvo, salva, e nao faz nada.
                        salvarOrdemColunas(event, nomeSharedObj);
                        return;
                    }
                    var colunasAtual:Array = grid.columns.slice(0, grid.columns.length); //pega as colunas atual
                    
                    if (colunasAtual.length!=colunas.length) { //se sao colunas diferentes salva as novas.
                        salvarOrdemColunas(event, nomeSharedObj);
                        return;
                    }
                    
                    var colunasNovo:Array = new Array();
                    var i:int = 0;
                    
                    while (colunas.length&amp;gt;0) { //enquanto tiver colunas a serem alteradas
                        if (colunasAtual[i]!=null) { //se ja foi alterado a coluna é setado como nula.
                            if (colunasAtual[i].dataField.toString()==colunas.getItemAt(0).datafield.toString()) { //verifica se a atual é igual a coluna a ordenada
                                colunasAtual[i].width = colunas.getItemAt(0).width; //seta o tamanho da coluna
                                colunasNovo.push(colunasAtual[i]); //adiciona a coluna na ultima possição (para deixar na ordem)
                                
                                //remove o que ja foi verificado
                                colunas.removeItemAt(0);
                                colunasAtual[i] = null;
                                
                                i = -1; //zera o contador para reavaliar todas as colunas
                            }
                        }
                        i++;
                    }
                    
                    grid.horizontalScrollPolicy = &amp;quot;on&amp;quot;; //atribui o Scroll horizontal por causa dos Widths setados na mao
                    grid.columns = colunasNovo; //seta as novas colunas no grid
                    grid.validateProperties(); //atualiza o grid para aparecer as novas colunas
                }
            }
            
            public function salvarOrdemColunas(event:Event, nomeSharedObj:String):void {
                var grid:* = event.currentTarget;
                
                if (grid is DataGrid||grid is AdvancedDataGrid) {
                    
                    var shared:SharedObjectHelper = new SharedObjectHelper(nomeSharedObj);
                    shared.clear();
                    
                    var obj:Object = null;
                    
                    for each (var i:Object in grid.columns) {
                        obj = new Object();
                        obj.datafield = i.dataField;
                        obj.width = i.width;
                        shared.addObject(obj);
                    }
                }
            }
        ]]&amp;gt;
    &amp;lt;/fx:Script&amp;gt;

    &amp;lt;!--
        columnStretch = ao redimencionar as colunas.
        headerShift = ao trocar as colunas de posição.
    --&amp;gt;
    &amp;lt;mx:AdvancedDataGrid columnStretch=&amp;quot;salvarOrdemColunas(event,&amp;#39;nomeDoObjetoSalvo&amp;#39;)&amp;quot;
                         creationComplete=&amp;quot;reordenarColunas(event,&amp;#39;nomeDoObjetoSalvo&amp;#39;)&amp;quot;
                         headerShift=&amp;quot;salvarOrdemColunas(event,&amp;#39;nomeDoObjetoSalvo&amp;#39;)&amp;quot;&amp;gt;
        &amp;lt;mx:columns&amp;gt;
            &amp;lt;mx:AdvancedDataGridColumn dataField=&amp;quot;a&amp;quot;/&amp;gt;

            &amp;lt;mx:AdvancedDataGridColumn dataField=&amp;quot;b&amp;quot;/&amp;gt;

            &amp;lt;mx:AdvancedDataGridColumn dataField=&amp;quot;c&amp;quot;/&amp;gt;

            &amp;lt;mx:AdvancedDataGridColumn dataField=&amp;quot;d&amp;quot;/&amp;gt;

            &amp;lt;mx:AdvancedDataGridColumn dataField=&amp;quot;e&amp;quot;/&amp;gt;
        &amp;lt;/mx:columns&amp;gt;
    &amp;lt;/mx:AdvancedDataGrid&amp;gt;
&amp;lt;/s:Application&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
SharedObjectHelper.as&lt;br /&gt;
&lt;pre class=&quot;brush: java;&quot;&gt;package {
    import flash.net.SharedObject;
    
    import mx.collections.ArrayCollection;
    
    public class SharedObjectHelper {
        private var _sharedObject:SharedObject;
        
        private var _dadosSharedObject:ArrayCollection;
        
        private var _nomeArquivoSharedObject:String;
        
        /**
         * Construtor
         */
        public function SharedObjectHelper(valor:String) {
            inicializaHelper(valor);
        }
        
        /**
         * Limpa objeto dentro do SharedObject
         */
        public function clear():void {
            _dadosSharedObject.removeAll();
            _sharedObject.flush();
        }
        
        /**
         * @private
         * Responsavel por recuperar a instancia do SharedObject baseado no
         * parametro.
         *
         */
        private function inicializaHelper(valor:String):void {
            _dadosSharedObject = new ArrayCollection();
            _nomeArquivoSharedObject = valor;
            _sharedObject = SharedObject.getLocal(_nomeArquivoSharedObject);
            
            if (getObjects()) {
                _dadosSharedObject = getObjects();
            }
        }
        
        /**
         * Retorna todos um array de dados que está armazendo no SharedObject
         * @return ArrayCollection
         */
        public function getObjects():ArrayCollection {
            return _sharedObject.data[_nomeArquivoSharedObject];
        }
        
        /**
         * Adiciona um dado ao array de dados.
         * @param Object
         */
        public function addObject(o:Object):void {
            _dadosSharedObject.addItem(o);
            updateSharedObjects();
        }
        
        /**
         * @private
         * Vincula o array de dados a um SharedObject.
         */
        private function updateSharedObjects():void {
            _sharedObject.data[_nomeArquivoSharedObject] = _dadosSharedObject;
            _sharedObject.flush();
        }
    }
}
&lt;/pre&gt;&lt;br /&gt;
Da maneira que foi implementado, as definições da posição e do tamanho das colunas são salvas na memória do FlashPlayer (como se fosse os cookies das páginas web), ao limpar esse &quot;cookie&quot; as configurações voltam ao estado original.&lt;br /&gt;
&lt;br /&gt;
Por hoje é isso. Em breve novas dicas.&lt;br /&gt;
&lt;br /&gt;
Comentem!!!</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/3170497176122768248/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/05/salvar-tamanho-e-posicao-das-colunas-em.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/3170497176122768248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/3170497176122768248'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/05/salvar-tamanho-e-posicao-das-colunas-em.html' title='Salvar tamanho e posição das colunas em um DataGrid'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-7373397451743060957</id><published>2011-05-20T07:48:00.000-03:00</published><updated>2011-05-20T07:48:42.327-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="action script"/><category scheme="http://www.blogger.com/atom/ns#" term="adobe flex"/><category scheme="http://www.blogger.com/atom/ns#" term="data bind"/><category scheme="http://www.blogger.com/atom/ns#" term="flash builder"/><category scheme="http://www.blogger.com/atom/ns#" term="flex 4"/><category scheme="http://www.blogger.com/atom/ns#" term="framework"/><category scheme="http://www.blogger.com/atom/ns#" term="item renderer"/><category scheme="http://www.blogger.com/atom/ns#" term="mxml"/><title type='text'>10 coisas que um bom programador flex deve saber</title><content type='html'>Olá!!! Li no blog do Daniel Schmitz e achei muito interessante compartilhar.&lt;br /&gt;
&lt;br /&gt;
Vale a pena ler.&lt;br /&gt;
&lt;br /&gt;
Link: &lt;a href=&quot;http://www.flex.etc.br/traducoes/10-coisas-que-um-bom-programador-flex-deve-saber/&quot;&gt;http://www.flex.etc.br/traducoes/10-coisas-que-um-bom-programador-flex-deve-saber/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Até a próxima.</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/7373397451743060957/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/05/10-coisas-que-um-bom-programador-flex.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/7373397451743060957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/7373397451743060957'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/05/10-coisas-que-um-bom-programador-flex.html' title='10 coisas que um bom programador flex deve saber'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-6378544364040612029</id><published>2011-04-29T09:56:00.001-03:00</published><updated>2011-04-29T09:56:59.155-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="precojusto"/><title type='text'>(off) PREÇO JUSTO</title><content type='html'>Olá povo, estou fazendo este OFF TOPIC para insentivar a campanha &lt;a href=&quot;http://search.twitter.com/search?q=%23precojusto&quot;&gt;#precojusto&lt;/a&gt; entre no site abaixo e assine este protesto. Vamos lutar por um Brasil melhor (ou pelo menos mais barato)!!!!&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;a href=&quot;http://www.precojustoja.com.br&quot;&gt;http://www.precojustoja.com.br&lt;/a&gt;&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/6378544364040612029/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/04/off-preco-justo.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/6378544364040612029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/6378544364040612029'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/04/off-preco-justo.html' title='(off) PREÇO JUSTO'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-189011744759194636</id><published>2011-04-14T18:01:00.001-03:00</published><updated>2011-05-21T09:22:24.608-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="erro"/><category scheme="http://www.blogger.com/atom/ns#" term="flash builder"/><category scheme="http://www.blogger.com/atom/ns#" term="flex 4"/><title type='text'>Unknown AMF type &#39;15&#39;</title><content type='html'>Olá pessoal, vai uma dica aí para não esquentar a cabeça qualquer dia.&lt;br /&gt;
&lt;br /&gt;
Se algum dia você ver este erro no FLEX: [faultDetail = null; faultString = &quot;Unknown AMF type &#39;15&#39;.&quot;; faultCode = &quot;Client.Message.Encoding&quot;] verifique os parâmetros passados do Flex para o Java pelo RemoteObject.&lt;br /&gt;
&lt;br /&gt;
Por hoje é só. qualquer dia desses eu posto mais alguma coisa!&lt;br /&gt;
&lt;br /&gt;
Até mais.</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/189011744759194636/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/04/unknown-amf-type-15.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/189011744759194636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/189011744759194636'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/04/unknown-amf-type-15.html' title='Unknown AMF type &#39;15&#39;'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-8366251461449374581</id><published>2011-04-05T10:19:00.000-03:00</published><updated>2011-04-05T10:19:13.498-03:00</updated><title type='text'>O que todo programador Flex deve saber</title><content type='html'>Olá!!&lt;br /&gt;
&lt;br /&gt;
Desculpa a demora de postar alguma coisa, mas estou meio sem tempo.&lt;br /&gt;
&lt;br /&gt;
Meu amigo &lt;a href=&quot;http://twitter.com/thiefzin&quot;&gt;@thiefzin&lt;/a&gt; me passou estes links muito interessantes, e resolvi compartilhar aqui no blog.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://imasters.com.br/artigo/15923/flex/o-que-todo-programador-flex-deve-saber-parte-01&quot;&gt;http://imasters.com.br/artigo/15923/flex/o-que-todo-programador-flex-deve-saber-parte-01&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://imasters.com.br/artigo/16202/flex/o-que-todo-programador-flex-deve-saber-parte-02&quot;&gt;http://imasters.com.br/artigo/16202/flex/o-que-todo-programador-flex-deve-saber-parte-02&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Ótima leitura a todos.</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/8366251461449374581/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/04/o-que-todo-programador-flex-deve-saber.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/8366251461449374581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/8366251461449374581'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/04/o-que-todo-programador-flex-deve-saber.html' title='O que todo programador Flex deve saber'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-596631848312251301</id><published>2011-01-19T13:31:00.001-02:00</published><updated>2011-01-19T15:00:07.356-02:00</updated><title type='text'>O Adobe Flex</title><content type='html'>Olá!!&lt;br /&gt;
&lt;br /&gt;
Bom, vamos começar do começo!!! Aqui vou explicar um pouco sobre o &lt;b&gt;Adobe Flex&lt;/b&gt; e suas maravilhas.&lt;br /&gt;
Començando...&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;O que é o Adobe FLEX??&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;É uma linguagem de programação baseada na plataforma Flash da Adobe (mas não se engane, o Flex não é para fazer animações com &quot;linha de tempo&quot;, &lt;b&gt;Adobe Flex&lt;/b&gt; é para fazer &lt;b&gt;Sistemas Web&lt;/b&gt;).&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Hoje, o flex não é uma ferramenta muito conhecida entre as empresas que  utilizam sistemas na web, mas isso já está mudando, graças a empresas  e/ou pessoas que estudam mais e mais para sempre inovar com seus  produtos e serviços.&lt;/div&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;O que o Flex tem de bom?&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&amp;nbsp;O Flex é famoso pela sua rica interface gráfica, pela sua facilidade de  aprendizado, também pela facilidade de comunicação com outras linguagens (JAVA, PHP, etc) seja por Xml, WebService, RemoteObject, etc. Ele tem efeitos e transições que deixam o usuário final maravilhado com a interface das aplicações desenvolvidas com essa ferramenta.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;Como começo??&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;É muito fácil de aprender a desenvolver em Flex, para começar você deve  fazer o download do Flash Builder (versão teste por 60 dias) &lt;a href=&quot;http://labs.adobe.com/technologies/flashbuilder_burrito/&quot;&gt;aqui&lt;/a&gt; (você  também pode solicitar uma licença estudante para não comerciais &lt;a href=&quot;http://www.adobe.com/devnet-archive/flex/free/&quot;&gt;aqui&lt;/a&gt;).&lt;br /&gt;
É só instalar e começar a se divertir. :D&lt;br /&gt;
*Para rodar as aplicações desenvolvidas em Flex, precisa de um navegador (&lt;a href=&quot;http://br.mozdev.org/download/&quot;&gt;firefox&lt;/a&gt;, &lt;a href=&quot;http://www.google.com/chrome/&quot;&gt;chrome&lt;/a&gt;, &lt;a href=&quot;http://www.microsoft.com/brasil/windows/internet-explorer/&quot;&gt;ie&lt;/a&gt;, &lt;a href=&quot;http://www.opera.com/download/&quot;&gt;opera&lt;/a&gt;, etc) e o plugin do &lt;a href=&quot;http://get.adobe.com/br/flashplayer/&quot;&gt;FlashPlayer&lt;/a&gt; instalado. &lt;br /&gt;
A própria Adobe disponibiliza um treinamento grátis (em inglês) das funções básicas do Flex, esses vídeos podem ser visto &lt;a href=&quot;http://www.adobe.com/devnet/flex/videotraining.html&quot;&gt;aqui&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;Exemplos de aplicações&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;A muitos exemplos espalhados pela internet, mas existe o Tour de Flex que pode ser instalado logo abaixo (versão em AIR) ou então clicar &lt;a href=&quot;http://www.adobe.com/devnet-apps/flex/tourdeflex/web/&quot;&gt;aqui&lt;/a&gt; e ver a versão online.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;iframe frameborder=&quot;0&quot; height=&quot;182&quot; scrolling=&quot;no&quot; src=&quot;http://tourdeflex.adobe.com/badge/&quot; width=&quot;216&quot;&gt;&amp;amp;amp;lt;p&amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;p&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;br&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;br&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;br&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;Con&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/p&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;lt;/p&amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;lt;/p&amp;amp;amp;gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;Conclusão&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;A principio é isso pessoal, em breve novos posts com dicas e tutoriais.&lt;br /&gt;
Qualquer dúvida é só entrar em contato.&lt;br /&gt;
&lt;br /&gt;
Abraço, Obrigado.</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/596631848312251301/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/01/o-adobe-flex.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/596631848312251301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/596631848312251301'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/01/o-adobe-flex.html' title='O Adobe Flex'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1397058413243630272.post-6245178636707829499</id><published>2011-01-18T16:33:00.000-02:00</published><updated>2011-01-18T17:15:24.948-02:00</updated><title type='text'>Início.</title><content type='html'>Olá, pessoas.&lt;br /&gt;&lt;br /&gt;Sou Samuel Facchinello, trabalho com AdobeFlex + Java + BlazeDs desde 2009, e vou começar a postar algumas dicas sobre essas &quot;linguagens&quot;.&lt;br /&gt;&lt;br /&gt;Espero que gostem, até a próxima.</content><link rel='replies' type='application/atom+xml' href='http://desenvolvendoemflex.blogspot.com/feeds/6245178636707829499/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/01/inicio.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/6245178636707829499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1397058413243630272/posts/default/6245178636707829499'/><link rel='alternate' type='text/html' href='http://desenvolvendoemflex.blogspot.com/2011/01/inicio.html' title='Início.'/><author><name>SamuelFac</name><uri>http://www.blogger.com/profile/01041381227931443321</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>