Re: type MenuBar or MenuItem with addClickHandler(new ClickHandler()

2012-07-05 Thread Ali Thabet
Form MenuItem i set the command witch execute the same code of the
ClickHandler. why you want tu add a ClickHandler to the MenuBar?

2012/7/5 Jens jens.nehlme...@gmail.com

 You have to use the Command interface. A Command will be executed then a
 MenuItem is activated. See JavaDoc for MenuBar/MenuItem.

 -- J.

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/google-web-toolkit/-/1o_U4YFxWbEJ.

 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.


-- 
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: type MenuBar or MenuItem with addClickHandler(new ClickHandler()

2012-07-05 Thread Ali Thabet
But the command can have fields so you must create your command class witch
implements the Command interface and put your parameters in the constructor
to set fields

-- 
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: type MenuBar or MenuItem with addClickHandler(new ClickHandler()

2012-07-05 Thread Ali Thabet
class MyCommand implements Command
   {
  private String _id;

  public MyCommand(String id)
  {
 _id = id;
  }

  @Override
  public void execute()
  {
 GreetingServiceAsync greetingService =
GWT.create(GreetingService.class);

 greetingService.loadCategoryPage(_id,new
AsyncCallbackGridPageModel() {

 @Override
 public void onFailure(Throwable caught) {
 }

 @Override
 public void onSuccess(GridPageModel grid) {

 GridPageBuilder.build(grid);

 }
 });

  }
   }

   public void addItemToMenuBar(MenuBar menuBar)
   {
  menuBar.addItem(firstItem, new MyCommand(firstId));
  menuBar.addItem(secondItem, new MyCommand(secondId));
   }

-- 
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.



MenuBar: position and z-index

2012-07-05 Thread Ali Thabet
Hello,

Is there a way to change how GWT define the position and the z-index of
submenus?

-- 
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: symbolMap files and packaging gwt project

2012-06-21 Thread Ali Thabet
Thak you for your Response Thomas.
Finally, i decided to keep these files. I took a look to the beautifull
interface GWT.UncaughtExceptionHandler witch is used to catch exceptions
at the top level jest before they escape to the browser, i have seen also
the GWT Developer's Guide - Logging and the class StackTraceDeobfuscator.
It seems eazy to send log messages to the server and have understandable
stack traces from client, so why not! :)

-- 
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.



symbolMap files and packaging gwt project

2012-06-20 Thread Ali Thabet
Hello,

My problem is that the war of my GWT project has a large size. So I want,
if possible, delete unused files from the war. There are several symbolMap
files in WEB-INF/deploy/my_project_name/symbolMapps/ (the same number of
permutations), i know that they are useful fo deobfuscation, but in my case
i do not use them.

Is it possible to remove these files from the project war?

Thank you in advance.

-- 
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: guice injecting remote servlet. Error 404 not found

2012-05-30 Thread Ali Thabet
did you have guice-snapshot.jar in your classpath?

-- 
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-dnd] drag handles (urgent)

2012-05-02 Thread Ali Thabet
Is it possible to use multiple drag handles for the same custom widget?

Is it possible to change the drag handle during application execution?
something like:

if (IsEditable)
{
dragHandle = focusPanel_1;
}
else
{
dragHandle = focusPanel_2;
}

-- 
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: Disable the display of values of a ListBox

2012-04-27 Thread Ali Thabet
I do not want the list appears to be disabled. It is located in a draggable
component. I do not want the values ​​appear after the click when the drag
operation start. The values ​​in the list are not used in the application
and they are unnecessary, just the appearance of the list is necessary.

-- 
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.



Problem with ValueChangeEvent.fire(HasValueChangeHandlersT, T)

2012-02-01 Thread Ali Thabet
Hello,

I have a strange behavior when using the method
ValueChangeEvent.fire(HasValueChangeHandlersT, T). This method works
well with
browsers Mozilla Firefox 6.0.2 and Opera 11.10, but does not work for
browsers Chrome, Internet Explorer 9 and Safari 5.0.3.

Do you have any idea about this problem?

The Java code is:

 private class ValueChangeAndSelectionHandler implements
ValueChangeHandlerString,
  SelectionHandlerSuggestion
   {
  private boolean _valueChangeEventhandled = false;

  @Override
  public void onSelection(SelectionEventSuggestion event)
  {
 MySuggestion selectedItem = (MySuggestion) event
.getSelectedItem();
 if (_valueChangeEventhandled)
 {
SuggestBox source = (SuggestBox) event.getSource();
String selected =
event.getSelectedItem().getReplacementString();
*ValueChangeEvent.fire(source, selected);*
_valueChangeEventhandled = false;
 }

  }

  @Override
  public void onValueChange(ValueChangeEventString event)
  {
 _valueChangeEventhandled = true;
 SuggestBox source = (SuggestBox) event.getSource();
 DefaultSuggestionDisplay suggestionDisplay =
(DefaultSuggestionDisplay) source
.getSuggestionDisplay();
 boolean listShowing = suggestionDisplay.isSuggestionListShowing();
 if (!listShowing)
 {
doWork();
_valueChangeEventhandled = false;
 }
  }
   }

-- 
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: how to fire a customized event.

2011-09-14 Thread Ali Thabet
If your goal is to do a treatment when the event occurs on the child widget you
must implement the corresponding interface in your custom Widget. for
example:

public class MyWidget extends Composite implements HasClickHandlers
{
private TextBox text = new TextBox();

private PushButton button = new PushButton(MyButton);

public MyWidget()
{
 
 initWidget(...);
 }

 @Override
   public HandlerRegistration addClickHandler(ClickHandler handler)
   {
  return button.addClickHandler(handler);
   }
}

-- 
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.