<?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-26865069529777083</id><updated>2024-08-29T17:37:36.693-03:00</updated><category term="ZK"/><category term="Fundamentos do ZK"/><title type='text'>ZK Brasil</title><subtitle type='html'>Blog destinado ao framework RIA ZK, Java e desenvolvimento de software.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://zkbrasil.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26865069529777083/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://zkbrasil.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Felipe Costa</name><uri>http://www.blogger.com/profile/14863756381227884693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBAuASd7cMpROTHT1C1SAxUIiEi2b84QsEVkKv6i5bEX66j8hW4X7jmUhSHBo3ZjgOh6j-K9h4LU4cwrhkiLJjkQpBAA6LaiRvGcoF5XeWfh-WAvo4wO4-UYSQiHdJeQ/s220/perfil2.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-26865069529777083.post-857376229852851729</id><published>2011-03-01T02:07:00.002-03:00</published><updated>2011-03-01T21:11:38.005-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ZK"/><title type='text'>ZK 5.0.6</title><content type='html'>&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;A nova versão do ZK já está disponível para download&amp;nbsp;&lt;a href=&quot;http://www.zkoss.org/release/rn-5.0.6.dsp&quot;&gt;aqui&lt;/a&gt;.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Como toda versão nova do ZK há sempre introdução de novas funcionalidades. Entre esses recursos novos estão:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;Geração de conteúdo customizado para SEO(Search Engine Optimization) onde agora é possível gerar um conteúdo específico que pode ser usado pelos indexadores de busca e transparentes ao usuários.&lt;/li&gt;
&lt;li&gt;Efeitos customizados quando mostrar oun esconder um widget atrávez de uma maneira simples sem uso de JavaScript.&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;Voce pode encontrar mais novidades&amp;nbsp;&lt;a href=&quot;http://books.zkoss.org/wiki/Small_Talks/2011/February/New_Features_of_ZK_5.0.6&quot;&gt;aqui&lt;/a&gt;.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zkbrasil.blogspot.com/feeds/857376229852851729/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://zkbrasil.blogspot.com/2011/03/zk-506.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26865069529777083/posts/default/857376229852851729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26865069529777083/posts/default/857376229852851729'/><link rel='alternate' type='text/html' href='http://zkbrasil.blogspot.com/2011/03/zk-506.html' title='ZK 5.0.6'/><author><name>Felipe Costa</name><uri>http://www.blogger.com/profile/14863756381227884693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBAuASd7cMpROTHT1C1SAxUIiEi2b84QsEVkKv6i5bEX66j8hW4X7jmUhSHBo3ZjgOh6j-K9h4LU4cwrhkiLJjkQpBAA6LaiRvGcoF5XeWfh-WAvo4wO4-UYSQiHdJeQ/s220/perfil2.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26865069529777083.post-5363937438627305229</id><published>2011-03-01T00:16:00.004-03:00</published><updated>2011-03-05T12:36:35.624-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Fundamentos do ZK"/><category scheme="http://www.blogger.com/atom/ns#" term="ZK"/><title type='text'>Construção de interfaces</title><content type='html'>Neste artigo vou continuar a falar sobre alguns fundamentais do ZK, como é feita a construção dos componentes, de que forma é possível fazê-lo e como anexar os componentes a uma página e será abordado também o conceito de Desktop e Page.&lt;br /&gt;
Mas antes gostaria de pautar alguns conceitos&amp;nbsp;importantes:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&amp;nbsp;JSON(&lt;a href=&quot;http://pt.wikipedia.org/wiki/JSON&quot;&gt;JavaScript Object Notation&lt;/a&gt;) - Um formato leve para intercâmbio de dados computacionais. Outro&amp;nbsp;&lt;a href=&quot;http://www.json.org/&quot;&gt;link&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;JSP(&lt;a href=&quot;http://pt.wikipedia.org/wiki/JavaServer_Pages&quot;&gt;Java&amp;nbsp;Server Pages&lt;/a&gt;) - Uma tecnologia similar ao ASP da Microsoft ou PHP utilizada para desenvolvimento de aplicações web baseada em Java. Outro&amp;nbsp;&lt;a href=&quot;http://www.oracle.com/technetwork/java/javaee/jsp/index.html&quot;&gt;link&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;Esse artigo foi baseado nos textos do site do ZK:&lt;br /&gt;
&lt;a href=&quot;http://books.zkoss.org/wiki/ZK_Essentials/Introduction_to_ZK/Component_Based_UI&quot;&gt;http://books.zkoss.org/wiki/ZK_Essentials/Introduction_to_ZK/Component_Based_UI &lt;/a&gt;&lt;a href=&quot;http://books.zkoss.org/wiki/ZK_Developer%27s_Reference/UI_Composing/Component-based_UI&quot;&gt;http://books.zkoss.org/wiki/ZK_Developer%27s_Reference/UI_Composing/Component-based_UI&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;&lt;b&gt;Visão Geral&lt;/b&gt;&lt;/h3&gt;Cada objeto de interface é representado como um componente (Component). Assim, compor componentes trata-se da montagem de componentes. Para alterar a interface basta modificar os estados e a relação dos componentes.&lt;br /&gt;
&lt;br /&gt;
Por exemplo, como mostrado abaixo, declaramos um componente Window, permitindo borda(border = &quot;normal&quot;) e definindo sua largura em 250 pixels. Foram adicionados 2 componentes Button à Window.&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;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD2WC9cWD8RZM9Hy18TiH9z17-3L7BTSgmPFgPN2Te8V6e0c0m9Iokj6f1td1Q7KMer9CC7BjWhPieAXZgpIJHpe5ZQGBh4DVg2F_HoFpmjQ_vxBbw3vAdL-iYtp3r3GiOw6Fg401u1g/s1600/ZKEssentials_Intro_Hello.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;173&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD2WC9cWD8RZM9Hy18TiH9z17-3L7BTSgmPFgPN2Te8V6e0c0m9Iokj6f1td1Q7KMer9CC7BjWhPieAXZgpIJHpe5ZQGBh4DVg2F_HoFpmjQ_vxBbw3vAdL-iYtp3r3GiOw6Fg401u1g/s400/ZKEssentials_Intro_Hello.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Os componentes são declarados usando ZUML, em um arquivo ZUL, os quais são analisados por um poderoso parser XML do ZK. Os componentes declarados são criados como POJO(Plain Old Java Objects) na JVM no servidor. Suponha que temos uma página ZUL que descreve uma árvore de componentes como o seguinte:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&lt;window border=&quot;normal&quot; title=&quot;ZKBrasil&quot; width=&quot;250px&quot;&gt;
    &amp;lt;button label=&quot;Hello&quot; /&amp;gt;
    &amp;lt;button label=&quot;Good-bye&quot; /&amp;gt;
&lt;/window&gt;
&lt;/pre&gt;&lt;br /&gt;
A página com base ZUL renderiza uma janela com dois botões, como mostrado na imagem abaixo: &lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqO3tLk9GywuFEjPijUgCH4eMGKPw-fKs-fP1yCXaxHe7Lu2t9Emvk5ApzIu8cAHfi_Myzi2nqKbl7jS7a_tjOkfqwuLCeOU-ByKYCChi7TI8AJ9jyT1QRtyn_v4Ob0Z7N-wtlkDRS3g/s1600/basiczul2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqO3tLk9GywuFEjPijUgCH4eMGKPw-fKs-fP1yCXaxHe7Lu2t9Emvk5ApzIu8cAHfi_Myzi2nqKbl7jS7a_tjOkfqwuLCeOU-ByKYCChi7TI8AJ9jyT1QRtyn_v4Ob0Z7N-wtlkDRS3g/s1600/basiczul2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;A marcação em ZUL é equivalente a seguinte declaração POJO em Java:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: java&quot;&gt;Window win = new Window();
    win.setTitle(&quot;ZKBrasil&quot;);
    win.setBorder(&quot;normal&quot;);
    win.setWidth(&quot;250px&quot;);
         
Button helloBtn = new Button();
    helloBtn.setLabel(&quot;Hello&quot;);
    helloBtn.setParent(win);
         
Button byeBtn = new Button();
    byeBtn.setLabel(&quot;Good-bye&quot;);
    byeBtn.setParent(win);
&lt;/pre&gt;&lt;br /&gt;
Os componentes no servidor são depois traduzidos para instruções (em JSON) necessárias para a criação de widget(objetos JavaScript) e enviado então para o cliente.&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;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUzrH4lxavqjUmkdVdho5N6v3d8DfpslD_ZWrFD9RV2JUOKU9eSolHRUIqsfSkCdSoRm-8-mmudRAO9Hup7ALjbvTuJ4qKs5g7dHupR8UmDRKwocnzVi_HWePIvvMo0cO4sAJOO7Vz1w/s1600/ZKEssentials_Intro_ZULtoPOJO.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;255&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUzrH4lxavqjUmkdVdho5N6v3d8DfpslD_ZWrFD9RV2JUOKU9eSolHRUIqsfSkCdSoRm-8-mmudRAO9Hup7ALjbvTuJ4qKs5g7dHupR8UmDRKwocnzVi_HWePIvvMo0cO4sAJOO7Vz1w/s400/ZKEssentials_Intro_ZULtoPOJO.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Como você pode notar, há duas maneiras de declarar um componente, através de XML ou Java puro:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;XML&lt;/li&gt;
Os componentes são declaradas em arquivos com a extensão &quot;.zul&quot;. Uma página ZUL é interpretada dinamicamente no servidor, podemos imaginar como um JSP capacitado com recursos Ajax. Por exemplo, aqui nós criamos um novo arquivo ajax.zul, e vamos implementar um pequeno exemplo de que a entrada do usuário no Textbox é refletido no label abaixo instantaneamente quando o Textbox perde o foco:  &lt;pre class=&quot;brush: xml&quot;&gt;&lt;window border=&quot;normal&quot; title=&quot;ZKBrasil&quot; width=&quot;250px&quot;&gt;    &lt;vlayout&gt;
    &amp;lt;textbox id=&quot;txtbx&quot; onChange=&quot;lbl.value = txtbx.value&quot;/&amp;gt;
    &amp;lt;label id=&quot;lbl&quot;/&amp;gt;
    &lt;/vlayout&gt;
&lt;/window&gt;
&lt;/pre&gt;A marcação declarada acima renderiza o simples programa abaixo: &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGsLv9J4RDqtxj4F39OM8oyRgBpeqITSZn-cVwmsIFwSPd43GY8Y2YAKMzBuF5NGYN5k6n_Ic9bqLUzSSgLmvs6winmr5gQ-KNPrlv1Kleku9sywPBhB-RX4J5yi2_Z9RTtuwTV7idlA/s1600/basiczul.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGsLv9J4RDqtxj4F39OM8oyRgBpeqITSZn-cVwmsIFwSPd43GY8Y2YAKMzBuF5NGYN5k6n_Ic9bqLUzSSgLmvs6winmr5gQ-KNPrlv1Kleku9sywPBhB-RX4J5yi2_Z9RTtuwTV7idlA/s1600/basiczul.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;li&gt;Java&lt;/li&gt;
Os componentes poderiam ser declarados totalmente em Java também:  &lt;pre class=&quot;brush: java&quot;&gt;package org.zkoss.zkdemo;
 
import org.zkoss.zk.ui.Page;
import org.zkoss.zk.ui.GenericRichlet;
import org.zkoss.zul.*;
 
public class TestRichlet extends GenericRichlet {
    //Richlet//
    public void service(Page page) {
        
        final Window win = new Window(&quot;ZKBrasil&quot;, &quot;normal&quot;, false);
        win.setWidth(&quot;250px&quot;);
 
        Vlayout vl = new Vlayout();
        vl.setParent(win);
        
        final Textbox txtbx = new Textbox();
        txtbx.setParent(vl);
        
        final Label lbl = new Label();
        lbl.setParent(vl);
        
        txtbx.addEventListener(&quot;onChange&quot;, new EventListener(){
           @Override
           public void onEvent(Event event) throws Exception {
               lbl.setValue(txtbx.getValue());
           }
       });
        
 
        win.setPage(page);
    }
}
&lt;/pre&gt;Mais informações sobre Richlets podem ser encontradas &lt;a href=&quot;http://books.zkoss.org/wiki/ZK_Developer%27s_Reference/UI_Composing/Richlet&quot;&gt;aqui&lt;/a&gt;. &lt;/ol&gt;Além disso, voce pode misturá-las se quiser.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;&lt;b&gt;Estruturação dos Componentes&lt;/b&gt;&lt;/h3&gt;&lt;br /&gt;
Como uma estrutura de árvore, um componente tem no máximo um pai, enquanto ele pode ter vários filhos.&lt;br /&gt;
Alguns componentes aceitam apenas tipos específicos de componentes como filhos, como por exemplo, o componente Grid aceita apenas os componentes Columns, Rows e Foot.&lt;br /&gt;
Outros não permitem nenhum tipo de componente, como por exemplo, o componente Textobox.&lt;br /&gt;
&lt;br /&gt;
Um componente sem nehum pai é chamado de componente raiz (&lt;b&gt;root componente&lt;/b&gt;). Múltiplos componentes raízes são permitidos em cada página, embora não seja comum.&lt;br /&gt;
&lt;br /&gt;
Note que, se voce estiver usando ZUML, há uma limitação imposta pelo próprio XML: Exatamente uma raiz no documento é permitida. Para especificar várias raízes, é necessário inserir os componentes utilizando tag zk como raiz a qual é uma tag especial que não cria componentes. Por exemplo:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&lt;zk&gt;
    &lt;window&gt; &amp;lt;!-- O primeiro componente raiz --&amp;gt;
    &amp;lt;div/&amp;gt; &amp;lt;!-- O segundo componente raiz --&amp;gt;
&lt;/window&gt;&lt;/zk&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;h4&gt;&lt;b&gt;Componentes Filhos&lt;/b&gt;&lt;/h4&gt;&lt;br /&gt;
A maioria das coleções retornado por um componente, como &lt;em&gt;Component.getChildren()&lt;/em&gt;, são de componentes &quot;vivos&quot;, ou seja, existe algum componente adicionado na página. Significa que voce pode adicionar um componente, remover um componente ou remover todos. Por exemplo, para retirar todas os filhos, voce pode fazê-lo através da seguinte declaração:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: java&quot;&gt;comp.getChildren().clear();
&lt;/pre&gt;&lt;br /&gt;
A qual é equivalente a:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: java&quot;&gt;for (Iterator it = comp.getChildren().iterator(); it.hasNext();) {
    it.next();
    it.remove();
&lt;/pre&gt;&lt;br /&gt;
No entanto, isso também significa que o seguinte código não irá funcionar, pois a exceção &lt;b&gt;ConcurrentModificationException&lt;/b&gt;será lançada.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: java&quot;&gt;for (Iterator it = comp.getChildren().iterator(); it.hasNext();)
    ((Component)it.next()).detach();
&lt;/pre&gt;&lt;br /&gt;
&lt;h4&gt;&lt;b&gt;Ordenação&lt;/b&gt;&lt;/h4&gt;&lt;br /&gt;
Um exemplo menos sutil: ordenação de componentes filhos. A seguinte declaração falha porque a lista contém todos os componentes &quot;vivos&quot; e um componente será retirado quando nós movermos ele para outro local.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: java&quot;&gt;Collections.sort(comp.getChildren());
&lt;/pre&gt;&lt;br /&gt;
Mais precisamente, um componente tem no máximo um pai e ele tem apenas um ponto na lista dos filhos. Isso significa que a lista é na verdade um conjunto (nenhum elemento duplicado é permitido). Por outro lado, &lt;em&gt;Collections.sort()&lt;/em&gt; não consegue tratar um conjunto corretamente. Assim, temos que copiar a lista para outra lista ou vetor, e ordená-la. &lt;em&gt;Components.sort(List, Comparator)&lt;/em&gt; é apenas uma maneira simples de reduzir o trabalho.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;&lt;b&gt;Desktop, Página e Componente&lt;/b&gt;&lt;/h3&gt;&lt;br /&gt;
Imagine que os componentes são atores em um jogo, então a página é a fase onde os componentes desempenham os seus papéis. Uma página (Page) é um suporte de espaço em uma janela do navegador, onde os componentes ZK podem ser anexados e desanexados. A página não é um componente, não implementa a interface Component, mas é uma coleção de componentes e apenas os componentes ligados a uma página estão disponíveis no cliente. Uma página é criada automaticamente quando usuário requisita um recurso como uma página ZUL.&lt;br /&gt;
&lt;br /&gt;
Um desktop (Desktop) é uma coleção de páginas. Ela representa a janela do navegador (ou um tab ou um frame do navegador). Você pode imaginar que um desktop representa uma requisição HTTP independente.&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;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6BP26IjWHSr54stIfEb09t3BdC29ES62y57Jw-QTpeoPfuGRKOrSSZHUx_BMhyphenhyphen02LfnX4aaKfLSpTMtSzQjMo0Y63RLNrK6pHkX1wAS3HS1Tq01HU1vNyRGCG8CbHKKqByAwGI4VttQ/s1600/ZKEssentials_Intro_MultiPage.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;236&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6BP26IjWHSr54stIfEb09t3BdC29ES62y57Jw-QTpeoPfuGRKOrSSZHUx_BMhyphenhyphen02LfnX4aaKfLSpTMtSzQjMo0Y63RLNrK6pHkX1wAS3HS1Tq01HU1vNyRGCG8CbHKKqByAwGI4VttQ/s400/ZKEssentials_Intro_MultiPage.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Um desktop é também o escopo lógico que uma aplicação pode acessar em uma requisição. Cada vez que uma requisição é enviada a partir do cliente, ela é associado ao desktop a que ele pertence. O pedido é passado para &lt;em&gt;DesktopCtrl.service(AuRequest, boolean)&lt;/em&gt; e, em seguida encaminhado para &lt;em&gt;ComponentCtrl.service(AuRequest, boolean)&lt;/em&gt;. Significa também que a aplicação não pode acessar componentes em vários desktops ao mesmo tempo.&lt;br /&gt;
&lt;br /&gt;
Um desktop e uma página são criados automaticamente quando o ZK Loader carrega uma página ZUML ou chama um richlet(&lt;em&gt;Richlet.service(Page)&lt;/em&gt;). A segunda página é criada quando o componente Include inclui outra página com o modo defer. Por exemplo, duas páginas serão criadas se o seguinte for visitado.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;!-- Página principal --&amp;gt;
&lt;window&gt;
  &amp;lt;include src=&quot;another.zul&quot; mode=&quot;defer&quot;/&amp;gt; &amp;lt;!-- Cria outra página --&amp;gt;
&lt;/window&gt;
&lt;/pre&gt;&lt;br /&gt;
Repare que se o modo não for especificado (ou seja, o modo instant), o incluide não irá criar uma nova página. Em vez disso, ele anexará todos os componentes criados por another.zul como seus componentes filhos próprios.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&lt;window&gt;
  &amp;lt;include src=&quot;another.zul&quot;/&amp;gt; &amp;lt;!-- default: mode instant --&amp;gt;
&lt;/window&gt;
&lt;/pre&gt;&lt;br /&gt;
É equivalente a seguinte declaração (exceto div não é um proprietário do espaço, veja abaixo)&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&lt;window&gt;
  &amp;lt;div&amp;gt;
    &amp;lt;zscript&amp;gt;
      execution.createComponents(&quot;another.zul&quot;, self, null);
    &amp;lt;/zscript&amp;gt;
  &amp;lt;/div&amp;gt;
&lt;/window&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;h3&gt;&lt;b&gt;Anexar um componente a uma página&lt;/b&gt;&lt;/h3&gt;&lt;br /&gt;
Um componente está disponível no cliente somente se ele está anexado a uma página. Por exemplo, a janela criada a seguir não estará disponível no cliente.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: java&quot;&gt;Window win = new Window();
win.appendChild(new Label(&quot;foo&quot;));
&lt;/pre&gt;&lt;br /&gt;
Um componente é um objeto POJO. Se você não tem qualquer referência a ele, ele vai ser reciclado quando a JVM iniciar o Garbage Collection.&lt;br /&gt;
&lt;br /&gt;
Há duas maneiras de anexar um componente de uma página:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Acrescentá-o como um filho de outro componente que já está conectado a uma página (&lt;em&gt;Component.appendChild(Componente)&lt;/em&gt;, &lt;em&gt;Component.insertBefore(Componente, Componente)&lt;/em&gt;, ou &lt;em&gt;Component.setParent(Componente)&lt;/em&gt;). &lt;/li&gt;
&lt;li&gt;Chamar &lt;em&gt;Component.setPage(Page)&lt;/em&gt; para anexá-lo a uma página diretamente. É também a maneira de fazer um componente se tornar um componente raiz.&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
Uma vez que um componente pode ter no máximo um pai e ser anexado no máximo a uma página, é desanexado automaticamente a partir do pai ou da página anterior quando ele é anexado a outro componente ou página. Por exemplo, b será um filho de &lt;em&gt;win2&lt;/em&gt; e &lt;em&gt;win1&lt;/em&gt; não terá nenhum filho no final.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: java&quot;&gt;Window win1 = new Window;
Button b = new Button();
win1.appendChild(b);
win2.appendChild(b); //implica desanexar b de win1
&lt;/pre&gt;&lt;br /&gt;
&lt;h3&gt;&lt;b&gt;Desanexar um componente a uma página&lt;/b&gt;&lt;/h3&gt;&lt;br /&gt;
Para desanexar da página, você poderia chamar &lt;em&gt;comp.setParent(null)&lt;/em&gt;, se não for um componente raiz, ou &lt;em&gt;comp.setPage(null)&lt;/em&gt;, se for um componente raiz. &lt;em&gt;Component.detach()&lt;/em&gt; é um atalho para desanexar um componente sem saber se ele é um componente raiz.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;&lt;b&gt;Invalidar um componente&lt;/b&gt;&lt;/h3&gt;&lt;br /&gt;
Quando um componente é anexado a uma página, o componente e todos os seus descendentes serão renderizados. Por outro lado, quando um estado de um componente anexado é alterado, apenas o estado alterado é enviado ao cliente para atualização (para melhor desempenho). Embora seja raro, você poderia chamar &lt;em&gt;Component.invalidate()&lt;/em&gt; para forçar o componente e seus descendentes a serem renderizados novamente(O ZK Update Engine irá enfileirar os comandos &lt;em&gt;update&lt;/em&gt; e &lt;em&gt;Invalidate&lt;/em&gt;, e otimizá-los antes de enviar de volta ao cliente para uma melhor performace).&lt;br /&gt;
&lt;br /&gt;
Existem apenas algumas razões para invalidar um componente:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Se você estiver adicionando vários componentes filhos, pelo menos mais de 20, o desempenho será melhor se você invalidar o componente pai. Embora o resultado da resposta Ajax possa ser grande, o navegador é mais eficiente em substituir uma árvore DOM do que a adicionar elementos DOM.&lt;/li&gt;
&lt;li&gt;Se um componente tem um bug que uma atualização não atualiza a árvore DOM corretamente, você pode invalidar o seu componente pai, que geralmente resolve o problema (Qualquer tipo de bug pode ser relatado no forum da comunidade. Se confirmado, ele será resolvido na próxima versão).&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;h3&gt;&lt;b&gt;Não guarde referências de componentes adicionados a uma Página em campos estáticos&lt;/b&gt;&lt;/h3&gt;&lt;br /&gt;
Como descrito acima, um desktop é um escopo lógico que a aplicação pode acessar ao atender a uma requisição. Em outras palavras, a aplicação não pode desanexar um componente de um desktop para outro desktop. Isso normalmente acontece quando é referenciado um componente acidentalmente.&lt;br /&gt;
&lt;br /&gt;
Por exemplo, o código a seguir lançará exceção se ele for carregado várias vezes:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&lt;window apply=&quot;foo.Foo&quot;&gt; &amp;lt;!--  Instancia e executa foo.Foo --&amp;gt;
&lt;/window&gt;&lt;/pre&gt;&lt;br /&gt;
e foo.Foo é definido a seguir:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: java&quot;&gt;package foo;
import org.zkoss.zk.ui.*;
import org.zkoss.zul.*;
 
public class Foo implements org.zkoss.zk.ui.util.Composer {
   private static Window main; //Errado! Não guarde em um campo estático
   public void doAfterCompose(Component comp) {
       if (main == null)
           main = new Window();
       comp.appendChild(main);
   }
}
&lt;/pre&gt;&lt;br /&gt;
A exceção é parecida com essa:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: java&quot;&gt;org.zkoss.zk.ui.UiException: The parent and child must be in the same desktop: &lt;window u1ep0=&quot;&quot;&gt;
    org.zkoss.zk.ui.AbstractComponent.checkParentChild(AbstractComponent.java:1057)
    org.zkoss.zk.ui.AbstractComponent.insertBefore(AbstractComponent.java:1074)
    org.zkoss.zul.Window.insertBefore(Window.java:833)
    org.zkoss.zk.ui.AbstractComponent.appendChild(AbstractComponent.java:1232)
    foo.Foo.doAfterCompose(Foo.java:10)
&lt;/window&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;h3&gt;&lt;b&gt;Clonando Componentes&lt;/b&gt;&lt;/h3&gt;&lt;br /&gt;
Todos os componentes são clonáveis (java.lang.Cloneable). É simples replicar componentes invocando &lt;em&gt;Component.clone()&lt;/em&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: java&quot;&gt;main.appendChild(listbox.clone());
&lt;/pre&gt;&lt;br /&gt;
Note:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;É um clone de profundidade. Ou seja, todos componentes filhos e descendentes são clonados, também.&lt;/li&gt;
&lt;li&gt;O componente retornado por &lt;em&gt;Component.clone()&lt;/em&gt; não pertence a nenhuma página e ele não tem um pai também. Você deve anexá-lo manualmente, se necessário.&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
O ID será preservado, se houver. Assim, você não pode anexar o componente retornado para o mesmo espaço de ID, sem modificar o ID, se houver.&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
Da mesma forma, todos os componentes são serializáveis (java.io.Serializable). Como a clonagem, todos os filhos e descendentes são serializados. Se você serializa um componente e, em seguida, deserializá-lo de volta, o resultado é o mesmo que chamar &lt;em&gt;Component.clone()&lt;/em&gt;(Mas a performace de executar &lt;em&gt;Component.clone()&lt;/em&gt; é muito maior).</content><link rel='replies' type='application/atom+xml' href='http://zkbrasil.blogspot.com/feeds/5363937438627305229/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://zkbrasil.blogspot.com/2011/03/construcao-de-interfaces.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26865069529777083/posts/default/5363937438627305229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26865069529777083/posts/default/5363937438627305229'/><link rel='alternate' type='text/html' href='http://zkbrasil.blogspot.com/2011/03/construcao-de-interfaces.html' title='Construção de interfaces'/><author><name>Felipe Costa</name><uri>http://www.blogger.com/profile/14863756381227884693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBAuASd7cMpROTHT1C1SAxUIiEi2b84QsEVkKv6i5bEX66j8hW4X7jmUhSHBo3ZjgOh6j-K9h4LU4cwrhkiLJjkQpBAA6LaiRvGcoF5XeWfh-WAvo4wO4-UYSQiHdJeQ/s220/perfil2.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD2WC9cWD8RZM9Hy18TiH9z17-3L7BTSgmPFgPN2Te8V6e0c0m9Iokj6f1td1Q7KMer9CC7BjWhPieAXZgpIJHpe5ZQGBh4DVg2F_HoFpmjQ_vxBbw3vAdL-iYtp3r3GiOw6Fg401u1g/s72-c/ZKEssentials_Intro_Hello.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26865069529777083.post-1418059795413301242</id><published>2010-12-04T11:11:00.004-02:00</published><updated>2011-03-01T19:08:09.068-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Fundamentos do ZK"/><category scheme="http://www.blogger.com/atom/ns#" term="ZK"/><title type='text'>Arquitetura do ZK</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;Neste artigo, irei abordar sobre a arquitetura do ZK. Mas antes disso, gostaria de falar sobre alguns conceitos importantes:&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;ol&gt;&lt;li&gt;&amp;nbsp;POJO(&lt;a href=&quot;http://pt.wikipedia.org/wiki/Plain_Old_Java_Objects&quot;&gt;Plain Old Java Objects&lt;/a&gt;) - São objetos Java que não dependem da herança de interfaces ou classes de frameworks externos. Outro &lt;a href=&quot;http://c2.com/cgi/wiki?PlainOldJavaObject&quot;&gt;link&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://pt.wikipedia.org/wiki/JavaScript&quot;&gt;JavaScript&lt;/a&gt; - Linguagem de script interpretada pelo borwser.&lt;/li&gt;
&lt;li&gt;DOM&lt;a href=&quot;http://pt.wikipedia.org/wiki/Modelo_de_Objeto_de_Documentos&quot;&gt;(Document Object Model&lt;/a&gt;) - Convenção criada peloa w3school, independente de plataforma e linguagem, para acessarem e manipularem elementos XML, HTML e XHTML através de objetos.&lt;/li&gt;
&lt;li&gt;AJAX(&lt;a href=&quot;http://pt.wikipedia.org/wiki/AJAX_(programa%C3%A7%C3%A3o)&quot;&gt;Asynchronous Javascript And XML&lt;/a&gt;) - Significa o uso de tecnologias como JavaScript e XML, providenciadas pelo navegador, para tornar as páginas Web mais interativas com os usuários, através de requisições assícronas.&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Esse artigo foi baseado no texto do site do ZK:&amp;nbsp;&lt;a href=&quot;http://books.zkoss.org/wiki/ZK_Developer&#39;s_Reference/Architecture_Overview&quot;&gt;http://books.zkoss.org/wiki/ZK_Developer&#39;s_Reference/Architecture_Overview&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Será abordado 2 perspectivas sobre o ZK: Aplicação e Componente. A primeira mostra uma visão a nível de aplicação, a segunda mostra uma visão a nível de componente.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Visão geral da arquitetura:&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqrQ9wy2E3-VE3Opng9IKlR0tKBrKN5hLJh_RrfYmasjY6Ri_Ow8r9_7rk8q4j2KSOBGsHn7LP1-MVYLnLfIfdnV61mmN4Diq-xJLQy9HQgX0ctAbQ6n_kDjtl956ZE0D_wTYFX1McKQ/s1600/Architecture-s.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;228&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqrQ9wy2E3-VE3Opng9IKlR0tKBrKN5hLJh_RrfYmasjY6Ri_Ow8r9_7rk8q4j2KSOBGsHn7LP1-MVYLnLfIfdnV61mmN4Diq-xJLQy9HQgX0ctAbQ6n_kDjtl956ZE0D_wTYFX1McKQ/s400/Architecture-s.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3&gt;&lt;b&gt;Visão do desenvolvedor da aplicação:&lt;/b&gt;&lt;/h3&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;O ZK possui uma arquitetura server-centric(centrada no servidor), isso quer dizer que a aplicação ZK roda no servidor. Ela pode acessar os recursos backend, montar a interface com os componentes, ouvir a atividades do usuário, e então manipular componentes para atualizar a interface. Tudo é feito no lado do servidor. A sincronização dos estados dos componetes entre o browser e o servidor é feito automaticamente pelo ZK, e transparente pela aplicação.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Quando executada no servidor, a aplicação pode acessar a stack completa da tecnologia Java. Atividades do usuário são, incluindo AJAX e Server Push, abstraidas para objetos de eventos. A interface são compostas por componentes tipos POJO. Essa é a abordagem mais produtiva para desenvolver uma moderna aplicação web.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;A partir do ZK 5, foi introduzido uma mundaça na arquitetura chamada de Server+Client Fusion. Assim a sua aplicação não para no servidor. É possível melhorar a interatividade de sua aplicação através da adição opicional de funcionalidades do lado do cliente(client-side), como o tratamento de evento pelo lado do cliente, efeitos visuais customizados, e até mesmo compor interfaces sem a codificação no lado do servidor. A versão 5 permite a fusão perfeita do servidor e cliente.Assim, voce pode ter o melhor dos 2 mundos: produtividade e flexibilidade.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Um artigo serã escrito mais tarde abordando o Server+Client Fusion.&lt;/div&gt;&lt;h3&gt;&lt;b&gt;Visão do desenvolvedor de componente:&lt;/b&gt;&lt;/h3&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Cada objeto de interface no ZK consiste de um componente e um widget. Um componente é um objeto Java sendo executando no servidor o qual representa um objeto de interface o qual pode ser manipulado por uma aplicação Java. Um componente possui todos os comportamentes de objeto de interface exceto a parte visual. Um widget é um objeto Javascript sendo executado no cliente. Esse objeto representa o objeto de interface o qual interage com o usuário. Por isso, um widget geralmente poussi uma aparencia visual, e manipula eventos ocorridos no cliente.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;O relacionamento entre um componete e um widget é um um-pra-um. Mas, se um componente não é anexado a uma página, ele não possuirá um widgt correspondente no cliente. Por outro lado, é permitada&amp;nbsp;a aplicação&amp;nbsp;instanciar widgets no cliente diretamente sem o componente correspondente.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;É função do componente&amp;nbsp;sincronizar os estados e distribuir a carga. O ZK Client Engine and update Engine trabalham juntos para propocionar um elegante e robusto canal para simplificar a implementação.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Por exemplo, assuma que voce queira implementar um componente que permite o usuário clicar sobre um elemento DOM para mostrar alguma informação detalhada de um componente. Existe pelo menos 2 abordagens para essa implementação. Primeiro, nós podemos carregar a informação detalhada para o cliente quando o widget é instanciado, e então mostrar o detalhe via código client-side. Alternativamente, nós podemos preferir não carregar a informação do detalhe logo de começo, e então enviar uma requisição de volta ao servidor para preencher o detalhe quando o usuário clicar.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Obviamente, a primeira abordagem requer mais largura de banda para a requisição inicial mas possui uma resposta rápida quando o usuário clicar. Porém, isso é geralmente transparente para o desenvolvedor da apicação, e a implementação do componente pode ser aperfeiçoada conforme a fase de desenvolvimento da aplicação.&lt;/div&gt;&lt;h3&gt;&lt;b&gt;Fluxo de Execução do carregamento de uma página:&lt;/b&gt;&lt;/h3&gt;&lt;ol&gt;&lt;li&gt;Quando um usuário digita uma URL ou clica num link no browser, uma requisição é enviada para o servidor web. Se a URL requisitada corresponde ao padrão de URL configurado do ZK(isso pode ser customizado), o ZK loader é então invocado para servir a essa requisiçáo.&lt;/li&gt;
&lt;li&gt;O ZK loader carrega a página especificada e interpreta-a para criar os componentes&amp;nbsp;especificos&amp;nbsp;de acordo com a página.&lt;/li&gt;
&lt;li&gt;Depois de interpretar a página&amp;nbsp;toda, o ZK loader renderiza o resultado em uma página HTML. A página HTML é então enviada de volta ao browser acompanhada do ZK Client Engine.&lt;/li&gt;
&lt;li&gt;O ZK Client Engine renderiza os widgets em elementos DOM e insere os elementos DOM na árvore DOM do borwser para torná-los visíveis ao usuário.&lt;/li&gt;
&lt;li&gt;Logo, o ZK Client Engine fica no browser para servir as requisições feitas pelo usuário. Se ele vai para outra página, o fluxo de execução começa novamente. Se ele vai enviar uma requisição AJAX de volta, outro fluxo de execução começa conforme descito no próximo item.&lt;/li&gt;
&lt;/ol&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;O ZK Client Engine é escrito em JavaScript. Browsers irão fazer cache do Z Client Engine, logo ele é geralmente enviado apenas uma vez no primeiro acesso.&lt;/div&gt;&lt;h3&gt;&lt;b&gt;Fluxo de Execução ao servir uma requisição AJAX:&lt;/b&gt;&lt;/h3&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;O fluxo de execução é iniciado pelo widget ou pela aplicação; geralmente causado por uma atividade do usuário(ou requisitos da aplicação). Isso é geralmente feito por enviar uma evento do lado do cliente(Event) para um widget (Widget.fire(Event, int)).&lt;/li&gt;
&lt;li&gt;O evento é então propagado ao pai do widget, ao pai do pai, e finalmente ao ZK Client Engine(Um widget pode escolher parar essa propagação através de Event.stop(Map)).&lt;/li&gt;
&lt;li&gt;Se necessário, o ZK Client Engine envia uma requisição AJAX para o ZK Update engine no servidor( Do ponto de vista do servidor, uma requisição AJAX é apenas outra requisição HTTP).&lt;/li&gt;
&lt;li&gt;Ao receber uma requisição AJAX, o ZK Update Engine invoca o ComponentCtrl.service(AuRequest, boolean) para o tratamento da requisição.&lt;/li&gt;
&lt;li&gt;A manipulação é com o componente. Mas, geralmente é feita a atualização dos estados, se necessário, e então notifica a aplicação enviando eventos( Events.postEvent(Event)).&lt;/li&gt;
&lt;li&gt;Se algum evento for enviado, o ZK Update Engine processará eles um-por-um invocando os events listeners, se houver.&lt;/li&gt;
&lt;li&gt;O event listener, provido por uma aplicação, pode escolher atualizar os recursos de backend, atualizar os componentes ou postar outros eventos.&lt;/li&gt;
&lt;li&gt;Finalmente, o ZK Update Engine recolhe todas as atualizações de componentes, incluindo mudanças nos estados, attachment e detachment. Otimizá-os, e depois envia de volta uma coleção de comandos de volta ao cliente.&lt;/li&gt;
&lt;li&gt;O ZK Client Engine avalia cada um desses comandos para atualizar o widget de acordo com cada um. E, os widgets atualizarão a árvore DOM do browser para torná-los disponíveis para o usuário.&lt;/li&gt;
&lt;/ol&gt;&lt;h3&gt;&lt;b&gt;Quando enviar uma requisição AJAX:&lt;/b&gt;&lt;/h3&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Quando o ZK Client Engine recebe um evento propagado pelo lado do cliente(Event), ele decidirá se e quando enviar o mesmo de volta ao servidor para processamento adicional.&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Se existe um event listener não adiável(deferrable) registrado no servidor, o pedido é enviado imediatamente.&amp;nbsp;Um event listener não adiável é um event listener (EventListener) que não implementa Deferrable.&amp;nbsp;Por padrão, (sem implementar Deferrable) todo o evento é enviado imediatamente ao servidor quando ele é acionado no cliente.&lt;/li&gt;
&lt;li&gt;Se existe um event listener adiável registrado no servidor, a requisição será colocado numa fila no cliente e será enviada quando outro evento for acionado e um event listener não adiável for registrado por ele. Para tornar um listener adiável, voce deve implementar Deferrable e retornar true para isDeferrable().&lt;/li&gt;
&lt;li&gt;Se o widget declarar o evento o evento como importante(ComponentCtrl.CE_IMPORTANT), o evento será adicionado na fila para ser enviado depois também.&lt;/li&gt;
&lt;li&gt;Se não for nenhum dos casos acima ou o widget não tem nenhum componente corresponde no servidor, o evento é cancelado.&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;Os eventos adiáveis são usados para melhorar o desempenho, minimizando o tráfego entre o cliente e o servidor. É comumente usado por events listener que mantém estados da aplicação, ao invés de gerar respostas visuais.&lt;br /&gt;
&lt;br /&gt;
Bem galera é essa é uma breve visão da arquitetura do ZK.. No próximo artigo irei falar de mais alguns conceitos importantes.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zkbrasil.blogspot.com/feeds/1418059795413301242/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://zkbrasil.blogspot.com/2010/12/arquitetura-do-zk.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26865069529777083/posts/default/1418059795413301242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26865069529777083/posts/default/1418059795413301242'/><link rel='alternate' type='text/html' href='http://zkbrasil.blogspot.com/2010/12/arquitetura-do-zk.html' title='Arquitetura do ZK'/><author><name>Felipe Costa</name><uri>http://www.blogger.com/profile/14863756381227884693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBAuASd7cMpROTHT1C1SAxUIiEi2b84QsEVkKv6i5bEX66j8hW4X7jmUhSHBo3ZjgOh6j-K9h4LU4cwrhkiLJjkQpBAA6LaiRvGcoF5XeWfh-WAvo4wO4-UYSQiHdJeQ/s220/perfil2.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqrQ9wy2E3-VE3Opng9IKlR0tKBrKN5hLJh_RrfYmasjY6Ri_Ow8r9_7rk8q4j2KSOBGsHn7LP1-MVYLnLfIfdnV61mmN4Diq-xJLQy9HQgX0ctAbQ6n_kDjtl956ZE0D_wTYFX1McKQ/s72-c/Architecture-s.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26865069529777083.post-8240883436293305421</id><published>2010-11-05T23:21:00.081-02:00</published><updated>2010-12-04T02:32:16.735-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ZK"/><title type='text'>Primeiros Passos</title><content type='html'>Com o nosso ambiente configurado no artigo anterior, vamos adicionar algums funcionalidades a nossa tela e ver como o ZK Studio funciona.&lt;br /&gt;
&lt;br /&gt;
O Zk Studio permite auto-complete dentro de arquivos .zul e possui alguns recursos interessantes como drag-and-drop de componentes para os arquivos ZUL através do ZUL Palette, visualização em árvore dos componentes dentro do Outline, manipular as propriedades de um componente selecionado dentro do Properties, renderização do arquivo zul dentro do ZUL Visual Editor e uma vizualização das versóes instaladas e exemplos de códigos através do Sample Codes.&lt;br /&gt;
&lt;br /&gt;
Sabendo um pouco melhor como o ZK Studio é estruturado, vamos começar a modificar o nosso exemplo.&lt;br /&gt;
Com o Eclipse aberto, vamos mudar a perspectiva para a do ZK. No canto superior direto, clique no botão &quot;Open Perspective&quot; e escolha a do ZK.&lt;br /&gt;
&lt;br /&gt;
Feito isso sua tela deve estar parecida com essa:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYU0WDpdY8LgdyhT5IOvAAuIf9ZFLQzypfadRK9DHBsl7x1JxqBuGUWG7_TDkaC7V-TUmKAnPFg0tq6V7ZuuEAsbA2PsSLdIxvj8B_NBxTU9as4XUdfSrC2QsRwiOOBov1Eei_N3y53A/s1600/perspective.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;212&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYU0WDpdY8LgdyhT5IOvAAuIf9ZFLQzypfadRK9DHBsl7x1JxqBuGUWG7_TDkaC7V-TUmKAnPFg0tq6V7ZuuEAsbA2PsSLdIxvj8B_NBxTU9as4XUdfSrC2QsRwiOOBov1Eei_N3y53A/s400/perspective.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Feito isso vamos abrir o arquivo index.zul e editar alguns coisas:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;?page title=&quot;Hello World&quot;?&amp;gt;
&amp;lt;window title=&quot;Minha Primeira Janela&quot; border=&quot;normal&quot; width=&quot;200px&quot;&amp;gt;
&amp;lt;label value=&quot;Hello World!&quot; /&amp;gt;
&amp;lt;/window&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
Troquei o atributo title da pagina e da window, e o value de label.&lt;br /&gt;
Rode o servidor, e a tela gerada deve ficar assim:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheXP2FgonuS6jbIATkrM3Er625BXkdosTAd3SsCWHzOusVNrbBAehqGcT7owUOqg9Qjb6_fpBHM6j-8qU1YO1FzDixmE55LiZOPui7-f9fhKR9q-jywPBqUuqL1VoRPMs48-PqTICUig/s1600/helloWorld-browser.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;230&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheXP2FgonuS6jbIATkrM3Er625BXkdosTAd3SsCWHzOusVNrbBAehqGcT7owUOqg9Qjb6_fpBHM6j-8qU1YO1FzDixmE55LiZOPui7-f9fhKR9q-jywPBqUuqL1VoRPMs48-PqTICUig/s400/helloWorld-browser.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Em ZK, voce escreve em ZUML(ZK User Interface Markup Language), linguagem essa baseada em XML.&lt;br /&gt;
Cada atributo alterado, altera cada propriedade de um componente.&lt;br /&gt;
Algumas propriedades do componente Window:&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;th&gt;Propriedade&lt;/th&gt; &lt;th&gt;Função&lt;/th&gt; &lt;th&gt;Valor&lt;/th&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;title&lt;/td&gt; &lt;td&gt;Define o título da janela&lt;/td&gt; &lt;td&gt;qualquer texto&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;border&lt;/td&gt; &lt;td&gt;Define o estilo de borda da janela&lt;/td&gt; &lt;td&gt;normal ou none (padrão)&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;height&lt;/td&gt; &lt;td&gt;Define a altura da janela&lt;/td&gt; &lt;td&gt;numero de pixels (Ex: 100px)&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;width&lt;/td&gt; &lt;td&gt;Define o comprimento da janela&lt;/td&gt; &lt;td&gt;numero de pixels (Ex: 100px)&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;closable&lt;/td&gt; &lt;td&gt;Define se ou não a janela pode ser fechada&lt;/td&gt; &lt;td&gt;true ou false&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;sizeable&lt;/td&gt; &lt;td&gt;Define se ou não a janela pode ser redimensionada&lt;/td&gt; &lt;td&gt;true ou false&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;Vamos alterar a nossa janela pra ficar com um comprimento de 100px, ser redimensionável e fechada. Com as mudanças feitas, basta voce recarregar a pagina.&amp;nbsp;Deve ficar assim:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtAzRVQVdnjn8A5gUCKqR_UHXxLW430dlKCfXJzBGX0eGMnMA6l1_ZfVie5MzbwPRQeyXeC0WSh5XeFxfokgcq7Ea79YZfAioT-vx-5Ux4NhFnGMnMNf9YO-I93jSP-KtoAoI7lxiJYA/s1600/helloWorld-browser-edited.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;141&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtAzRVQVdnjn8A5gUCKqR_UHXxLW430dlKCfXJzBGX0eGMnMA6l1_ZfVie5MzbwPRQeyXeC0WSh5XeFxfokgcq7Ea79YZfAioT-vx-5Ux4NhFnGMnMNf9YO-I93jSP-KtoAoI7lxiJYA/s400/helloWorld-browser-edited.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Tente redimensionsar e/ou fechar a janela.&lt;br /&gt;
&lt;br /&gt;
Agora vamos adicionar uma botão e um evento, ficando assim:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;?page title=&quot;Hello World&quot;?&amp;gt;
&amp;lt;window title=&quot;Minha Primeira Janela&quot; border=&quot;normal&quot; closable=&quot;true&quot;
sizable=&quot;true&quot; width=&quot;200px&quot;&amp;gt;
&amp;lt;label value=&quot;Hello World!&quot; /&amp;gt;
&amp;lt;button label=&quot;sayHello&quot; onClick=&#39;alert(&quot;Hello World!&quot;)&#39; /&amp;gt;
&amp;lt;/window&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
Ficando assim:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ8WFBcM3Qxgd4MAAx5LeWiTZkFUxv_ftyHFdAwl9pDVmTv2-TZh4IHDP0WjJ_6ySljZ1-CCu0KPB6Cex-g5APQR759LrUeKWYNrZ8v-95SvHfH4rfgyRc6sDRhXwGNnzDFFYcu9t5oA/s1600/helloWorld-alert.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;140&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ8WFBcM3Qxgd4MAAx5LeWiTZkFUxv_ftyHFdAwl9pDVmTv2-TZh4IHDP0WjJ_6ySljZ1-CCu0KPB6Cex-g5APQR759LrUeKWYNrZ8v-95SvHfH4rfgyRc6sDRhXwGNnzDFFYcu9t5oA/s320/helloWorld-alert.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
O evento onClick é acionado quando o botão é clicado, gerando, nesse caso, um alert com o valor &quot;Hello World!&quot;. A função alert() é um função global que gera um alerta, similar a função&amp;nbsp;alert() presente no Javascript. O ZK possui alguns objetos e funções globais, mas isso será abordado em outro artigo.&lt;br /&gt;
Mas essa não é a única maneira de descrever como o evento vai ser tratado. Eis uma outra maneira:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;?page title=&quot;Hello World&quot;?&amp;gt;
&amp;lt;window title=&quot;Minha Primeira Janela&quot; border=&quot;normal&quot; closable=&quot;true&quot;
sizable=&quot;true&quot; width=&quot;200px&quot;&amp;gt;
&amp;lt;label value=&quot;Hello World!&quot; /&amp;gt;
&amp;lt;button label=&quot;sayHello&quot; onClick=&quot;sayHello()&quot; /&amp;gt;
&amp;lt;zscript&amp;gt;
void sayHello() {
Messagebox.show(&quot;Hello World!&quot;);
}
&amp;lt;/zscript&amp;gt;
&amp;lt;/window&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
Dessa vez eu escrevo o código Java dentro de um zscript. Esse tipo de tag significa que voce pode escrever scripts, mas em vez de serem processador no cliente serão processados no servidor. O zscript aceita mais de um tipo linguagens, basta voce dizer qual no atribute language, sendo Java o padrão.&lt;br /&gt;
Podemos observar que dessa vez eu utilizei uma outra maneira de criar um alert através do objeto Messagebox, similar ao JOptionPane, podendo passar vários parametros nas funções caso eu queira uma mensagem tipo alerta ou error.&lt;br /&gt;
Agora, se quisessemos, por exemplo trocar uma tributo o nome do nosso label?&lt;br /&gt;
Podemos fazer isso acessando o componente pelo id. Para cada componente é gerado um id automaticamentetem, mas eu posso definiar uma, e nesse caso foi o que eu fiz :&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;?page title=&quot;Hello World&quot;?&amp;gt;
&amp;lt;window title=&quot;Minha Primeira Janela&quot; border=&quot;normal&quot; closable=&quot;true&quot;
sizable=&quot;true&quot; width=&quot;200px&quot;&amp;gt;
&amp;lt;label id=&quot;mylabel&quot; value=&quot;Hello World!&quot; /&amp;gt;
&amp;lt;button label=&quot;sayHello&quot; onClick=&quot;change()&quot; /&amp;gt;
&amp;lt;zscript&amp;gt;
void change() {
mylabel.value = &quot;ZKBrasl&quot;;
}
&amp;lt;/zscript&amp;gt;
&amp;lt;/window&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoP3fhAfkfyrS2yxvnzrX1fW60IQLCO6QayeH9Mc-PIRDrBHoHOPX6oE-LNEtnAHb5ZSeB6XFUndnvkg2LFTZmVVR1Cw6OPKG2Spvewiyuzgfmmxj7G7NA5_I7jrD69SEYIQ78fh0qRA/s1600/evento_antes.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;152&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoP3fhAfkfyrS2yxvnzrX1fW60IQLCO6QayeH9Mc-PIRDrBHoHOPX6oE-LNEtnAHb5ZSeB6XFUndnvkg2LFTZmVVR1Cw6OPKG2Spvewiyuzgfmmxj7G7NA5_I7jrD69SEYIQ78fh0qRA/s400/evento_antes.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;Depois de o botão ter sido clicado:&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvsbZsfHyGC7U6v0mQXrGEjeMysDnK2oYMd0y-bwicm8rJ0UZubBBmJU5Ru2Oz-xu_cyduCQUIwv0Jpl_qlcqBWHHSiPmiqfNBVBbzm5Dlc0ftea4qEx2pKOMve9WwDLjIxo7j9ii80Q/s1600/evento_depois.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;138&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvsbZsfHyGC7U6v0mQXrGEjeMysDnK2oYMd0y-bwicm8rJ0UZubBBmJU5Ru2Oz-xu_cyduCQUIwv0Jpl_qlcqBWHHSiPmiqfNBVBbzm5Dlc0ftea4qEx2pKOMve9WwDLjIxo7j9ii80Q/s400/evento_depois.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;O label foi alterado, sem muita dificuldade, com uma chamada de evento paracida com Java mas que por trás roda AJAX. :)&lt;/div&gt;Veja que estamos alterando o atributo value do componente, mas poderiamos ter feito isso através do método setValue. Isso pode ser feito porque cada componente ZK é formado por uma parte visual e uma parte Java. Isso será abordado melhor mais em outro artigo.&lt;br /&gt;
&lt;br /&gt;
O ZK tem suporte a EL (Express Language) através da sintaxe ${exp}. Vamos agora, definiar que o valor de um botão será o mesmo de um outro botão:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;?page title=&quot;Hello World&quot;?&amp;gt;
&amp;lt;window title=&quot;Minha Primeira Janela&quot; border=&quot;normal&quot; closable=&quot;true&quot;
sizable=&quot;true&quot; width=&quot;200px&quot;&amp;gt;
&amp;lt;button id=&quot;button1&quot; label value=&quot;sayHello&quot; /&amp;gt;
&amp;lt;button id=&quot;button2&quot; label=&quot;${button1.label}&quot; /&amp;gt;
&amp;lt;/window&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
EL Será abordado melhor em outro artigo.&lt;br /&gt;
&lt;br /&gt;
Até agora escrevemos os nosso códigos de tratamento de evento dentro de um arquivo .zul, mas e se quisesemos escrever em outro lugar?&lt;br /&gt;
Claro que podemos! O ZK tras um bom suporte ao padrão MVC, nesse caso voce deve implementar uma classe java para tratar os eventos. A classe deve estender GenericComposer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&amp;lt;?page title=&quot;Hello World&quot;?&amp;gt;
&amp;lt;window title=&quot;Minha Janela&quot; border=&quot;normal&quot; width=&quot;200px&quot;
apply=&quot;view.MyComposer&quot;&amp;gt;
&amp;lt;button label=&quot;say Hello&quot; forward=&quot;onSayHello&quot; /&amp;gt;
&amp;lt;/window&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: java&quot;&gt;view.MyComposer

public class MyComposer extends GenericComposer {
public void onSayHello(Event evt) {
evt.getTarget().appendChild(new Label(&quot;Hello&quot;));
}
}
&lt;/pre&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQdS7hS3HMUapPbm70PGU5CjoubNbVPnvzyR4jfN2utLVlmEckhhjgqdz8dVo5U0zemvq0p0eWiSQNBbUaRRSHx27D6Kp0yo67YoTWpMWKWGRD9_6QijR64gRaFyNtlS7U3nhBReI0eA/s1600/mvc_antes.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQdS7hS3HMUapPbm70PGU5CjoubNbVPnvzyR4jfN2utLVlmEckhhjgqdz8dVo5U0zemvq0p0eWiSQNBbUaRRSHx27D6Kp0yo67YoTWpMWKWGRD9_6QijR64gRaFyNtlS7U3nhBReI0eA/s1600/mvc_antes.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Depois de o botão ter sido clicado:&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ5i-Yl0Hvj3qsf2E9Hjc8IRGt_xTIWocsHGd3nXK3DzoUlMxv8pGs8FT2tDguv2v8xEn8kH1j18cuXf4oQDX7b7XtRN8RquoXFTIi9bIgiShwFruI3G-TuVUrT9fZzpwaZLDXAX22ZQ/s1600/mvc_depois.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ5i-Yl0Hvj3qsf2E9Hjc8IRGt_xTIWocsHGd3nXK3DzoUlMxv8pGs8FT2tDguv2v8xEn8kH1j18cuXf4oQDX7b7XtRN8RquoXFTIi9bIgiShwFruI3G-TuVUrT9fZzpwaZLDXAX22ZQ/s1600/mvc_depois.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Vimos um pouco mais como o ZK funciona, e como o ZK trata eventos de uma maneira simples e rápida.&lt;br /&gt;
Vimos alguns componentes simples, mas exitem vários outros.&lt;br /&gt;
&lt;br /&gt;
Voce pode consultar uma demo dos componentes aqui: &amp;nbsp;&lt;a href=&quot;http://www.zkoss.org/zkdemo/&quot;&gt;http://www.zkoss.org/zkdemo/&lt;/a&gt;&lt;br /&gt;
No próximo artigo veremos um pouco mais de como o ZK funciona por dentro.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;ATUALIZAÇÃO - 04/12/2010&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Uma outra maneira mais simples na hora de tratar eventos e que eu costumo usar é fazer com que a minha classe onde eu trato os meus eventos estenda de GenericForwardComposer. Assim o nosso exemplo fica assim:&lt;/div&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&lt;window apply=&quot;view.MyComposer&quot; border=&quot;normal&quot; id=&quot;win&quot; title=&quot;Minha Janela&quot; width=&quot;200px&quot;&gt;
 &lt;button id=&quot;btn&quot; label=&quot;say Hello&quot;&gt;

&lt;/button&gt;&lt;/window&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: java&quot;&gt;view.MyComposer

public class MyComposer extends GenericForwardComposer {

 Window win;
 
 public void onClick$btn(Event evt) {
  win.appendChild(new Label(&quot;Hello&quot;));
 }
}

&lt;/pre&gt;&lt;br /&gt;
Dessa forma retiramos o atributo forward de button, colocamos um id nele e em window também.&lt;br /&gt;
Na classe, declaramos uma variável com nome similar ao id de window e do tipo Window. Dessa forma forma o ZK vai saber que aquela várial está se ligando a Window na parte de visão cujo id bate com o nome da variável e tipo também. O nome do método agora segue uma convenção de nomes para tratamentos de eventos: &lt;b style=&quot;font-style: italic;&quot;&gt;&quot;event_name$component_id&quot;&lt;/b&gt;. Dessa forma quando o evento for disparada e redirecionado para essa classe, ele vai comparar o tipo de evento e depois o id do componente o qual &amp;nbsp;disparou o evento. Dessa forma o código fica mais limpo e máis fácil de manter.&lt;br /&gt;
&lt;br /&gt;
Em geral os exemplos postados no blog irá utilizar uma abordagem mais parecida com essa.</content><link rel='replies' type='application/atom+xml' href='http://zkbrasil.blogspot.com/feeds/8240883436293305421/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://zkbrasil.blogspot.com/2010/11/primeiros-passos.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26865069529777083/posts/default/8240883436293305421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26865069529777083/posts/default/8240883436293305421'/><link rel='alternate' type='text/html' href='http://zkbrasil.blogspot.com/2010/11/primeiros-passos.html' title='Primeiros Passos'/><author><name>Felipe Costa</name><uri>http://www.blogger.com/profile/14863756381227884693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBAuASd7cMpROTHT1C1SAxUIiEi2b84QsEVkKv6i5bEX66j8hW4X7jmUhSHBo3ZjgOh6j-K9h4LU4cwrhkiLJjkQpBAA6LaiRvGcoF5XeWfh-WAvo4wO4-UYSQiHdJeQ/s220/perfil2.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYU0WDpdY8LgdyhT5IOvAAuIf9ZFLQzypfadRK9DHBsl7x1JxqBuGUWG7_TDkaC7V-TUmKAnPFg0tq6V7ZuuEAsbA2PsSLdIxvj8B_NBxTU9as4XUdfSrC2QsRwiOOBov1Eei_N3y53A/s72-c/perspective.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26865069529777083.post-2531244077833415506</id><published>2010-11-02T14:20:00.002-02:00</published><updated>2011-03-01T01:47:59.716-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ZK"/><title type='text'>Configurando o ZK</title><content type='html'>Neste artigo irei abordar a configuração do Eclipse e o ZK Studio, plugin pro Eclipse, para trabalhar com o ZK.&lt;br /&gt;
&lt;br /&gt;
Ferramentas necessárias:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://www.oracle.com/technetwork/java/javase/downloads/index.html&quot;&gt;JDK 6&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.eclipse.org/downloads/&quot;&gt;Eclipse Helios Java EE&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://tomcat.apache.org/download-70.cgi&quot;&gt;Tomcat 7&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Algum browser, recomendo o Firefox.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.zkoss.org/download/zk.dsp&quot;&gt;ZK 5.0.5&lt;/a&gt;, versão da data deste artigo.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.zkoss.org/download/zkstudio.dsp&quot;&gt;ZK Studio&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;Após a instalação do JDK,&amp;nbsp;baixe o Eclipse, e descompacte no local que preferir.&amp;nbsp;&lt;/div&gt;&lt;div&gt;No meu caso foi escolhido o caminho C:\Java\eclipse, com worspace em&amp;nbsp;C:\Java\workspace.&lt;/div&gt;&lt;div&gt;Feito isso, baixe o tomcat 7 e descompacte para&amp;nbsp;C:\Java\tomcat.&lt;/div&gt;&lt;div&gt;Abra o Eclipse. No menu navegue para Window -&amp;gt; Show View -&amp;gt; Other... ,&amp;nbsp;&lt;/div&gt;&lt;div&gt;ou no canto inferior esquerdo clique no botão &quot;Show View as fast view&quot;,&amp;nbsp;e procure por Servers.&lt;/div&gt;&lt;div&gt;Com a janela aberta, clique com o botão direito dentro da janela e vá para New -&amp;gt; Server.&lt;/div&gt;&lt;div&gt;Nessa janela escolha o Tomcat v7.0 Server e clique next.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihjx_uVSwLgxM-V_7IotNQiyLSmbIj9jjQohmHW0bx9yRvyKonGAz5zlv-p-9ntMiaPHjJhHH4tZHAbwc4MUbmJruLWGvKusqwe6b38qqnqdDEayumoAdV_zvnKE-L1pB4l-xvkQENLQ/s1600/server03.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihjx_uVSwLgxM-V_7IotNQiyLSmbIj9jjQohmHW0bx9yRvyKonGAz5zlv-p-9ntMiaPHjJhHH4tZHAbwc4MUbmJruLWGvKusqwe6b38qqnqdDEayumoAdV_zvnKE-L1pB4l-xvkQENLQ/s400/server03.png&quot; width=&quot;298&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Na Janela seguinte, procure pelo diretório do Tomcat 7 e clique em finish.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3jqFFMkrLnxelShCbMexxOGcO_DWp8hEpgJhMoqNOIIaLuAsLAikgU6_krr3zRsOfGM44CjeUide8PRhWM5bFydcmQoRPXLVdbL2K9u7khO-on8UzIPR9GjqxWBzzdf-byQNHpSgcXw/s1600/server04.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3jqFFMkrLnxelShCbMexxOGcO_DWp8hEpgJhMoqNOIIaLuAsLAikgU6_krr3zRsOfGM44CjeUide8PRhWM5bFydcmQoRPXLVdbL2K9u7khO-on8UzIPR9GjqxWBzzdf-byQNHpSgcXw/s400/server04.png&quot; width=&quot;283&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;Feito isso vamos baixar o ZK Studio. navegue até Help -&amp;gt; Install New Software....&lt;br /&gt;
Nessa Janela voce clicar em Add..., para adicionar uma nova url de busca de plugins para o Eclipse.&lt;br /&gt;
Em Name, coloque o nome de ZK Studio e Location o url para download descrita no site.&lt;br /&gt;
Feito isso, o Eclipse irá buscar o plugin. Escolha o plugin ZK Studio e instale.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs9sYv2rWRxn1eG6Sd48DwKJz7MdEXSpKyoQcHneiDiokWGNMopbXV_Tz76e1ki5Yl5RCrZu8OQXA57un7s70brwWJfl1e_wURo3QHFTr3IBdDmhDIdEmmNbBwZyQUc5FhIV2gafd1yQ/s1600/plugin.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;317&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs9sYv2rWRxn1eG6Sd48DwKJz7MdEXSpKyoQcHneiDiokWGNMopbXV_Tz76e1ki5Yl5RCrZu8OQXA57un7s70brwWJfl1e_wURo3QHFTr3IBdDmhDIdEmmNbBwZyQUc5FhIV2gafd1yQ/s400/plugin.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Antes de criar um projeto vá em Window -&amp;gt; Preferences, escolha o item ZK e depois ZK Packages. Voce notará que a versão utilizada é a 3.6.3. Baixe a última versão do ZK, na janela anterior escolha clique em Add File/ Directory..., depois em File Import. Escolha o local onde está o arquivo .zip da versão do ZK e depois em finish. Marque a opção da versão mais nova. O ZK Studio não atualiza a versão do ZK sozinho, então a cada nova versão que voce deseja instalar voce deve realizar esse procedimento, É permitido que voce tenha projetos ZK com versão diferentes basta voce configurar cada projeto separadamente. A cada novo projeto, o Eclipse irá gerar com a versão escolhida aqui&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrxQC8AszQQqVGYXnP9TgUsfeo21nRTsmapi95Sg-xvfJ7EKzQK2uy2OaE_-Zby6E6J0lYJcnrlFwLcb0ahCcBYK7AXH5b1zwnAgDJB1oz1YwL_itRWZNHGOXDCNne5_-YLasRAg4G_w/s1600/pacotes.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;327&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrxQC8AszQQqVGYXnP9TgUsfeo21nRTsmapi95Sg-xvfJ7EKzQK2uy2OaE_-Zby6E6J0lYJcnrlFwLcb0ahCcBYK7AXH5b1zwnAgDJB1oz1YwL_itRWZNHGOXDCNne5_-YLasRAg4G_w/s400/pacotes.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Clique em apply e depois finish.&lt;br /&gt;
Voce pode notar que no Project Explorer existe as 2 versões das libs:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0CC08FTD9c0YiJf_2n-SF9HIt7zdo6NtDpDykaJFYmIfYrl9CIEoE3ZlslissJ9-NbtJxaBBCzyAkGC-GBWy812IysWqPWumaXJDycP1YMH0gkP1DO5IxD0tzfW_5nvJ0Jb3KzddPzw/s1600/pactoes2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0CC08FTD9c0YiJf_2n-SF9HIt7zdo6NtDpDykaJFYmIfYrl9CIEoE3ZlslissJ9-NbtJxaBBCzyAkGC-GBWy812IysWqPWumaXJDycP1YMH0gkP1DO5IxD0tzfW_5nvJ0Jb3KzddPzw/s400/pactoes2.png&quot; width=&quot;152&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Feito isso, vamos criar um novo projeto ZK. Vá em File -&amp;gt; New -&amp;gt; Other... e escolha ZK Project.&lt;br /&gt;
O nome do nosso projeto vai ser HelloWorld:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGCC0G9pRSZFaLWv1X0rX7vywqGkp5-_SqoCqpU8JA7zaHW-r_xQdBICVAToysI3ycTzgpEqrYcn6RY0a4n6xHFV5JAPn-6jy-GvGejBMTEuD06Ms0kbjrXsuj5J6oPLnP9JrUQlCPOg/s1600/helloWorld.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;385&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGCC0G9pRSZFaLWv1X0rX7vywqGkp5-_SqoCqpU8JA7zaHW-r_xQdBICVAToysI3ycTzgpEqrYcn6RY0a4n6xHFV5JAPn-6jy-GvGejBMTEuD06Ms0kbjrXsuj5J6oPLnP9JrUQlCPOg/s400/helloWorld.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Note que ele mostra a versão do ZK utilizada e o servidor a ser utilizado, podendo ser configurado antes de cada projeto.&lt;br /&gt;
Lembre-se de selecionar a versão&amp;nbsp;2.5&amp;nbsp;do Dynamic web module, e clique em Finish.&lt;br /&gt;
Feito isso vamos analisar melhor o projeto gerado:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwVp_PUae1zAhY_mLwYlQVmzrRuJP53GEfMEl0RHeQ3jAojQaqFdx-T0F3QktdzBu-BhlKLgqvbXfU-a0xhd38_t-zyrTnYuE84kYiCXUFugCQgJ7Oz58SXe_fOeCrIORiXL9igibKPg/s1600/helloWorld-project.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwVp_PUae1zAhY_mLwYlQVmzrRuJP53GEfMEl0RHeQ3jAojQaqFdx-T0F3QktdzBu-BhlKLgqvbXfU-a0xhd38_t-zyrTnYuE84kYiCXUFugCQgJ7Oz58SXe_fOeCrIORiXL9igibKPg/s400/helloWorld-project.png&quot; width=&quot;181&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Em Java Resources ficam as classes Java, arquivos XML, arquivos texto, etc.&lt;br /&gt;
Dentro de WebContent fica os arquivos que irão serão responáveis pela vista como os arquivos&amp;nbsp;ZUL. No projeto gerado temos 2 : index e o timeout.&lt;br /&gt;
Quando um url é enviada para o servidor, o servidor irá processar e devolver o arquivo index por padrão, mas isso pode ser configurado para enviar outro arquivo. Como estamos trabalhando com uma aplicação AJAX, existe um tempo de resposta para a pagina. Quando tenta-se acessar um componente e é gerado um evento mas o tempo de resposta acabou, o servidor processa e devolve a pagina timeout com uma resposta, também podemos configurar a mensagem de timeout e o tempo de resposta.&lt;br /&gt;
Nessa pasta podemos ter outras pastas, contendo outros arquivos .zul, .html, .css, .js, imagens, entre outras coisas.&lt;br /&gt;
Dentro da pasta WEB-INF temos todas as libs usadas no projeto e os arquivos web.xml e zk.xml, usados para configurar nossa aplicação. Se precisarmos adicionar alguma lib extra, basta adicionar na pasta lib.&lt;br /&gt;
&lt;br /&gt;
Agora vamos iniciar a aplicação. COm o botão direito na projeto, seleciona Run As -&amp;gt; Run on Server.&lt;br /&gt;
Irá aparecer uma tela pra voce escolher o servidor o qual voce deseja rodar a apicação. No nosso caso o tomcat já está selecionado, então basta clicar em Finish. Voce pode marcar uma opção que permite que ele sempre rode dentro do servidor selecionado, se preferir.&lt;br /&gt;
Feito isso temos, nossa primeira aplicação funcioando:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9IeI9unjGmLA23z1XC0IT9Swj1BlKZMBamc75Mt0WgwsuWtppGFJzP6ga8fiIE7U1WTCd9tySHShBuDLNMA6Cfss3URiKC5GFeKh8zRmKErCHXJw5GeVsJZK-XDmAtLGqLRssgqwYg/s1600/helloWorld-tela.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;183&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9IeI9unjGmLA23z1XC0IT9Swj1BlKZMBamc75Mt0WgwsuWtppGFJzP6ga8fiIE7U1WTCd9tySHShBuDLNMA6Cfss3URiKC5GFeKh8zRmKErCHXJw5GeVsJZK-XDmAtLGqLRssgqwYg/s400/helloWorld-tela.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
ATUALIZAÇÃO - 03/12/2010&lt;br /&gt;
Na imagem de criação de projeto ZK aparece um warning dizendo que precisa do JDK instalado.&lt;br /&gt;
Para resolver isso basta ir em Window-&amp;gt;Preferences e depois navegue para Java -&amp;gt; Installed JREs.&lt;br /&gt;
Escolha a versão da jre instalada e clique em edit. Em JRE home basta colocar o caminho do JDK, no meu caso está em&amp;nbsp;C:\Java\jdk1.6.0_20. Se quiser renomear o nome de jre para jdk fique a vontade.&lt;br /&gt;
Feito isso não vai mais aparacer aquele warning.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zkbrasil.blogspot.com/feeds/2531244077833415506/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://zkbrasil.blogspot.com/2010/11/configurando-o-zk.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26865069529777083/posts/default/2531244077833415506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26865069529777083/posts/default/2531244077833415506'/><link rel='alternate' type='text/html' href='http://zkbrasil.blogspot.com/2010/11/configurando-o-zk.html' title='Configurando o ZK'/><author><name>Felipe Costa</name><uri>http://www.blogger.com/profile/14863756381227884693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBAuASd7cMpROTHT1C1SAxUIiEi2b84QsEVkKv6i5bEX66j8hW4X7jmUhSHBo3ZjgOh6j-K9h4LU4cwrhkiLJjkQpBAA6LaiRvGcoF5XeWfh-WAvo4wO4-UYSQiHdJeQ/s220/perfil2.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihjx_uVSwLgxM-V_7IotNQiyLSmbIj9jjQohmHW0bx9yRvyKonGAz5zlv-p-9ntMiaPHjJhHH4tZHAbwc4MUbmJruLWGvKusqwe6b38qqnqdDEayumoAdV_zvnKE-L1pB4l-xvkQENLQ/s72-c/server03.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26865069529777083.post-6570977764654769838</id><published>2010-11-01T23:49:00.000-02:00</published><updated>2010-11-08T15:43:34.825-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ZK"/><title type='text'>O que é o ZK?</title><content type='html'>Inicio a minha série de postagens falando mais sobre o que o ZK:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;O ZK é um framework orientado a eventos para desenvolvimento web baseado em AJAX de código aberto. Permitindo o desenvolvimento de interfaces ricas para aplicações web com pouca programação e um custo de desenvolvimento reduzido, tal como as antigas aplicações desktop.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;O ZK utiliza uma linguagem de meta-definição baseada em XML (ZUML) para definir a interface do usuário traduzindo para código HTML quando a página é solicitada pelo cliente.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;O ZK foi o primeiro projeto AJAX + mobile no SourceForge.net, acumulou 1.500.000 downloads, e foi referenciado por mais de 4.000 web sites desde o lançamento da primeira versão em 2005.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;O ZK possui quase tudo feito de bandeja:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul type=&quot;disc&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Diversos      componentes prontos: Tabbox, grid, listbox, tree, menu, combobox, bandbox,      datebox, chart, hbox, vbox, window, slider, paging, audio, image, timer,      include, iframe, etc&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Drag-and-drop      suportado por todos componentes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Menu      de Contexto e Tooltips customizaveis suportado por todos componentes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Ordenação      Customizada de listbox, grid etc&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Auto-preenchimento para combobox&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;“Load      on demand” sem escrever nenhuma linha de código&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;“Live data” ou “Load on demand” para listbox&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Todos      componentes são clonáveis e serializáveis&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Validação      e formatação para componentes de entrada de dados, com suporte completo a      uso de expressões regulares e $#,##0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;100%      API Java para os componentes Google Maps, FCKeditor, DOJO e Timeline&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Componente Tree com paginação&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Server      push, chamado de reverse-ajax, permite o servidor enviar dados para      clientes ativos, ou seja, facilmente é capaz de se desenvolver sistema de CHAT.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Em      adição, componentes TreeModel, Timebox e Flash&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Modelo      server-side e baseado em eventos&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Mais de 20 eventos suportados; onChange,      onChanging, onScroll, onSelect, on Show, onZIndex, etc&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Todos      os eventos são processados no servidor&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Todos      os eventos estão sincronizados. Não possui problema de “Racing Condition”&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Scripting      usando expressões EL. Inclui, mas não limitado, a Java, Javascript, Ruby, Groovy      e Python&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Mudanças      noa interface do usuário sem necessidade de restarting da aplicação&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Anotações      que permite uma página acessar a base de dados sem escrever código Java&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Macro componentes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Facilidade      em encapsular componentes puramente clientes como componentes do ZK usando      100% a API Java&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Dialogos Modais verdadeiramente server-side&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Internacionalização&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;MVEL plug-in&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;b&gt;Facilidade de utilização&lt;/b&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Simplicidade é um dos valores de base do ZK. Outra facilidades que se encontra nesse framework, é a disponibilidade com que a sua equipa de desenvolvedores está disposta a ajudar.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;A criação de novos/customizados componentes é bastante simples e a documentação é muito boa e bem detalhada.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;b&gt;Independência de plataforma&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;O ZK Mobile possui vários componentes já de bandeja: listbox, listitem, textbox, image, label, command, datebox, decimalbox, intbox, frame&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;O ZK suporta os seguintes browsers: Internet Explorer 6/7+, Firefox 1+, Safari 2+, Mozilla 1+, Opera 9+ and Camino 1+. Escreve uma vez e rode em todos os browsers sem problemas de compatibilidade.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Roda em qualquer web Server que suporta Servlet 2.3+ e JVM 1.4+&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;b&gt;Licença&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;A licença padrão do ZK é LGPL. No entanto, existem licenças pagas os componentes mais avançados que segue o mesmo padrão do famoso MySQL.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;b&gt;Integração com outros frameoworks&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Possui integração com outros frameworks, como Spring, Hibernate, JSP, JSF. ExtJs, Google Maps, FCKeditor, DOJO e Timeline.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Enfim, muitas coisas ficaram por analisar.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;Com muitos componentes já prontos, AJAX imbutido, integração com frameworks populares, suporte da comunidade e open-source, torna o ZK uma exelente escolha para o desenvolvimento de aplicações web.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;ul&gt;&lt;ul&gt;&lt;/ul&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://zkbrasil.blogspot.com/feeds/6570977764654769838/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://zkbrasil.blogspot.com/2010/11/o-que-e-o-zk.html#comment-form' title='3 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26865069529777083/posts/default/6570977764654769838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26865069529777083/posts/default/6570977764654769838'/><link rel='alternate' type='text/html' href='http://zkbrasil.blogspot.com/2010/11/o-que-e-o-zk.html' title='O que é o ZK?'/><author><name>Felipe Costa</name><uri>http://www.blogger.com/profile/14863756381227884693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBAuASd7cMpROTHT1C1SAxUIiEi2b84QsEVkKv6i5bEX66j8hW4X7jmUhSHBo3ZjgOh6j-K9h4LU4cwrhkiLJjkQpBAA6LaiRvGcoF5XeWfh-WAvo4wO4-UYSQiHdJeQ/s220/perfil2.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-26865069529777083.post-7720182965707530124</id><published>2010-09-18T23:06:00.000-03:00</published><updated>2010-09-18T23:30:50.223-03:00</updated><title type='text'>Primeiro Post...</title><content type='html'>Olá a todos!&lt;br /&gt;
Assim estreio a minha participação no meu primeiro Blog! rs&lt;br /&gt;
Esse blog tem como objeto falar sobre o framework RIA ZK, coisas relacionadas a Java e desenvolvimento de software.&lt;br /&gt;
Espero abordar tanto o basico quanto o avançado na parte de desenvolvimento web com o ZK.&lt;br /&gt;
&lt;br /&gt;
That&#39;s all folkes!</content><link rel='replies' type='application/atom+xml' href='http://zkbrasil.blogspot.com/feeds/7720182965707530124/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://zkbrasil.blogspot.com/2010/09/primeiro-post.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/26865069529777083/posts/default/7720182965707530124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/26865069529777083/posts/default/7720182965707530124'/><link rel='alternate' type='text/html' href='http://zkbrasil.blogspot.com/2010/09/primeiro-post.html' title='Primeiro Post...'/><author><name>Felipe Costa</name><uri>http://www.blogger.com/profile/14863756381227884693</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBAuASd7cMpROTHT1C1SAxUIiEi2b84QsEVkKv6i5bEX66j8hW4X7jmUhSHBo3ZjgOh6j-K9h4LU4cwrhkiLJjkQpBAA6LaiRvGcoF5XeWfh-WAvo4wO4-UYSQiHdJeQ/s220/perfil2.png'/></author><thr:total>0</thr:total></entry></feed>