Page Flip Animation

2010-10-25 Thread fonghuangyee
Is it possible to create page flip animation as the flash demo by
using GWT?
http://www.flashpageflip.com/demos/free/

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



XMLParser Question

2010-07-05 Thread fonghuangyee
StringBuffer xmlBfr = new StringBuffer();
xmlBfr.append(Layout);
xmlBfr.append(Column type=\Middle\/Column);
xmlBfr.append(Column type=\Middle\/Column);
xmlBfr.append(/Layout);
String xml = xmlBfr.toString();
Document document = XMLParser.parse(xml);
Element element = document.getDocumentElement();
NodeList layouts = element.getElementsByTagName(Layout);
for (int k = 0; k  layouts.getLength(); ++k) {
Element layoutElement = (Element) layouts.item(k);
NodeList columns = layoutElement.getElementsByTagName(Column);
for (int i = 0; i  columns.getLength(); ++i) {
Element columnElement = (Element) columns.item(i);
String type = columnElement.getAttribute(type);
Window.alert(type);
}
}

I try run the code above, i found that the XMLParser is not working
well.
NodeList layouts = element.getElementsByTagName(Layout);
layouts.getLength() should return 1, but it is return 0!
XMLParser just cant parse the xml string.

May i know, am i doing any mistake when using XMLParser as above?

-- 
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.isClient() always return true

2010-05-16 Thread fonghuangyee
Returns true when running inside the normal GWT environment, either
in hosted mode or web mode. Returns false if this code is running in a
plain JVM. This might happen when running shared code on the server,
or during the bootstrap sequence of a GWTTestCase test.

I am sorry, My question is :
if i deploy a GWT application to tomcat, GWT.isClient() will return
true or false?

On May 15, 10:48 pm, Olivier Monaco olivier.mon...@free.fr wrote:
 Hi,

 Great programmers write docs, like JavaDoc. Please respect their work
 by reading it.

 http://www.catb.org/~esr/faqs/smart-questions.html#before

 Olivier

 On 15 mai, 15:53,fonghuangyeefonghuang...@gmail.com wrote:

  Hi,

  I dun know why GWT.isClient() always return true even in web mode.
  Please advise, thanks.

  --
  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 
  athttp://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-tool...@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group 
 athttp://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-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.isClient() always return true

2010-05-16 Thread fonghuangyee
Thanks!

On May 16, 11:18 pm, Sripathi Krishnan sripathi.krish...@gmail.com
wrote:
 When deployed to tomcat as javascript, it will always return true.

 --Sri

 On 16 May 2010 20:38, fonghuangyee fonghuang...@gmail.com wrote:





  Returns true when running inside the normal GWT environment, either
  in hosted mode or web mode. Returns false if this code is running in a
  plain JVM. This might happen when running shared code on the server,
  or during the bootstrap sequence of a GWTTestCase test.

  I am sorry, My question is :
  if i deploy a GWT application to tomcat, GWT.isClient() will return
  true or false?

  On May 15, 10:48 pm, Olivier Monaco olivier.mon...@free.fr wrote:
   Hi,

   Great programmers write docs, like JavaDoc. Please respect their work
   by reading it.

  http://www.catb.org/~esr/faqs/smart-questions.html#before

   Olivier

   On 15 mai, 15:53,fonghuangyeefonghuang...@gmail.com wrote:

Hi,

I dun know why GWT.isClient() always return true even in web mode.
Please advise, thanks.

--
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.comgoogle-web-toolkit%2Bunsubs 
  cr...@googlegroups.com
  .
For more options, visit this group athttp://
  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.comgoogle-web-toolkit%2Bunsubs 
  cr...@googlegroups.com
  .
   For more options, visit this group athttp://
  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-tool...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs 
  cr...@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-tool...@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group 
 athttp://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-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.



MouseMoveEvent problem when i move my mouse very fast

2010-04-13 Thread fonghuangyee
addMouseMoveHandler(new MouseMoveHandler() {

@Override
public void onMouseMove(MouseMoveEvent event) {
System.out.println(X :  + event.getX());
});

My problem is, if i move my mouse very fast, i cant receive every
MouseMoveEvent.
As the code above, i aspect:
0,1,2,3,4,5,6

But when i move very fast, i will get
0, 5, 15, 20, 50.

I am doing a simple app as Window Paint.
I need to detect every MouseMoveEvent so that i can do drawing on the
page.

Thanks.

-- 
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: MouseMoveEvent problem when i move my mouse very fast

2010-04-13 Thread fonghuangyee
http://www.farbtube.com

this is the demo, or should i use a canvas?
Anyone know how to implement it?

On Apr 13, 3:45 pm, fonghuangyee fonghuang...@gmail.com wrote:
 addMouseMoveHandler(new MouseMoveHandler() {

         @Override
         public void onMouseMove(MouseMoveEvent event) {
                 System.out.println(X :  + event.getX());

 });

 My problem is, if i move my mouse very fast, i cant receive every
 MouseMoveEvent.
 As the code above, i aspect:
 0,1,2,3,4,5,6

 But when i move very fast, i will get
 0, 5, 15, 20, 50.

 I am doing a simple app as Window Paint.
 I need to detect every MouseMoveEvent so that i can do drawing on the
 page.

 Thanks.

-- 
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: MouseMoveEvent problem when i move my mouse very fast

2010-04-13 Thread fonghuangyee
but when i refer the http://www.farbtube.com and http://canvaspaint.org,
event i move very fast, they browser still can capture every single
pixel,
so i believe that this is GWT MouseEvent behavior or limitation.


On Apr 13, 11:02 pm, ben fenster fenster@gmail.com wrote:
 i had the same problem and i dont think it has a solution since the
 events are sent from the browser and if they are wrong then theirs
 nothing to do about it

 On 13 אפריל, 09:35, fonghuangyee fonghuang...@gmail.com wrote:



 http://www.farbtube.com

  this is the demo, or should i use a canvas?
  Anyone know how to implement it?

  On Apr 13, 3:45 pm, fonghuangyee fonghuang...@gmail.com wrote: 
  addMouseMoveHandler(new MouseMoveHandler() {

           @Override
           public void onMouseMove(MouseMoveEvent event) {
                   System.out.println(X :  + event.getX());

   });

   My problem is, if i move my mouse very fast, i cant receive every
   MouseMoveEvent.
   As the code above, i aspect:
   0,1,2,3,4,5,6

   But when i move very fast, i will get
   0, 5, 15, 20, 50.

   I am doing a simple app as Window Paint.
   I need to detect every MouseMoveEvent so that i can do drawing on the
   page.

   Thanks.

-- 
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: New GWT widget resource, of sorts: vaadin.com/directory

2010-03-31 Thread fonghuangyee
After i study Vaadin, it is really good.
By the way,it is too bad because Vaadin not support code splitting.
Anyway i will keep a look at Vaadin, thanks for your sharing.

-- 
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: New GWT widget resource, of sorts: vaadin.com/directory

2010-03-30 Thread fonghuangyee
hi emarc,

since u are familiar with vaadin, can i ask u an question regarding
vaadin demo?

Why every click from the demo will send a request to server to
retrieve something like this :

for(;;);[{changes:[[change,{format: uidl,pid: PID0},[0,
{id: PID0,height: 719px,width: 1440px,caption: Native
window } Vaadin Sampler,name: 407096448,theme: sampler-
reindeer,resizable:true,main:true,layoutRelativeHeight:true,layoutRelativeWidth:true,v:
{scrollLeft:0,scrollTop:
0,action:,positionx:-1,positiony:-1,close:false}},[open,
{src: http:\/\/demo.vaadin.com\/sampler\/696850590\/,name:
_blank,width:500,height:200,border: none}],[1,{id:
PID1,cached:true}],[actions,{}, meta : {}, resources :
{}, locales:[]}]

this is the demo behavior or vaadin behavior which every widget will
need to retrieve some data from server?


On Mar 30, 9:26 pm, emarc marc.engl...@gmail.com wrote:
 Hi,

 It occurs to me that the Vaadin Directory that was launched today
 might actually be an interesting resource for GWT 
 widgets.http://vaadin.com/directory
 (Also, I'm personally quite excited about it, and want spread the word
 - feedback welcome!)

 It's not a plain GWT resource, since it's actually for Vaadin add-ons,
 but since these usually have a client-side in GWT, and most are Apache
 2.0, it might be quite useful.

 At least I know I personally try to make the client-side of my Vaadin
 components with 'plain GWT' use in mind. Just as an example:
 PasswordField (a simple text field with chroma-hash and caps-lock
 warninghttp://vaadin.com/directory#addon/77) is planned to be
 published as a GWT widget when I get around to it, but the page links
 to the SVN repository, so you could just get it from there and start
 using...
 Please still note that not all of the add-ons are relevant if you're
 not actually using Vaadin.

 Oh, and of course the whole Directory is built with Vaadin, and thus
 everything you see is GWT :-)
 On the tooling side, if you're using eclipse and the vaadin plugin,
 you just drop the jar in your lib, and the GWT stuff is automatically
 recompiled (I think we might be the first to package GWT widgets like
 this?)

 Also, if you have made some awesome GWT widget, you could wrap it as a
 Vaadin add-on and charge for it in the Directory. Personally I like
 Apache 2.0, though, keep that in mind ;-)

 Anyway, check it out, and feedback welcome - in this thread, or better
 (since not everyone here will be interested) over at the Vaadin forum.

 Best Regards,
 Marc

-- 
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: New GWT widget resource, of sorts: vaadin.com/directory

2010-03-30 Thread fonghuangyee
hi emarc,
since u are familiar with vaadin, can i ask u a question regarding
vaadin demo?
Why every click from the demo will send a request to server to
retrieve something like this :

for(;;);[{changes:[[change,{format: uidl,pid: PID0},[0,
{id: PID0,height: 719px,width: 1440px,caption: Native
window } Vaadin Sampler,name: 407096448,theme: sampler-
reindeer,resizable:true,main:true,layoutRelativeHeight:true,layoutRelativeWidth:true,v:
{scrollLeft:0,scrollTop:
0,action:,positionx:-1,positiony:-1,close:false}},[open,
{src: http:\/\/demo.vaadin.com\/sampler\/696850590\/,name:
_blank,width:500,height:200,border: none}],[1,{id:
PID1,cached:true}],[actions,{}, meta : {}, resources :
{}, locales:[]}]

this is the demo behavior or vaadin behavior which every widget will
need to retrieve some data from server?

On Mar 30, 9:26 pm, emarc marc.engl...@gmail.com wrote:
 Hi,

 It occurs to me that the Vaadin Directory that was launched today
 might actually be an interesting resource for GWT 
 widgets.http://vaadin.com/directory
 (Also, I'm personally quite excited about it, and want spread the word
 - feedback welcome!)

 It's not a plain GWT resource, since it's actually for Vaadin add-ons,
 but since these usually have a client-side in GWT, and most are Apache
 2.0, it might be quite useful.

 At least I know I personally try to make the client-side of my Vaadin
 components with 'plain GWT' use in mind. Just as an example:
 PasswordField (a simple text field with chroma-hash and caps-lock
 warninghttp://vaadin.com/directory#addon/77) is planned to be
 published as a GWT widget when I get around to it, but the page links
 to the SVN repository, so you could just get it from there and start
 using...
 Please still note that not all of the add-ons are relevant if you're
 not actually using Vaadin.

 Oh, and of course the whole Directory is built with Vaadin, and thus
 everything you see is GWT :-)
 On the tooling side, if you're using eclipse and the vaadin plugin,
 you just drop the jar in your lib, and the GWT stuff is automatically
 recompiled (I think we might be the first to package GWT widgets like
 this?)

 Also, if you have made some awesome GWT widget, you could wrap it as a
 Vaadin add-on and charge for it in the Directory. Personally I like
 Apache 2.0, though, keep that in mind ;-)

 Anyway, check it out, and feedback welcome - in this thread, or better
 (since not everyone here will be interested) over at the Vaadin forum.

 Best Regards,
 Marc

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



gwt-button : Firefox Dotted Border

2010-02-05 Thread fonghuangyee
Hi,

is there anyone notice that the gwt button will show dotted border
when focus on firefox.

i try
.gwt-button:focus {
outline : none;
}

but the dotted border still there. Any solution?

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



Code Split Question

2009-12-15 Thread fonghuangyee
i split my code into 4 cache.js, and GWT will produce 5 cache.js.
May i know what is the extra cache.js?Because i found that the extra
cache.js size is quite big.

--

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 Tree always scroll to the bottom?

2009-10-19 Thread fonghuangyee

I think i found something, this behavior only will happened if i put
the tree inside a VerticalPanel, or FlexTable ( I think is any table
component ).

On Oct 19, 11:56 am, fonghuangyee fonghuang...@gmail.com wrote:
 Hi,

 Why when i select TreeItem at bottom level, the screen will scroll to
 bottom?
 Can i prevent this kind of behavior?

 Thanks.
--~--~-~--~~~---~--~~
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 Tree always scroll to the bottom?

2009-10-18 Thread fonghuangyee

Hi,

Why when i select TreeItem at bottom level, the screen will scroll to
bottom?
Can i prevent this kind of behavior?

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



RichTextArea : Insert HTML ( not setHTML )

2009-10-12 Thread fonghuangyee

Hi,
Is there anyway i can insert html into a RichTextArea? The html code
should display just beside the pointer.
--~--~-~--~~~---~--~~
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: RichTextArea : Insert HTML ( not setHTML )

2009-10-12 Thread fonghuangyee

thanks michael

On Oct 13, 1:30 pm, Michael smm...@gmail.com wrote:
 You can override RichTextArea and add method like this. Also, set
 focus to true before using this method.

 public native void insertHTML(String html) /*-{
   var el = th...@com.google.gwt.user.client.ui.uiobject::getElement()
 ();
   if (el.contentWindow.document.selection) {
     el.contentWindow.document.selection.createRange().pasteHTML
 (html); // For IE
   } else {
     el.contentDocument.execCommand('insertHTML',false,html); // For
 Mozilla
   }

 }-*/;

 --
 Michaelhttp://www.projectkaiser.com:8080/pk

 On Oct 12, 2:46 pm, fonghuangyee fonghuang...@gmail.com wrote:



  Hi,
  Is there anyway i can insert html into a RichTextArea? The html code
  should display just beside the pointer.
--~--~-~--~~~---~--~~
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: MVP HasClickHandler

2009-09-11 Thread fonghuangyee

Thanks jason,

I just implement HasSelectionHandlers to handle a list of dynamic
hasclickhandler.
It work fine and nice.


On Sep 11, 7:59 am, Jason A. Beranek jason.bera...@gmail.com
wrote:
 I take a little different approach, but you have most of the
 fundamentals. The characteristic interface (i.e., Listener in your
 example) shouldn't be defined as part of a particular instance of
 MyPresenter.View, as that ties the Presenter directly to a specific
 view implementation. Also, I would recommend following the Handler
 pattern in GWT, as it allows you to utilize some of the Handler
 management functions.

 Taking your example, here's a possible approach using
 SelectionHandlerString instead of MyView.Listener:

 public class MyView extend Composite implements MyPresenter.View,
 HasSelectionHandlersString {

   HasSelectionHandlersString getSelectionSource() {
     return this;
   }

   ...

   //Do something with a click event (called by the ClickHandler)
   void doClick( CLickEvent event ) {
     //Retrieve the selection (i.e., item to edit) by processing the
 ClickEvent
     String selection = getSelectionFromClickEvent( event );
     SelectionEvent.fire(this, selection);
   }

 }

 public class MyPresenter implement MyView.Listener {

   public interface View {
     HasSelectionHandlersString getSelectionSource();
   }

   ...

   public void bind(View display){
     display.getSelectionSource().addSelectionHandler(new
 SelectionHandlerString(){

       public void onSelection(SelectionEventString event) {
         //Do Something in response to Selection
       }

     });
   };

 }

 Note that in the example, even though MyView implements the
 HasSelectionHandlerString interface directly, the Presenter only
 accesses an instance that HasSelectionHandlersString through
 View.getSelectionSource(). This allows different View implementations
 to implement different sources for the SelectionEvent, reducing
 potential coupling between the view and presenter. Hope that helps.

 -Jason

 On Sep 10, 10:47 am, fonghuangyee fonghuang...@gmail.com wrote:



  Thanks for ur advise.
  How about if i define a interface ( View Listener ), then my presenter
  implement the View Listener?

  Example :

  public class MyView extend Composite implement MyPresenter.View {

        public interface Listerner {

               public void onEdit(String id);
        }

        .
        .

        Listener listener;

        // a List of Button here
        button.addClickHandler(new ClickHandler(){

               public void onClick(ClickEvent event){
                       listener.onEdit(id);
               }
        );

  }

  public class MyPresenter implement MyView.Listener {

        public interface View {

        }

        public void onEdit(String id){
             // Do something here.
        };

  }

  Please correct me if i am following the wrong way.
  Thanks.

  On Sep 7, 8:32 am, Jason A. Beranek jason.bera...@gmail.com wrote:

   One approach I've used is to put some logic in the View to forward a
   different event than the purely GUI events to the Presenter. For
   example, if you have a table or list of items which can be clicked,
   and a click signifies selection of an item, use HasSelectionHandlers()
   in the View, and translate in the View which item is selected by the
   click. This seems to work for selection use cases, but it makes your
   View in theMVPmore Supervising Controller (http://martinfowler.com/
   eaaDev/SupervisingPresenter.html) than Passive View (http://
   martinfowler.com/eaaDev/PassiveScreen.html).

   If you were to need separate handling for each list item being
   clicked, then you are likely looking at a Presenter per list item or
   at having the View include a factory to add list items and return
   handlers (i.e., HasClickHandlers addListItem() ). Any of these
   approaches will work, it just depends on what you are looking to do
   with each click handler.

   V/r,

   Jason

   On Sep 6, 3:19 am, fonghuangyee fonghuang...@gmail.com wrote:

Hihi ,
After i go through so manyMVPexample, i found that we always use
presenter to get thoseHasClickHandlerfrom Display( Or View) to do
some action. This way works nice for static clickable action, but if
we have some dynamic button ( example a table listing with a list of
clickable  action ), then i have to get a list ofHasClickHandler
from
display? and every time i add new row to the table listing, i have to
take care of the handler action, quite troublesome.
any advice?

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

Re: MVP HasClickHandler

2009-09-10 Thread fonghuangyee

Thanks for ur advise.
How about if i define a interface ( View Listener ), then my presenter
implement the View Listener?

Example :

public class MyView extend Composite implement MyPresenter.View {

  public interface Listerner {

 public void onEdit(String id);
  }

  .
  .

  Listener listener;

  // a List of Button here
  button.addClickHandler(new ClickHandler(){

 public void onClick(ClickEvent event){
 listener.onEdit(id);
 }
  );

}

public class MyPresenter implement MyView.Listener {

  public interface View {

  }

  public void onEdit(String id){
   // Do something here.
  };
}

Please correct me if i am following the wrong way.
Thanks.

On Sep 7, 8:32 am, Jason A. Beranek jason.bera...@gmail.com wrote:
 One approach I've used is to put some logic in the View to forward a
 different event than the purely GUI events to the Presenter. For
 example, if you have a table or list of items which can be clicked,
 and a click signifies selection of an item, use HasSelectionHandlers()
 in the View, and translate in the View which item is selected by the
 click. This seems to work for selection use cases, but it makes your
 View in theMVPmore Supervising Controller (http://martinfowler.com/
 eaaDev/SupervisingPresenter.html) than Passive View (http://
 martinfowler.com/eaaDev/PassiveScreen.html).

 If you were to need separate handling for each list item being
 clicked, then you are likely looking at a Presenter per list item or
 at having the View include a factory to add list items and return
 handlers (i.e., HasClickHandlers addListItem() ). Any of these
 approaches will work, it just depends on what you are looking to do
 with each click handler.

 V/r,

 Jason

 On Sep 6, 3:19 am, fonghuangyee fonghuang...@gmail.com wrote:



  Hihi ,
  After i go through so manyMVPexample, i found that we always use
  presenter to get thoseHasClickHandlerfrom Display( Or View) to do
  some action. This way works nice for static clickable action, but if
  we have some dynamic button ( example a table listing with a list of
  clickable  action ), then i have to get a list ofHasClickHandler
  from
  display? and every time i add new row to the table listing, i have to
  take care of the handler action, quite troublesome.
  any advice?

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



MVP ClickHandler Problem

2009-09-06 Thread fonghuangyee

Hihi ,
After i go through so many MVP example, i found that we always use
presenter to get those HasClickHandler from Display( Or View) to do
some action. This way works nice for static clickable action, but if
we have some dynamic button ( example a table listing with a list of
clickable  action ), then i have to get a list of HasClickHandler from
display? and every time i add new row to the table listing, i have to
take care of the handler action, quite troublesome.
I hope that someone can give me some advice on handling this kind of
scenario.

Thanks.

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



MVP HasClickHandler

2009-09-06 Thread fonghuangyee

Hihi ,
After i go through so many MVP example, i found that we always use
presenter to get those HasClickHandler from Display( Or View) to do
some action. This way works nice for static clickable action, but if
we have some dynamic button ( example a table listing with a list of
clickable  action ), then i have to get a list of HasClickHandler
from
display? and every time i add new row to the table listing, i have to
take care of the handler action, quite troublesome.
any advice?

Thanks.
--~--~-~--~~~---~--~~
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: Image Cropper

2009-08-09 Thread fonghuangyee

Emm... seems like no feedback here.

On Aug 4, 8:25 pm, fonghuangyee fonghuang...@gmail.com wrote:
 Hi, i am looking for animagecropperwidget for gwt. Below is the
 example.http://www.defusion.org.uk/demos/060519/cropper.php

 i try to use a resizable panel to build theimagecropper, but just
 not as smooth as those javascriptimagecropper.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Image Cropper

2009-08-04 Thread fonghuangyee

Hi, i am looking for an image cropper widget for gwt. Below is the
example.
http://www.defusion.org.uk/demos/060519/cropper.php

i try to use a resizable panel to build the image cropper, but just
not as smooth as those javascript image cropper.


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