Re: GWT - Tree - Replace the cross event by clicking on the parent item

2013-07-28 Thread Vagner Araujo
Maybe... you can try

.

Tree staticTree = new Tree() {
@Override
public void onBrowserEvent(Event event) {
Element el = event.getEventTarget().cast();
if (el == null)
return;
switch (event.getTypeInt()) {
case Event.ONCLICK:
for (int i = 0; i  getItemCount(); i++) {
TreeItem treeItem = getItem(i);
TableElement table = getTableElement(treeItem);
if (table != null) {
NodeListElement nodeList = table
.getElementsByTagName(div);
if (nodeList.getLength()  0)
if (el.equals(nodeList.getItem(0))) {
treeItem.setState(!treeItem.getState());
break;
}// end if
}// end if
}// end for
break;
}// end switch
super.onBrowserEvent(event);
}// end onBrowserEvent

private final TableElement getTableElement(TreeItem treeItem) {
return (TableElement) treeItem.getElement()
.getFirstChildElement();
}// end getTableElement
};

TreeItem item1 = staticTree.addTextItem(Item 1);

item1.addTextItem(Item 1 - 1);
item1.addTextItem(Item 1 - 2);
item1.setStyleName(parent);
DOM.getFirstChild(item1.getElement()).addClassName(nocross);

TreeItem item2 = staticTree.addTextItem(Item 2);

item2.addTextItem(Item 2 - 1);
item2.addTextItem(Item 2 - 2);
item2.setStyleName(parent);
DOM.getFirstChild(item2.getElement()).addClassName(nocross);

..

CSS File ...

.nocross  tbody  tr  td  img {
display: none;
}
.parent  div  div {
padding: 3px !important;
}

..

-- 
*

Vagner Araujo

*
*Orsic.org http://www.orsic.org
*
***
*

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.




Re: GWT - Tree - Replace the cross event by clicking on the parent item

2013-07-28 Thread Vagner Araujo
you should use staticTree variable or override onBrowserEvent  method
in t instance



*public void onModuleLoad() {

   Tree t = new Tree() {
@Override
public void onBrowserEvent(Event event) {
Element el = event.getEventTarget().cast();
if (el == null)
return;
switch (event.getTypeInt()) {
case Event.ONCLICK:
for (int i = 0; i  getItemCount(); i++) {
TreeItem treeItem = getItem(i);
TableElement table = getTableElement(treeItem);
if (table != null) {
NodeListElement nodeList =
table.getElementsByTagName(div);

if (nodeList.getLength()  0)
if (el.equals(nodeList.getItem(0))) {
treeItem.setState(!treeItem.getState());
break;
}// end if
}// end if
}// end for
break;
}// end switch
super.onBrowserEvent(event);
}// end onBrowserEvent

private final TableElement getTableElement(TreeItem treeItem) {
return (TableElement)
treeItem.getElement().getFirstChildElement();
}// end getTableElement
};

TreeItem item1 = t.addTextItem(Item 1);
item1.addTextItem(Item 1 - 1);
item1.addTextItem(Item 1 - 2);
item1.setStyleName(parent);
DOM.getFirstChild(item1.getElement()).addClassName(nocross);

TreeItem item2 = t.addTextItem(Item 2);
item2.addTextItem(Item 2 - 1);
item2.addTextItem(Item 2 - 2);
item2.setStyleName(parent);
DOM.getFirstChild(item2.getElement()).addClassName(nocross);

t.addItem(item1);
t.addItem(item2);

// Add the nameField and sendButton to the RootPanel
// Use RootPanel.get() to get the entire body element
RootPanel.get(nameFieldContainer).add(t);
}*

...


-- 
*Vagner Araujo

*
*Orsic.org http://www.orsic.org
*
*
***

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.




Re: TreeItem - bold only the parent item in a Tree?

2013-07-26 Thread Vagner Araujo
Maybe..

.

Tree tree = new Tree();

TreeIten parent = new TreeItem();
DOM.getFirstChild(parent.getElement()).addClassName(bold);
parent.setText(Parent);
parent.addTextItem(Child);

tree.addItem(parent);

parent = new TreeItem();
DOM.getFirstChild(parent.getElement()).addClassName(bold);
parent.setText(Parent 2);
parent.addTextItem(Child);

tree.addItem(parent);



CSS File

.bold {
   font-weight: bolder;
}

.

-- 
*

Vagner Araujo

*
*Orsic.org http://www.orsic.org
*
*
***

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.




Re: GWT Reflection

2013-01-16 Thread Vagner Araujo
Some time ago I toyed with it and created a mini library of reflection. The
documentation on how to use it can be accessed by clicking
herehttp://code.google.com/p/orsic/wiki/GWTReflection
. Below are links to sample application and mini library.

Sample Application
Linkhttp://code.google.com/p/pure-gwt-reflection/downloads/detail?name=testeReflection.zipcan=2q=
.

Mini Api 
Linkhttp://code.google.com/p/pure-gwt-reflection/downloads/detail?name=reflection.jarcan=2q=
.


*Note 1*: I created it just for fun, so do not recommend their use in
a production
environment.

*Note 2*: The documentation was written in pt_BR.

*Note 3*: To use it just the following statement in your module:
*
inherits name=org.puregwt.reflection.Reflection /

*

-- 
*Vagner Araujo*

Orsic.org http://www.orsic.org

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT Reflection

2013-01-16 Thread Vagner Araujo
Some time ago I toyed with it and created a mini library of reflection. The
documentation on how to use it can be accessed by clicking
herehttp://code.google.com/p/orsic/wiki/GWTReflection
. Below are links to sample application and mini library.

Sample Application
Linkhttp://code.google.com/p/pure-gwt-reflection/downloads/detail?name=testeReflection.zipcan=2q=
.

Mini Api 
Linkhttp://code.google.com/p/pure-gwt-reflection/downloads/detail?name=reflection.jarcan=2q=
.


*Note 1*: I created it just as a joke, so do not recommend their use
in a production
environment.

*Note 2*: The documentation was written in pt_BR.

*Note 3*: To use it just the following statement in your module:
*
inherits name=org.puregwt.reflection.Reflection /

*

-- 
*Vagner Araujo*

Orsic.org http://www.orsic.org

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Label Click Handler Problem

2011-01-03 Thread Vagner Araujo
Hi,

you are setting an integer value that IE interprets it as -2147024809, so
the exception.
*
$FlexCellFormatter.setColSpan(FlexTable.java:78)
   at com.BiddingSystem.client.View.LoginView.init(LoginView.java:*


Thanks,
-- 
*
Vagner Araujo

O PLANETA É O MEU PAÍS, E A CIÊNCIA É A MINHA RELIGIÃO ! INDO AO INFINITO E
ALÉM... !!
*

[image: logo.gif]

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

logo.gif

Re: session in gwt

2011-01-02 Thread Vagner Araujo
Hello friends,

this example might help. But this example is old, it was posted in 2009.

http://snipt.net/javagner/session-in-gwt/

Thanks,
-- 
*
Vagner Araujo

O PLANETA É O MEU PAÍS, E A CIÊNCIA É A MINHA RELIGIÃO ! INDO AO INFINITO E
ALÉM... !!

[image: logo.gif]
*

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

logo.gif

checkbox in celltable header

2011-01-01 Thread Vagner Araujo
http://snipt.net/araujo921/checkbox-in-gwt-celltable-header

-- 
*
Vagner Araujo

O PLANETA É O MEU PAÍS, E A CIÊNCIA É A MINHA RELIGIÃO ! INDO AO INFINITO E
ALÉM... !!

[image: logo.gif]
*

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

logo.gif

Re: Announcing Chrome Developer Plugin support for Mac and Linux

2010-12-10 Thread Vagner Araujo
Hello Friends,

gwt plugin work in my google-chrome 8.0.552.215. But in development mode
It's very very very slow.

I'm using Slackware Linux Current 32bits with xfce4, eclipse Helios and 2GB
ram.

Thanks,
-- 
*
Vagner Araujo

O PLANETA É O MEU PAÍS, E A CIÊNCIA É A MINHA RELIGIÃO ! INDO AO INFINITO E
ALÉM... !!
*

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: PureGWT Showcase Preview Part II

2010-11-11 Thread Vagner Araujo
Hi Nagin,

2010/11/10 Nagin Kothari naginkoth...@gmail.com


 Hi Vagner,

 The scroll table in the show case in good one. In addition to scrolling ,it
 will be better if has following features too.
 1. Header resizing
 2.Column sorting
 3. Column hiding .
 4. Column freezing.

 Will these features be there in release you are planning for?


*1. Header resizing*

yes, but perhaps not in this version. It will be implemented later.

*2.Column sorting*

This feature already exists, but has not been enabled on the showcase. I
enabled this feature in reading table. Check out in showcase. ;-)

*3. Column hiding*

nope, maybe in the future.

*4. Column freezing*

nope, maybe in the future.


Thanks,
-- 
*
Vagner Araujo

O PLANETA É O MEU PAÍS, E A CIÊNCIA É A MINHA RELIGIÃO ! INDO AO INFINITO E
ALÉM... !!
*

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



PureGWT Showcase Preview Part II

2010-11-04 Thread Vagner Araujo
Hello friends,

see an new PureGWT Showcase Preview http://showcase.jdukes.com.

-- 
*Vagner Araujo

O PLANETA É O MEU PAÍS, E A CIÊNCIA É A MINHA RELIGIÃO ! INDO AO INFINITO E
ALÉM... !!
*

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: PureGWT Showcase Preview Part II

2010-11-04 Thread Vagner Araujo
Hi,

thanks for your reply, but this is still a preview showcase, fonts are
large, because users complain of the small fonts, this is the font size used
in a screen resolution of 1024x768 and this is a pattern of development, at
least around here. ;-)


-- 
*Vagner Araujo

O PLANETA É O MEU PAÍS, E A CIÊNCIA É A MINHA RELIGIÃO ! INDO AO INFINITO E
ALÉM... !!

*

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT Session

2009-04-21 Thread Vagner Araujo

Hi Friends,

http://snipt.net/javagner

Vagner Araujo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Simple Loading While GWT Application Loads

2009-04-20 Thread Vagner Araujo

Hi friends,

this post can be easily adapted to load a gif loading.

see this link:

http://javagner921.s155.eatj.com/web2/

*this link will be valid until tomorrow.


Vagner Araujo
Java + Vagner = Javagner
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: what's wrong here?

2009-04-19 Thread Vagner Araujo

Hi friends,

try now.


package com.tsolution.crm.client;

import java.io.Serializable;


public class Model implements Serializable {

private static final long serialVersionUID = 5693662550097196303L;

private String desc;

public String getDesc() {
return desc;
}//end getDesc

public void setDesc(String desc) {
this.desc = desc;
}//end setDesc

}//end class


//SERVICE CLASS

package com.tsolution.crm.client;

import java.util.ArrayList;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;


@RemoteServiceRelativePath(greet)
public interface GreetingService extends RemoteService {
 String greetServer(ArrayListModel modelList);
 String greetServer1(String modelList);
}//end interface


package com.tsolution.crm.client;
import java.util.ArrayList;
import com.google.gwt.user.client.rpc.AsyncCallback;

public interface GreetingServiceAsync {

void greetServer(ArrayListModel modelList, AsyncCallbackString
callback);

void greetServer1(String modelList, AsyncCallbackString
asyncCallback);
}//end interface



package com.tsolution.crm.server;

import java.util.ArrayList;
import com.tsolution.crm.client.GreetingService;
import com.tsolution.crm.client.Model;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;

public class GreetingServiceImpl extends RemoteServiceServlet
implements
GreetingService {

private static final long serialVersionUID = 1L;

@Override
public String greetServer(ArrayListModel modelList) {
return modelList.get(0).getDesc();
}//end greetServer(ArrayListModel modelList)

@Override
public String greetServer1(String modelList) {
return null;
}//end greetServer1(String modelList)
}//end class


public void onModuleLoad() {

GreetingServiceAsync greetingServiceAsync = GWT
.create(GreetingService.class);

Model m1 = new Model();
m1.setDesc(Hello);

AsyncCallbackString callback = new AsyncCallbackString() {
public void onFailure(Throwable caught) {
}

public void onSuccess(String result) {
Window.alert(result);
}
};

ArrayListModel modelList = new ArrayListModel();
modelList.add(m1);

greetingServiceAsync.greetServer(modelList, callback);

}//end onModuleLoad


Vagner Araujo
Java + Vagner = Javagner
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Simple Loading While GWT Application Loads

2009-04-18 Thread Vagner Araujo
 com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.javaneses.example.loading.client.MyBean;
import com.javaneses.example.loading.client.rpc.service.MyService;

public class MyServiceImpl extends RemoteServiceServlet implements
MyService{

private static final long serialVersionUID = -6260441209521818053L;

@Override
public ListMyBean listMyBean() {

ListMyBean list = new ArrayListMyBean();

for(int i = 0; i  1000; i++){
MyBean bean = new MyBean();
bean.setName(Vagner);
bean.setLastName(Araujo);
list.add(bean);
}//end for(int i = 0; i  1000; i++)
return list;
}//end listMyBean

}//end class



//BEAN

package com.javaneses.example.loading.client;

import java.io.Serializable;

public final class MyBean implements Serializable{

private static final long serialVersionUID = 2264295145291728318L;

private String name;

private String lastName;


public void setName(String name) {
this.name = name;
}//end setName

public String getName() {
return name;
}//end getName

public void setLastName(String lastName) {
this.lastName = lastName;
}//end setLastName

public String getLastName() {
return lastName;
}//end getLastName
}//end class



//MY MODULE


module

!-- Inherit the core Web Toolkit stuff.--
inherits name='com.google.gwt.user.User' /


inherits name='com.google.gwt.widgetideas.WidgetIdeas' /
inherits name='com.google.gwt.libideas.LibIdeas' /


!-- Inherit the default GWT style sheet.  You can change   --
!-- the theme of your GWT application by uncommenting  --
!-- any one of the following lines.--
inherits name='com.google.gwt.user.theme.standard.Standard' /
!-- inherits name='com.google.gwt.user.theme.chrome.Chrome'/ --
!-- inherits name='com.google.gwt.user.theme.dark.Dark'/ --

!-- Other module inherits  --


!-- Specify the app entry point class. --
entry-point class='com.javaneses.example.loading.client.MainTest' /

!-- Specify the application specific style sheet.  --
stylesheet src='MainTest.css' /

servlet path=/myService

class=com.javaneses.example.loading.server.rpc.service.MyServiceImpl /


/module


//MY CSS

.gwt-ProgressBar-shell {
width: 150px;
height: 15px;
border: double;
}

.gwt-ProgressBar-shell .gwt-ProgressBar-bar {
background: #4188FA;
}

.gwt-ProgressBar-shell .gwt-ProgressBar-text {
font-size: 12px;
}

.gwt-ProgressBar-shell .gwt-ProgressBar-text-firstHalf {
color: green;
}

.gwt-ProgressBar-shell .gwt-ProgressBar-text-secondHalf {

color: black;
}



--
Vagner Araujo
Java + Vagner = Javagner


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT Developer's Guide can't work

2009-03-07 Thread Vagner Araujo

No,
It has been working.

Vagner Araujo.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT Developer's Guide can't work

2009-03-07 Thread Vagner Araujo

No,
It is working.

Vagner Araujo.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Error GWT

2009-03-06 Thread Vagner Araujo

Nesse caso não sei como te ajudar, até agora eu não passei por esse
erro, mas nas Threads que já vi esse erro, o mesmo estava relacionado
com atualização de uma versaõ do GWT antiga para uma mais nova.

Se você puder me enviar o código, ou se você puder posta-lo aqui,
seria bom para que agente possa debugar.

--
Abraço
Vagner Araujo.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Error GWT

2009-03-06 Thread Vagner Araujo

bem, então nesse caso você vai ter que testar jar por jar, ou
simplesmente trocar todos os jars, esse é um erro interessante, se
agente descobrir qual o jar ou jars estar ou estão provocando isso,
agente poderá ajudar outras pessoas.

Tente isso, substitua jar por jar, ou todos de uma vez, e depois posta
o resultado.

Você estar utilizando algum outro jar além do GWT ?

--
Abraço.
Vagner Araujo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Error GWT

2009-03-06 Thread Vagner Araujo

blz, não esqueça de postar o resultado aqui. ;-)

--
Abraço.
Vagner Araujo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Openfire and gwt

2009-03-05 Thread Vagner Araujo

I also had this problem when I was developing the jtalk (for Desktop),
I solved my problem using the class PacketCollector.

Vagner Araujo.
Http://jtalk.jdukes.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Error GWT

2009-03-05 Thread Vagner Araujo

Olá, quando esse erro começou a aparecer ???
Eu já vi esse erro de InvalidJarIndexException em uma outra Thread
aqui no grupo.
se puder postar mais detalhes de quando esse erro começou aparecer.


Abraço.
Vagner Araujo.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: popup menu example

2009-03-01 Thread Vagner Araujo

http://gwt.google.com/samples/Showcase/Showcase.html#CwBasicPopup

Vagner Araujo.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



GWT + JasperReport

2009-02-28 Thread Vagner Araujo


Hello friends,

the servlet shows how to generate reports using jasperReport.


//Servlet GetReport


package com.javaneses.report.server.report;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Locale;
import java.util.Map;

import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.sf.jasperreports.engine.JRDataSource;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JRField;
import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.view.JasperViewer;

/**
 * @author Vagner Araujo
 * */

public class GetReport extends HttpServlet{


private static final long serialVersionUID = -5295343701909694274L;

protected void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {


final String reportFileName = request.getParameter
(reportFileName);
final String reportName = request.getParameter(reportName)
+.jasper;


response.setContentType(application/pdf);
response.setHeader(Content-disposition, attachment; 
filename=\
+ reportFileName + \);

MapObject, Object map = new HashMapObject, Object();

//add report logo
//logo path
final String logoPath = com/javaneses/report/server/report/
logo.jpg;
URL url = ClassLoader.getSystemResource(logoPath);
//report parameter
map.put(logo, url);


try {
//file.jasper path
final String reportPath = com/javaneses/report/server/
report/+reportName;
url = ClassLoader.getSystemResource(reportPath);
File file = new File(url.toURI());
InputStream inputStream = new FileInputStream(file);
JasperPrint jasperPrint = 
JasperFillManager.fillReport(inputStream,
map, /*Your dataSource*/));
byte[] report = 
JasperExportManager.exportReportToPdf(jasperPrint);

response.setContentLength(report.length);
ServletOutputStream out = response.getOutputStream();
out.write(report);
out.flush();
out.close();
} catch (Exception e) {
e.printStackTrace();
}
}//end doPost
}//end class

Parameters

reportFileName = name to be suggested when the report is saved.
reportName = name of the jasper file compiled.


Vagner Araujo
vag...@jdukes.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Gwt and Smack Openfire error

2009-02-28 Thread Vagner Araujo

Hello,

before you invoke the login method, you must invoke the connect()
method.


  connection.connect();
  connection.login( user, pass);


Vagner Araujo.
vag...@jdukes.com
http://jtalk.jdukes.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT Session

2009-02-27 Thread Vagner Araujo

Hi,

in this example the cookie will expire when the current browser
session is ended,
but below is a snippet of code that will make the session expire every
two minutes of inactivity.


//Main Class

public void onClick(Widget sender) {
if(sender == login){
user.setUser(userField.getText());
user.setPasswd(passwdField.getText());
LoginServiceAsync loginServiceAsync = 
(LoginServiceAsync)GWT.create
(LoginService.class);
ServiceDefTarget serviceDefTarget = (ServiceDefTarget)
loginServiceAsync;
serviceDefTarget.setServiceEntryPoint(login);

AsyncCallbackString asyncCallback = new 
AsyncCallbackString() {
public void onSuccess(String result) {
if(result != null){
RootPanel.get().clear();
RootPanel.get().add(welcome);



//session expire every
two minutes of inactivity


Cookies.setCookie(session, 
result, new Date
(System.currentTimeMillis() + TWO_MIN));
sessionId.setSessionId(result);

System.out.println(login 
session = +result);

}else{
Window.alert(Login Invalid !);
}
}
public void onFailure(Throwable caught) {
System.out.println(caught);
}
};//end asyncCallback

loginServiceAsync.login(user, asyncCallback);
}//end if(sender == login)
}//end onClick

//end class Main


//Class SessionServiceImpl

public SessionId session(SessionId sessionId) {
HttpSession httpSession = 
getThreadLocalRequest().getSession(false);
if(httpSession != null){
try {
sessionId.setSessionId(httpSession.getId());
} catch (IllegalStateException e) {
sessionId.setSessionId();
}
return sessionId;
}//end if(result == null)
return null;
}//end session


//end Class SessionServiceImpl


//Class LoginServiceImpl

public String login(User user) {
if(user != null  user.getUser().equalsIgnoreCase(vagner) 
user.getPasswd().equals(Javagner)){
HttpSession httpSession = 
getThreadLocalRequest().getSession();

//Specifies the time in seconds, before the
servlet container will invalidate this session.

httpSession.setMaxInactiveInterval(1000 * 60 *2);
return httpSession.getId();
}//end if
return null;
}//end login

//end LoginServiceImpl


thanks All ;-)

Professor Vagner
Vagner Araujo.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



GWT Session

2009-02-26 Thread Vagner Araujo
'/
--
  !-- inherits name='com.google.gwt.user.theme.dark.Dark'/
--

  !-- Other module inherits
--


  !-- Specify the app entry point class.
--
  entry-point class='com.javaneses.spring.client.Main'/

  !-- Specify the application specific style sheet.
--
  stylesheet src='Main.css' /

  servlet path=/session
class=com.javaneses.spring.server.rpc.service.SessionServiceImpl/
  servlet path=/login
class=com.javaneses.spring.server.rpc.service.LoginServiceImpl/
/module




Vagner Araujo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Desktop Problem

2008-12-26 Thread Vagner Araujo
Hi guys,

I tried to create an instance of class Desktop and had the following
exception:

[ERROR] Failed to create an instance of 'com.jdukes.jtalk.client.
JTalk' via deferred binding
com.google.gwt.core.client.JavaScriptException: (NS_ERROR_INVALID_POINTER):
Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER)
[nsIDOMHTMLDivElement.appendChild]
 QueryInterface:
function QueryInterface() {
[native code]
}

 result: 2147500035
 initialize:
function initialize() {
[native code]
}

at com.google.gwt.dom.client.Node$.appendChild$(Native Method)
at com.extjs.gxt.desktop.client.Desktop$1.onRender(Desktop.java:66)
at com.extjs.gxt.ui.client.widget.Component.render(Component.java:795)
at
com.extjs.gxt.ui.client.widget.Layout.renderComponent(Layout.java:236)
at com.extjs.gxt.ui.client.widget.Layout.renderAll(Layout.java:227)
at com.extjs.gxt.ui.client.widget.Layout.onLayout(Layout.java:211)
at
com.extjs.gxt.ui.client.widget.layout.RowLayout.onLayout(RowLayout.java:218)
at com.extjs.gxt.ui.client.widget.Layout.layout(Layout.java:90)
at com.extjs.gxt.ui.client.widget.Container.doLayout(Container.java:285)
at com.extjs.gxt.ui.client.widget.Container.layout(Container.java:375)
at
com.extjs.gxt.ui.client.widget.LayoutContainer.layout(LayoutContainer.java:246)
at com.extjs.gxt.ui.client.widget.Container.onAttach(Container.java:386)
at com.extjs.gxt.ui.client.widget.Viewport.onAttach(Viewport.java:82)
at com.google.gwt.user.client.ui.Widget.setParent(Widget.java:231)
at com.google.gwt.user.client.ui.Panel.adopt(Panel.java:119)
at com.google.gwt.user.client.ui.ComplexPanel.add(ComplexPanel.java:86)
at
com.google.gwt.user.client.ui.AbsolutePanel.add(AbsolutePanel.java:80)
at com.extjs.gxt.desktop.client.Desktop.init(Desktop.java:80)
at com.jdukes.jtalk.client.JTalk.init(JTalk.java:43)



the problem occurs at line 66 of the class constructor
com.extjs.gxt.desktop.client.Desktop.Desktop

line 66 = getElement().appendChild(XDOM.getElementById(x-desktop));

is this a bug ?

I'm using version 1.2.1 of gxt, Slackware Linux, and GWT 1.5.3

have anyone any suggestions ?


I'm sorry my English, I am still beginner in writing in English

thanks.



-- 
Professor Vagner
Java Programmer
Sun Certified Programmer for the Java Platform, SE 6

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---