Decorator panel outlook problem

2010-03-30 Thread Fendy Tjin
Decorator panel outlook went a mess when expanded its width.


example source:

DecoratedTabPanel tabPanel = new DecoratedTabPanel();

// expand the width of the tab panel
tabPanel.setWidth("1000px");
tabPanel.setAnimationEnabled(true);

// a new tab
String[] tabTitles = { "Home", "Content", "More Info" };

// set a new table
FlexTable helloWorldTable = new FlexTable();
helloWorldTable.setCellSpacing(5);
helloWorldTable.setTitle("Hello World Example");
FlexCellFormatter cellFormat = helloWorldTable.getFlexCellFormatter();

helloWorldTable.setHTML(0, 0, "Hello World Example");
cellFormat.setColSpan(0, 0, 3);
cellFormat.setHorizontalAlignment(0, 0,
HasHorizontalAlignment.ALIGN_CENTER);

helloWorldTable.setHTML(1, 0, "Say hello, ");
final TextBox nameField = new TextBox();
nameField.setFocus(true);
nameField.selectAll();
helloWorldTable.setWidget(1, 1, nameField);
final Button sayButton = new Button("Say");
helloWorldTable.setWidget(1, 2, sayButton);

// Wrap the content in a DecoratorPanel
DecoratorPanel decPanel = new DecoratorPanel();
// decPanel.setWidth("500px");
decPanel.add(helloWorldTable);
// decPanel.setWidget(helloWorldTable);

tabPanel.add(decPanel, tabTitles[0]);

// Add a tab
tabPanel.add(new HTML(), tabTitles[1]);

// Add a tab
HTML moreInfo = new HTML("etc");
tabPanel.add(moreInfo, tabTitles[2]);

tabPanel.selectTab(0);

RootPanel.get().add(tabPanel);

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



Just a Test Message! Since my post here was forwarded to someone else and I want to figure out how. Sorry for the inconvenience

2010-04-02 Thread Fendy Tjin
Sorry for the inconvenience

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



auto refresh client side when ever there are changes in the database (without timer)

2010-07-02 Thread Fendy Tjin
Is there a way to automatically refresh the client side when ever
there are changes in the database without the timer on the client side.

-- 
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: auto refresh client side when ever there are changes in the database (without timer)

2010-07-02 Thread Fendy Tjin
Thank you for the reply. But server push does not seem practical when
we can't flush the HTTP connection. Although they did explain how to
overcome it, however I require the HTTP connection to stay alive for I
will use it for a live graph presentation (similar to the stock graph
in yahoo finance.)

I would like to know has every browser in fact support HTML5 already?
I think most of the users in the world are still using browsers with
HTML4 (Internet Explorer).

Thank you,
Fendy Tjin

On Jul 2, 10:49 pm, Stefan Bachert  wrote:
> Hi,
>
> there are some ways.
>
> The buzz words are comet, server push, long poll.
> These techniques are requesting values from the server, but the server
> only fulfills the requests when datas are available.
> The effect is, the client will wait until the server has data.
>
> With HTML5 is WebSockets coming. This is a regular bidirectional link
> between client and server.
>
> Neither of these technologies needs a timer, not even "long polling"
>
> Stefan Bacherthttp://gwtworld.de
>
> On Jul 2, 11:25 am, Fendy Tjin  wrote:
>
>
>
> > Is there a way to automatically refresh the client side when ever
> > there are changes in the database without the timer on the client side.

-- 
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: auto refresh client side when ever there are changes in the database (without timer)

2010-07-04 Thread Fendy Tjin
Yes you are right... Can't wait for IE6.. Anyway, I've researched about this
comet and server push. I suppose this is the only way. Thanx a lot Srefan.
:)

On Sun, Jul 4, 2010 at 1:00 AM, Stefan Bachert wrote:

> Hi,
>
> You are lost when you are waiting on IE6 to get ready for new
> features ;-)
>
> There is a streaming implementation of comet. Maybe it supports your
> needs.
>
> http://code.google.com/p/gwt-comet/
>
> Stefan Bachert
> http://gwtworld.de
>
> On Jul 2, 8:35 pm, Fendy Tjin  wrote:
> > Thank you for the reply. But server push does not seem practical when
> > we can't flush the HTTP connection. Although they did explain how to
> > overcome it, however I require the HTTP connection to stay alive for I
> > will use it for a live graph presentation (similar to the stock graph
> > in yahoo finance.)
> >
> > I would like to know has every browser in fact support HTML5 already?
> > I think most of the users in the world are still using browsers with
> > HTML4 (Internet Explorer).
> >
> > Thank you,
> > Fendy Tjin
> >
> > On Jul 2, 10:49 pm, Stefan Bachert  wrote:
> >
> > > Hi,
> >
> > > there are some ways.
> >
> > > The buzz words are comet, server push, long poll.
> > > These techniques are requesting values from the server, but the server
> > > only fulfills the requests when datas are available.
> > > The effect is, the client will wait until the server has data.
> >
> > > With HTML5 is WebSockets coming. This is a regular bidirectional link
> > > between client and server.
> >
> > > Neither of these technologies needs a timer, not even "long polling"
> >
> > > Stefan Bacherthttp://gwtworld.de
> >
> > > On Jul 2, 11:25 am, Fendy Tjin  wrote:
> >
> > > > Is there a way to automatically refresh the client side when ever
> > > > there are changes in the database without the timer on the client
> side.
>
> --
> 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.
>
>

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



MVP multiple buttons/fields

2010-07-12 Thread Fendy Tjin
Hi, I would like to elegantly code my application. I am rather
confused as to how to code for multiple button/field.

such as: multiple delete buttons, or multiple update text fields

I have a working sample of it, however it is very messy and I would
like to know if there is any other way to do it.

Currently my code is as such:

SomePresenter.java

// some code
private void addStock(JsArray stocks) {
FlexTable viewStockTable = new FlexTable();
viewStockTable.removeAllRows();
viewStockTable.setText(0, 0, "Symbol");
viewStockTable.setText(0, 1, "Name");
viewStockTable.setText(0, 2, "Price");
viewStockTable.setText(0, 3, "Change");
viewStockTable.setText(0, 4, "Remove");
int row = 1;

for (int i = 0; i < stocks.length(); i++) {
  viewStockTable.setText(row, 0, stocks.get(i).getCode());
  viewStockTable.setText(row, 1, stocks.get(i).getName());
  viewStockTable.setText(row, 2, "$ " +
roundDouble(getPrice(stocks.get(i).getStockPrice(), 0), 2));
  viewStockTable.setText(row, 3,
roundDouble(getPriceChange(stocks.get(i).getStockPrice(), 0), 2) + "
%");
  Button removeButton = new Button("x");
  final String code = stocks.get(i).getCode();

//Here is the problem--
  removeButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
  deleteStock(code);
}
  });
//
  viewStockTable.setWidget(row, 4, removeButton);

  row++;
}
display.addStock(viewStockTable);
  }

SomeView.java

private DecoratorPanel leftPanel = new DecoratorPanel();
private VerticalPanel leftStack = new VerticalPanel();
private SimplePanel viewPanel = new SimplePanel();
private FlexTable viewStockTable = new FlexTable();

public HomeView() {
 //... some code

// assemble left panel
leftStack.add(addPanel);
viewPanel.add(viewStockTable);
leftStack.add(viewPanel);
leftPanel.add(leftStack);

//... some code
  }

//... some code

public void addStock(FlexTable table) {
viewPanel.clear();
viewPanel.add(table);
// -- Can't be done unless I put it in another container
like the panel ---
// viewStockPanel = table;
//
--
  }

My structure:
SomePresenter.java
  - addStock method - retrieve data from rpc then is creates the table
to view and pass the table to SomeView.java

I also do not like all the buttons are created in the view, if so what
is the point of MVP while I can also create them in Model and
Presenter alone. Since I created all the buttons in the Presenter,
when I pass the table to View, It can't be done with (viewStockTable =
table).

I do not like this is structured, is there another way to do it?

Thank you.

-- 
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 in subfolder

2010-10-03 Thread Fendy Tjin
Hi,

I have the same question, but I'm using Google Hosting which does
automatically when uploading to the host server. In this case, how do I move
it to a subfolder?

On Fri, Oct 1, 2010 at 7:37 PM, Артём  wrote:

> "myapp.html" is just an html file generated for you during the project
> creation.
> You can freely move to other place in the "war" folder.
>
> On Oct 1, 11:51 am, Reny  wrote:
> > Hi all,
> > with GWT I have created an admin interface for an application.
> > My GWT app responds athttp://localhost:/myapp.html?gwt.codesvr=
> 127.0.0.1:9997
> > ,it's all ok!
> >
> > My question is: in wich way I can configure that my app responds at
> >
> > http://localhost:/admin/myapp.html?gwt.codesvr=127.0.0.1:9997 ?
> >
> > I want that GWT compile all its code and files in subfolder admin.
> >
> > I'm using gwt Eclipse plugin.
> >
> > Thanks all!
>
> --
> 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.
>
>

-- 
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: TabLayoutPanel : How to add a "Add tab" icon in tab bar

2010-10-15 Thread Fendy Tjin
// Create a tab panel

DecoratedTabPanel tabPanel = new DecoratedTabPanel();
tabPanel.setWidth("400px");
tabPanel.setAnimationEnabled(true);

// Add a home tab
HTML homeText = new HTML("home blabla");
tabPanel.add(homeText, "home");

// Add button
Button normalButton = new Button(
"add", new ClickHandler() {
  public void onClick(ClickEvent event) {
// you might want to add fields for text and tabname
tabPanel.add(text, tabName);
  }
});


I did not test it but I think this should work.


Best Regards,

Fendy Tjin

On Fri, Oct 15, 2010 at 3:56 PM, Christophe <
christophe.march...@contactoffice.net> wrote:

> I would like to add an icon/button to tab bar, at the right of the
> last tab, like Firefox does.
>
> But, in TabLayoutPanel, tabBar is private with no accessor, and I
> can't find a way to add this.
>
> Any suggestion ?
>
> Regards,
> Crhistophe
>
> --
> 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.
>
>

-- 
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: TabLayoutPanel : How to add a "Add tab" icon in tab bar - Almost solved

2010-10-18 Thread Fendy Tjin
Hi Chris, yes, you can rely on CSS styling. Make sure your CSS is universal 
across browsers.

Best regards,
Fendy Tjin

On Oct 18, 2010, at 5:51 PM, Christophe  
wrote:

> I've done this : do you think I can rely on CSS style name ?
> 
> public abstract class TabLayoutPanelWithAddTabButton extends
> TabLayoutPanel implements ClickHandler {
> 
>public TabLayoutPanelWithAddTabButton(double barHeight, Style.Unit
> barUnit) {
>super(barHeight, barUnit);
>Image img = new Image();
>// we ar looking for tabBar to move it to the right
>double space = (barHeight-img.getHeight())/2.0;
>LayoutPanel panel = (LayoutPanel)getWidget();
>int widgetCount = panel.getWidgetCount();
>for (int i=0; iWidget w = panel.getWidget(i);
>if(w.getStyleName().equals("gwt-TabLayoutPanelTabs")) {
>panel.setWidgetLeftRight(w, img.getWidth()+2*space-6,
> Style.Unit.PX, 0, Style.Unit.PX);
>}
>}
>panel.insert(img, 0);
>panel.setWidgetLeftWidth(img, space, Style.Unit.PX,
> img.getWidth(), Style.Unit.PX);
>panel.setWidgetTopHeight(img, space, Style.Unit.PX,
> img.getHeight(), Style.Unit.PX);
>img.getElement().setTitle("Add a new tab");
>img.addClickHandler(this);
>}
> 
>@Override
>public void onClick(ClickEvent event) {
>addNewTab();
>}
> 
>/**
> * Implements this ta add a new Tab
> */
>public abstract void addNewTab();
> }
> 
> Regards,
> Christophe
> 
> On 15 oct, 18:36, Fendy Tjin  wrote:
>> // Create a tab panel
>> 
>> DecoratedTabPanel tabPanel = new DecoratedTabPanel();
>> tabPanel.setWidth("400px");
>> tabPanel.setAnimationEnabled(true);
>> 
>> // Add a home tab
>> HTML homeText = new HTML("home blabla");
>> tabPanel.add(homeText, "home");
>> 
>> // Add button
>> Button normalButton = new Button(
>> "add", new ClickHandler() {
>>       public void onClick(ClickEvent event) {
>> // you might want to add fields for text and tabname
>> tabPanel.add(text, tabName);
>>   }
>> });
>> 
>> I did not test it but I think this should work.
>> 
>> Best Regards,
>> 
>> Fendy Tjin
>> 
>> On Fri, Oct 15, 2010 at 3:56 PM, Christophe <
>> 
>> christophe.march...@contactoffice.net> wrote:
>>> I would like to add an icon/button to tab bar, at the right of the
>>> last tab, like Firefox does.
>> 
>>> But, in TabLayoutPanel, tabBar is private with no accessor, and I
>>> can't find a way to add this.
>> 
>>> Any suggestion ?
>> 
>>> Regards,
>>> Crhistophe
>> 
>>> --
>>> 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.
> 
> -- 
> 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.
> 

-- 
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: Client Vs Server and Google app engine

2010-10-19 Thread Fendy Tjin
Hi,

Well, I've made gwt app as well. What I do is creating two models, one in the 
server and another in the client package. 

You may want to look into spring roo framework. If you do not want to have 2 
models.

Best regards,
Fendy Tjin

On Oct 19, 2010, at 2:25 PM, Michel Uncini  wrote:

> Hello everybody
> 
> I'm developing a GWT project.
> I have two packets one .client and the other .server
> in my .gwt.xml I specified only the .client packet because in
> the .server I use google app engine.
> Let consider the class "Company" which has to be stored in the
> database I can't use it in the .client packet because it "use
> com.google.appengine" and is impossible to inherit right?
> So the only way if I want have a similar class in the .client packet
> is to create a new class similar to "Company" but without appengine
> fields??
> 
> Thank you!
> 
> 
> 
> -- 
> 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.
> 

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



newbie: GAE + Oauth + Open Id example

2010-10-30 Thread Fendy Tjin
Hi,

I've searched all over the places, what I found is that, I need to
redirect or forward to authenticate to Google account or other
accounts. However I am still puzzled as to how to implement oauth and
open id authentication.

Can anyone enlighten me as to how to implement?
While at it, can you please give me some GWT frontend with RPC code
and GAE server code?

Thank you,
Fendy Tjin

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



Oauth and open id

2010-11-02 Thread Fendy Tjin
Hi,

I've searched all over the places, what I found is that, I need to
redirect or forward to authenticate to Google account or other
accounts. And it seems it required me to save the token.

Am I in the right direction?

Thank you,
Fendy Tjin

-- 
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: Oauth and open id

2010-11-02 Thread Fendy Tjin
Can anyone give me some direction?

On Tue, Nov 2, 2010 at 2:15 PM, Fendy Tjin  wrote:

> Hi,
>
> I've searched all over the places, what I found is that, I need to
> redirect or forward to authenticate to Google account or other
> accounts. And it seems it required me to save the token.
>
> Am I in the right direction?
>
> Thank you,
> Fendy Tjin
>
> --
> 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.
>
>

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