Re: Hibernate session in RequestFactory

2012-08-26 Thread bond
Hi guys,
any ideas about my question?

Thanks very much

Il giorno giovedì 16 agosto 2012 00:57:02 UTC+2, bond ha scritto:

 Hi Thomas,
 thanks for your reply. My problem is not use or not use a Filter to solve 
 this problem. My problem is try to send exception caugth in 
 PersicensteFilter on the client. I need a per request session and 
 transaction.
 If my problem was only lazy inizialization of course this method is not 
 necessary. I've many entity with complex fields and when I persist, RF 
 calls automatically findById that raise 
 org.hibernate.NonUniqueObjectException: a different object with the same 
 identifier value was already associated with the session. So I need that 
 when I call a method on RF all go in a unique session and transaction.

 Thanks very much

 Daniele

 Il giorno martedì 14 agosto 2012 17:13:55 UTC+2, Thomas Broyer ha scritto:

 You're trying to solve the wrong problem. If you have an issue with lazy 
 loading, then load eagerly, do not extend your transaction lifetime.



-- 
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/-/lHqqwPQ2xc0J.
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: Hibernate session in RequestFactory

2012-08-26 Thread Thomas Broyer


On Thursday, August 16, 2012 12:57:02 AM UTC+2, bond wrote:

 Hi Thomas,
 thanks for your reply. My problem is not use or not use a Filter to solve 
 this problem. My problem is try to send exception caugth in 
 PersicensteFilter on the client. I need a per request session and 
 transaction.
 If my problem was only lazy inizialization of course this method is not 
 necessary. I've many entity with complex fields and when I persist, RF 
 calls automatically findById that raise 
 org.hibernate.NonUniqueObjectException: a different object with the same 
 identifier value was already associated with the session. So I need that 
 when I call a method on RF all go in a unique session and transaction.


If you cannot retrieve the same object twice in the same session (but 
different transactions), then fix that.
As an alternative, you can also override the isLive method of your Locators 
so that it doesn't rely on find().

But I reiterate my first answer: you're looking at the wrong problem.

-- 
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/-/FeeNtdRDSqkJ.
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: Hibernate session in RequestFactory

2012-08-26 Thread bond
Hi Thomas,
I already override isLive method and I return always true.

I can't understand if is possibile to create an Exception and send it to 
the client from the class PersistenceFilter. Forgetting for a moment the 
question of how I manage sessions with Hibernate, I would like to know how 
I can raise and send an exception to the client from the PersistenceFilter 
class ie outside the context of the request.

Thanks for your patience

Il giorno domenica 26 agosto 2012 12:55:56 UTC+2, Thomas Broyer ha scritto:



 On Thursday, August 16, 2012 12:57:02 AM UTC+2, bond wrote:

 Hi Thomas,
 thanks for your reply. My problem is not use or not use a Filter to solve 
 this problem. My problem is try to send exception caugth in 
 PersicensteFilter on the client. I need a per request session and 
 transaction.
 If my problem was only lazy inizialization of course this method is not 
 necessary. I've many entity with complex fields and when I persist, RF 
 calls automatically findById that raise 
 org.hibernate.NonUniqueObjectException: a different object with the same 
 identifier value was already associated with the session. So I need that 
 when I call a method on RF all go in a unique session and transaction.


 If you cannot retrieve the same object twice in the same session (but 
 different transactions), then fix that.
 As an alternative, you can also override the isLive method of your 
 Locators so that it doesn't rely on find().

 But I reiterate my first answer: you're looking at the wrong problem.


-- 
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/-/W0tngk8ye3MJ.
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: CellTable - add Anchors to a cell

2012-08-26 Thread Magnus
Hi Thomas!

FYI, that'd be even easier (and possibly faster) with UiRenderer. Event 
 handling would be much easier, unless you really need that command 
 identifier as a string approach.

 https://developers.google.com/web-toolkit/doc/latest/DevGuideUiBinder#Rendering_HTML_for_Cells


This is available in GWT 2.5 right? Until now I never thought about using 
release candidates and classes that are subject to change. Would it be a 
good idea to use GWT 2.5 RC now?

I use an enum now to represent these commands. But to attach them to a HTML 
tag the only way are attributes, and these are strings, or am I wrong?
 

 And as Juan Pablo said, you shouldn't use a for actions, use a button 
 or a span and style it like a link if you wish, but do not abuse a.


What's the problem with a?

Thanks
Magnus 

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



CellTable - Synchronization problem with AsyncDataProvider

2012-08-26 Thread Magnus
Hello,

I have a class UserListPanel, which shows a CellTable of users. When such 
a panel is created it initially shows all existing users.

The set of users in the list may be changed by calling a method 
setUserFilter, e. g. for selecting all users that match some criteria. 
Then, the list is reloaded by calling 
CellTable.setVisibleRangeAndClearData.

There is a problem, when setUserFilter is called immediately after class 
instantiation:

UserListPanel p = new UserListPanel ();
RootLayoutPanel.get().add(p);
UserFilter f = new UserFilter (some criteria);
Window.alert (Test);
p.setFilter (f); // has no effect, when Window.alert above is omitted

In this case, the call to setFilter has no effect, i. e. the list shows all 
users.

Note that within the AsyncDataProvider's onRangeChange a RPC call to the 
server is made in order to fetch data from the database.

I assume that there is a synchronization problem with the asynchronous 
calls and that they return in wrong order.
When I trace within onRangeChanged by opening a message box with 
Window.alert, it works fine.

I also tried to put the reload method into 
a Scheduler.get().scheduleDeferred, without success.

So I need to ensure that all open RPC calls have returned before the call 
to setFilter is made.
How can I do that?

I would appreciate any hints.

Thanks 
Magnus


public class UserListPanel extends AbsolutePanel
{
 private CellTableUserData  tbl;
 private AsyncDataProviderUserData  pvd;
 private UserFilter flt; // filter users to display

 public UserListPanel ()
 {
  ...
  initTable ();
 }
 
 private void initTable ()
 {
  ...
  tbl.setPageStart (0);
  tbl.setPageSize (PAGESIZE);
  
  pvd = new AsyncDataProviderUserData()
  {
   @Override
   protected void onRangeChanged(HasDataUserData display)
   {
Range r = display.getVisibleRange();
int start = r.getStart() + 1;
int end = start + r.getLength() - 1;

loadUserDataList (start,end);
   }
  };
   
  pvd.addDataDisplay(tbl);
  
  Pager p = getPager ();
  p.setDisplay(tbl);
  p.setRangeLimited(true);
 }

 public void loadUserDataList (int i0,int i1)
 {
  // call asynchronous service, which calls loadUserDataList below
 }
 
 @Override
 public void loadUserDataList (ListUserData lst)
 {
  if (lst == null)
   return;
  
  Pager pgr = getPager ();
  Range r = pgr.getDisplay().getVisibleRange();
  int start = r.getStart();

  pvd.updateRowData (start,lst);
 }

 public void setUserFilter (UserFilter flt)
 {
  this.flt = flt;
  reload ();
 }

 public void reload ()
 {
  Range r = tbl.getVisibleRange();
  tbl.setVisibleRangeAndClearData (r,true);
 }


}

-- 
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/-/bWo-uWRAhJsJ.
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: CellTable - Synchronization problem with AsyncDataProvider

2012-08-26 Thread Magnus
Hi,

I found out the following:

When the second call to onRangeChanged occurrs, there are fewer records in 
the list than visible rows in the CellTable!
The first rows are updated correctly, but the remaining visible rows are 
not cleared!

So there is probably no synchronization problem, but a display problem:
When after calling tbl.setVisibleRangeAndClearData there are fewer rows 
than visible rows, the remaining visible rows are not cleared.

When the data comes in it is pushed into the table by a call to 
provider.updateRowData.
At this moment: How can I ensure that the remaining rows are cleared and 
why does not CellTable clear them?

Thanks
Magnus

-- 
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/-/QgYigNKmui8J.
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: Hibernate session in RequestFactory

2012-08-26 Thread Thomas Broyer


On Sunday, August 26, 2012 2:20:20 PM UTC+2, bond wrote:

 Forgetting for a moment the question of how I manage sessions with 
 Hibernate, I would like to know how I can raise and send an exception to 
 the client from the PersistenceFilter class ie outside the context of the 
 request.


You have two choices:

   - Return anything but a 200 status code, to trigger a request transport 
   error on the server-side (handled by the RequestTransport on the 
   client-side; it's generally used for authentication, as in the Expenses and 
   Mobile Web App samples for instance)
   - Send back a general failure message. Use the 
MessageFactoryhttp://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/web/bindery/requestfactory/shared/messages/MessageFactory.htmlAutoBeanFactory
 to create the message and AutoBeanCodex to serialize it. 
   The message should consist of a ResponseMessage with a non-null 
   generalFailure ServerFailureMessage. The other properties can (should) be 
   null. The ServerFailureMessage properties map directly to the ServerMessage 
   properties passed to the onFailure of the various Receivers.

-- 
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/-/knwM0eJEeesJ.
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: CellTable - Synchronization problem with AsyncDataProvider

2012-08-26 Thread Thomas Broyer
You should call updateRowCount if the row count changes (such as when 
applying a filter)

On Sunday, August 26, 2012 3:42:26 PM UTC+2, Magnus wrote:

 Hi,

 I found out the following:

 When the second call to onRangeChanged occurrs, there are fewer records in 
 the list than visible rows in the CellTable!
 The first rows are updated correctly, but the remaining visible rows are 
 not cleared!

 So there is probably no synchronization problem, but a display problem:
 When after calling tbl.setVisibleRangeAndClearData there are fewer rows 
 than visible rows, the remaining visible rows are not cleared.

 When the data comes in it is pushed into the table by a call to 
 provider.updateRowData.
 At this moment: How can I ensure that the remaining rows are cleared and 
 why does not CellTable clear them?

 Thanks
 Magnus


-- 
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/-/wSx5KiOrrS4J.
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: Register your company if you are using GWT

2012-08-26 Thread Lindomir Avelar
Arcos, Brazil. Developping a vehicle tracking system

Em quinta-feira, 15 de março de 2012 03h40min37s UTC-3, Kanagaraj M 
escreveu:

 If you are using GWT for your projects/products, please register it in the 
 following link. so that we can see how many are using GWT.

 http://gwtreferencelist.appspot.com/  


-- 
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/-/DBn6TeNibdUJ.
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: CellTable - Synchronization problem with AsyncDataProvider

2012-08-26 Thread Magnus
Hi Thomas,

I tried to modify the reload method like this, but without success:

 public void reload ()
 {
  pvd.updateRowCount (0,true); // avoid to many visible rows
  
  Range r = tbl.getVisibleRange();
  tbl.setVisibleRangeAndClearData (r,true);
  
  loadRecordCount (); // asynchronously load the real record count
 }

Magnus

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



enable closure compiler

2012-08-26 Thread Deepak Singh
Hi All,

I migrated to GWT 2.5Rc1 and now i want to know the benefits of
closure-compiler which can now be passed as a compiler option.

Along with i am using gwtquery. Will it be beneficial to enable
closureCompiler ?

Thanks
Deepak Singh

-- 
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: SuggestBox implementation

2012-08-26 Thread Deepak Singh
But after selecting a value, how do i get the id of the selected value?

On Sun, Aug 26, 2012 at 4:42 AM, Jens jens.nehlme...@gmail.com wrote:

 Create a small class that contains key/value and implements Suggestion and
 then create a custom SuggestOracle for your SuggestBox to fetch suggestions
 from your server based on the search string.

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




-- 
Deepak Singh

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



Gin module binding using annotatedWith and AsyncProvider

2012-08-26 Thread Steve C
If I want to inject an instance of a specific class based on an annotation, 
I can do this in a Gin module:

bind(DiSecondary.class).annotatedWith(Special.class).to(DiSecondarySpecialImpl.class);

I also already have:

bind(DiSecondary.class).to(DiSecondaryImpl.class);

I can then retrieve the special instance into my DiMain (Composite wrapping 
a Panel) constructor with:

@Inject
public DiMain(@Special DiSecondary special) {
  add(special);
}

But, if I want to code-split DiSecondarySpecialImpl using AsyncProvider, 
the analogous approach does not work:

@Inject
public DiMainAsync(@Special final AsyncProviderDiSecondary 
diSecondaryProvider) {
  diSecondaryProvider.get(new AsyncCallbackDiSecondary() {
public void onFailure(Throwable caught) {}
public void onSuccess(DiSecondary result) {
  add(result);
}
  });
}

I get a GWT compiler error.  If I remove the annotation, then, of course, I 
get the non-special implementation.

Am I being unreasonable to expect that the compiler could apply the 
annotation to the async provider for the base class instead of the base 
class itself?

Is there a different route that I can use to get the desired behavior 
(annotation-based selection of an alternate async loaded class)?


-- 
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/-/B_PDh8TMfVwJ.
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: SuggestBox implementation

2012-08-26 Thread Jens
In your selection handler you have to cast the selected suggestion to your 
custom class.

-- 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/-/3smsZKiNoKwJ.
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: Gin module binding using annotatedWith and AsyncProvider

2012-08-26 Thread Thomas Broyer
You should ask on https://groups.google.com/d/forum/google-gin as the GWT 
Compiler is not involved in these decisions, only the GIN generator.

BTW, what's the error? Does it work if you don't use an AsyncProvider? 
(direct injection, or through a Provider)

And as a workaround / alternative, I suppose you could use a @Special 
ProviderDiSecondary and an explicit GWT.runAsync.

On Sunday, August 26, 2012 7:28:39 PM UTC+2, Steve C wrote:

 If I want to inject an instance of a specific class based on an 
 annotation, I can do this in a Gin module:


 bind(DiSecondary.class).annotatedWith(Special.class).to(DiSecondarySpecialImpl.class);

 I also already have:

 bind(DiSecondary.class).to(DiSecondaryImpl.class);

 I can then retrieve the special instance into my DiMain (Composite 
 wrapping a Panel) constructor with:

 @Inject
 public DiMain(@Special DiSecondary special) {
   add(special);
 }

 But, if I want to code-split DiSecondarySpecialImpl using AsyncProvider, 
 the analogous approach does not work:

 @Inject
 public DiMainAsync(@Special final AsyncProviderDiSecondary 
 diSecondaryProvider) {
   diSecondaryProvider.get(new AsyncCallbackDiSecondary() {
 public void onFailure(Throwable caught) {}
 public void onSuccess(DiSecondary result) {
   add(result);
 }
   });
 }

 I get a GWT compiler error.  If I remove the annotation, then, of course, 
 I get the non-special implementation.

 Am I being unreasonable to expect that the compiler could apply the 
 annotation to the async provider for the base class instead of the base 
 class itself?

 Is there a different route that I can use to get the desired behavior 
 (annotation-based selection of an alternate async loaded class)?




-- 
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/-/yk5j3nVbsiEJ.
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: SuggestBox implementation

2012-08-26 Thread Thomas Broyer


On Sunday, August 26, 2012 6:36:11 PM UTC+2, Deepak Singh wrote:

 But after selecting a value, how do i get the id of the selected value?


SuggestBox works best if you use the ID as the replacementString and the 
label as the displayString of the Suggestions in your SuggestOracle. In 
that case, you don't have to do anything, the ID will be set in the text 
box upon selecting a suggestion.
(e.g. the replacement string is an email address, and the display string 
also contains the full name, the oracle using both the full name and email 
address for providing suggestions)

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



UiBinder ERROR: Attribute 'from' does not have a computed value Element

2012-08-26 Thread jopaki
I get this error when trying to parse/compile my uiBinder LoginPanel.ui.xml:

Rebinding com.tll.client.ui.LoginPanel.LoginPanel2UiBinder
   Invoking generator com.google.gwt.uibinder.rebind.UiBinderGenerator
  [ERROR] Attribute 'from' does not have a computed value Element 
ui:text from='res.constants.loginTitle' (:45)
[ERROR] Deferred binding failed for 
'com.tll.client.ui.LoginPanel.LoginPanel2UiBinder'; expect subsequent 
failures

*LoginPanel.ui.xml*
!DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent;
ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder 
xmlns:g=urn:import:com.google.gwt.user.client.ui
  ui:with field='res' type='com.tll.client.ui.Resources' /
  g:HTMLPanel styleName=loginPanel
form ui:field=form action=post 
target={res.constants.formLoginTarget}
  div ui:field=title styleName=title
ui:text from=res.constants.loginTitle /
  /div
  div ui:field=statusMsg styleName=statusMsg/div
  table
tr
  td
label ui:field=lblUsername 
for={tbUsername.getElement.getId}
  ui:text from={res.constants.labelUsername} /
/label
  /td
...

*LoginPanel.java*
public class LoginPanel extends Composite implements ClickHandler, 
SubmitHandler {

private static LoginPanel2UiBinder uiBinder = 
GWT.create(LoginPanel2UiBinder.class);

interface LoginPanel2UiBinder extends UiBinderWidget, LoginPanel {
}

static enum Mode {
LOGIN,
FORGOT_PASSWORD,
}

Mode mode = Mode.LOGIN; // default

@UiField DivElement title;
@UiField DivElement statusMsg;

@UiField LabelElement lblUsername;
@UiField TextBox tbUsername;
@UiField LabelElement lblPassword;
@UiField PasswordTextBox tbPassword;
@UiField Anchor lnkTgl; // toggles btwn view modes
@UiField Button btnSubmit;
@UiField FormElement form;

/**
 * Because this class has a default constructor, it can be used as a binder
 * template. In other words, it can be used in other *.ui.xml files as
 * follows: ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder
 * xmlns:g=urn:import:**user's package**
 * g:**UserClassName**Hello!/g:**UserClassName /ui:UiBinder Note that
 * depending on the widget that is used, it may be necessary to implement
 * HasHTML instead of HasText.
 */
public LoginPanel() {
}
...


I can't for the life of me figure this out!  Pls help!

-Jon

-- 
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/-/PnMSkVOGXVAJ.
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: Gin module binding using annotatedWith and AsyncProvider

2012-08-26 Thread Steve C


On Sunday, August 26, 2012 1:43:09 PM UTC-4, Thomas Broyer wrote:

 You should ask on https://groups.google.com/d/forum/google-gin as the GWT 
 Compiler is not involved in these decisions, only the GIN generator.

 BTW, what's the error? Does it work if you don't use an AsyncProvider? 
 (direct injection, or through a Provider)

 And as a workaround / alternative, I suppose you could use a @Special 
 ProviderDiSecondary and an explicit GWT.runAsync.


I'll repost the original question there.

In the meantime:

1. It works fine without the AsyncProvider.

2. The error the compiler gives is: 

[ERROR] No implementation bound for 
Key[type=com.x.dep_inj.client.DiSecondary, 
annotation=@com.x.dep_inj.client.Async] and an implicit binding cannot be 
created because the type is annotated.

3. Thanks for the suggestion about the Provider. I had tried something 
along those lines, but couldn't figure out a way to get the callback to it. 
But, I've got a few more ideas on that now that are worth trying.

-- 
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/-/awUQpKosoBsJ.
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: CellTable - Synchronization problem with AsyncDataProvider

2012-08-26 Thread Alfredo Quiroga-Villamil
I have a similar post. I was trying to do something as simple as when
I click on a refresh button to completely clear my provider and
display the freshly received entities from the server. I haven't had
time to go back and look at it, but I would also be interested in
getting a definitive idea as to what the right approach for reloading
a CellTable should be. I not only want to get say 1000 rows and change
what gets displayed by manipulating the visible range. I am talking
about completely clearing my provider and repopulating it with freshly
received objects. I would think a simple clear() and add() in the
provider would do, but it doesn't seem to be that simple. The provider
clears and adds the new list of objects but the display never updates
it. I tried a handful of things to force a resync of the display and
nothing.

I read a whole lot of stuff online and there seems to be many people
confused in this area. I started to dive in also and investigate in
the code, but never finished it. There are a handful of methods that
all look similar but do different things.

My post can be found at:
https://groups.google.com/forum/?fromgroups=#!topic/google-web-toolkit/Qbkgk03-cTs

Any help will be greatly appreciated.

Alfredo

On Sun, Aug 26, 2012 at 10:55 AM, Magnus alpineblas...@googlemail.com wrote:
 Hi Thomas,

 I tried to modify the reload method like this, but without success:

  public void reload ()
  {
   pvd.updateRowCount (0,true); // avoid to many visible rows

   Range r = tbl.getVisibleRange();
   tbl.setVisibleRangeAndClearData (r,true);

   loadRecordCount (); // asynchronously load the real record count
  }

 Magnus

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

 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.



-- 
Alfredo Quiroga-Villamil

AOL/Yahoo/Gmail/MSN IM:  lawwton

-- 
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: SuggestBox implementation

2012-08-26 Thread Deepak Singh
Hi,

I tried this way

public class CustomSuggestion implements Suggestion{
 public CityNameDTO dto = null;
 public CustomSuggestion(CityNameDTO dto) {
this.dto = dto;
}
 @Override
public String getDisplayString() {
 return dto.getCityName();
}

@Override
public String getReplacementString() {
 return dto.getCityId();
}

}


public class CustomSuggestOracle extends SuggestOracle{

ListCustomSuggestion citySugggestions = null;
 @Override
public void requestSuggestions(Request request, Callback callback) {
 Response response  = new Response(getMatchingCities(request.getQuery(),
request.getLimit()));
}
 private ListCustomSuggestion getMatchingCities(String query, int limit) {
 ListCustomSuggestion list = new ArrayListCustomSuggestion();
 }
}


Now i am not able to understand how to go ahead with this
customSuggestOracle.

Could you pls guide me here?

Thanks
Deepak

On Sun, Aug 26, 2012 at 11:18 PM, Thomas Broyer t.bro...@gmail.com wrote:



 On Sunday, August 26, 2012 6:36:11 PM UTC+2, Deepak Singh wrote:

 But after selecting a value, how do i get the id of the selected value?


 SuggestBox works best if you use the ID as the replacementString and the
 label as the displayString of the Suggestions in your SuggestOracle. In
 that case, you don't have to do anything, the ID will be set in the text
 box upon selecting a suggestion.
 (e.g. the replacement string is an email address, and the display string
 also contains the full name, the oracle using both the full name and email
 address for providing suggestions)

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

 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.




-- 
Deepak Singh

-- 
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: enable closure compiler

2012-08-26 Thread Sergey


 use -XenableClosureCompiler option.


-- 
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/-/0eIURq10NvwJ.
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: CellTable - add Anchors to a cell

2012-08-26 Thread twoseven
Here is some code for adding multiple anchors to cell with attribute as a 
command-

http://rowsandcolumns.blogspot.com/2012/08/gwt-celltable-add-multiple-anchors-to.html

It uses a  tags for actions, maybe you can change to something else and 
style it.

-- 
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/-/OJNpA_0VZN4J.
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: enable closure compiler

2012-08-26 Thread Deepak Singh
enabling the closure compiler gives following exception (GWT2.5Rc1)

 [ERROR] Unexpected internal compiler error
java.lang.IllegalStateException: Expected non-empty string. Reference node
STRING
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator$1.handleViolation(AstValidator.java:51)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.violation(AstValidator.java:763)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateNonEmptyString(AstValidator.java:328)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateObjectLiteralKeyName(AstValidator.java:739)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateObjectLitStringKey(AstValidator.java:726)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateObjectLitKey(AstValidator.java:683)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateObjectLit(AstValidator.java:670)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateExpression(AstValidator.java:252)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateObjectLitStringKey(AstValidator.java:727)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateObjectLitKey(AstValidator.java:683)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateObjectLit(AstValidator.java:670)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateExpression(AstValidator.java:252)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateAssignmentExpression(AstValidator.java:603)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateExpression(AstValidator.java:219)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateVar(AstValidator.java:399)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateStatement(AstValidator.java:123)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateBlock(AstValidator.java:280)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateFunctionExpression(AstValidator.java:363)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateExpression(AstValidator.java:268)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateCall(AstValidator.java:377)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateExpression(AstValidator.java:260)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateExprStmt(AstValidator.java:476)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateStatement(AstValidator.java:126)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateBlock(AstValidator.java:280)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateFunctionStatement(AstValidator.java:355)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateStatement(AstValidator.java:102)
at
com.google.gwt.thirdparty.javascript.jscomp.AstValidator.validateScript(AstValidator.java:89)
at
com.google.gwt.dev.js.ClosureJsAstTranslator.translate(ClosureJsAstTranslator.java:127)
at
com.google.gwt.dev.js.ClosureJsRunner.createClosureJsAst(ClosureJsRunner.java:273)
at
com.google.gwt.dev.js.ClosureJsRunner.createClosureModule(ClosureJsRunner.java:284)
at
com.google.gwt.dev.js.ClosureJsRunner.createClosureModules(ClosureJsRunner.java:293)
at com.google.gwt.dev.js.ClosureJsRunner.compile(ClosureJsRunner.java:185)
at
com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.generateJavaScriptCode(JavaToJavaScriptCompiler.java:1035)
at
com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.compilePermutation(JavaToJavaScriptCompiler.java:462)
at com.google.gwt.dev.jjs.UnifiedAst.compilePermutation(UnifiedAst.java:134)
at com.google.gwt.dev.CompilePerms.compile(CompilePerms.java:195)
at
com.google.gwt.dev.ThreadedPermutationWorkerFactory$ThreadedPermutationWorker.compile(ThreadedPermutationWorkerFactory.java:49)
at
com.google.gwt.dev.PermutationWorkerFactory$Manager$WorkerThread.run(PermutationWorkerFactory.java:73)
at java.lang.Thread.run(Thread.java:619)
  [ERROR] Unrecoverable exception, shutting down
com.google.gwt.core.ext.UnableToCompleteException: (see previous log
entries)
at
com.google.gwt.dev.javac.CompilationProblemReporter.logAndTranslateException(CompilationProblemReporter.java:96)
at
com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.compilePermutation(JavaToJavaScriptCompiler.java:503)
at com.google.gwt.dev.jjs.UnifiedAst.compilePermutation(UnifiedAst.java:134)
at com.google.gwt.dev.CompilePerms.compile(CompilePerms.java:195)
at
com.google.gwt.dev.ThreadedPermutationWorkerFactory$ThreadedPermutationWorker.compile(ThreadedPermutationWorkerFactory.java:49)
at
com.google.gwt.dev.PermutationWorkerFactory$Manager$WorkerThread.run(PermutationWorkerFactory.java:73)
at java.lang.Thread.run(Thread.java:619)
  [ERROR] Not all permutation were compiled , completed (2/6)


On Mon, Aug 27, 2012 at 2:54 AM, Sergey gwtusergr...@gmail.com wrote:

 use -XenableClosureCompiler option.

  --
 You received 

UiBinder ERROR: Attribute 'from' does not have a computed value Element

2012-08-26 Thread Thomas Broyer
As the error says, 'from' expects a computed value: ui:text 
from='{res.constants.loginTitle}'

(Note Element is not part of the error message, but the element's 
serialization)

-- 
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/-/outKCq_RikAJ.
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: DART vs. GWT

2012-08-26 Thread b0b


On Wednesday, 22 August 2012 17:57:42 UTC+2, deepak chauhan wrote:

 One question is disturbing me from a long time. Why Google invented DART, 
 when GWT is already there?


To have one more project to can in a few months/years, instead of puting 
all resources behind GWT. 

-- 
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/-/xqMAsxzeLD0J.
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: UiBinder ERROR: Attribute 'from' does not have a computed value Element

2012-08-26 Thread jopaki
Thank you for the reply.   Yes embarasingly I missed the { }.  I fixed and 
works.  One more question: When will com.google.gwt.i18n.Constants be 
usable in a ui.xml file ??  AFAICT, only TextResources are available !  Am 
I missing something?

thanks, Jon

On Sunday, August 26, 2012 10:51:08 AM UTC-7, jopaki wrote:

 I get this error when trying to parse/compile my uiBinder 
 LoginPanel.ui.xml:

 Rebinding com.tll.client.ui.LoginPanel.LoginPanel2UiBinder
Invoking generator com.google.gwt.uibinder.rebind.UiBinderGenerator
   [ERROR] Attribute 'from' does not have a computed value Element 
 ui:text from='res.constants.loginTitle' (:45)
 [ERROR] Deferred binding failed for 
 'com.tll.client.ui.LoginPanel.LoginPanel2UiBinder'; expect subsequent 
 failures

 *LoginPanel.ui.xml*
 !DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent;
 ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder 
 xmlns:g=urn:import:com.google.gwt.user.client.ui
   ui:with field='res' type='com.tll.client.ui.Resources' /
   g:HTMLPanel styleName=loginPanel
 form ui:field=form action=post 
 target={res.constants.formLoginTarget}
   div ui:field=title styleName=title
 ui:text from=res.constants.loginTitle /
   /div
   div ui:field=statusMsg styleName=statusMsg/div
   table
 tr
   td
 label ui:field=lblUsername 
 for={tbUsername.getElement.getId}
   ui:text from={res.constants.labelUsername} /
 /label
   /td
 ...

 *LoginPanel.java*
 public class LoginPanel extends Composite implements ClickHandler, 
 SubmitHandler {

 private static LoginPanel2UiBinder uiBinder = 
 GWT.create(LoginPanel2UiBinder.class);

 interface LoginPanel2UiBinder extends UiBinderWidget, LoginPanel {
 }

 static enum Mode {
 LOGIN,
 FORGOT_PASSWORD,
 }

 Mode mode = Mode.LOGIN; // default

 @UiField DivElement title;
 @UiField DivElement statusMsg;

 @UiField LabelElement lblUsername;
 @UiField TextBox tbUsername;
 @UiField LabelElement lblPassword;
 @UiField PasswordTextBox tbPassword;
 @UiField Anchor lnkTgl; // toggles btwn view modes
 @UiField Button btnSubmit;
 @UiField FormElement form;

 /**
  * Because this class has a default constructor, it can be used as a binder
  * template. In other words, it can be used in other *.ui.xml files as
  * follows: ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder
  * xmlns:g=urn:import:**user's package**
  * g:**UserClassName**Hello!/g:**UserClassName /ui:UiBinder Note that
  * depending on the widget that is used, it may be necessary to implement
  * HasHTML instead of HasText.
  */
 public LoginPanel() {
 }
 ...


 I can't for the life of me figure this out!  Pls help!

 -Jon


-- 
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/-/ZLNRXJwX_VgJ.
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: UiBinder ERROR: Attribute 'from' does not have a computed value Element

2012-08-26 Thread jopaki
I know that one can take the  
DevGuideUiBinderI18nhttps://developers.google.com/web-toolkit/doc/latest/DevGuideUiBinderI18n
  
approach but this seems like such overkill.  I merely want to leverage 
constants in a properties file directly in a ui.xml file.

On Sunday, August 26, 2012 4:47:13 PM UTC-7, jopaki wrote:

 Thank you for the reply.   Yes embarasingly I missed the { }.  I fixed and 
 works.  One more question: When will com.google.gwt.i18n.Constants be 
 usable in a ui.xml file ??  AFAICT, only TextResources are available !  Am 
 I missing something?

 thanks, Jon

 On Sunday, August 26, 2012 10:51:08 AM UTC-7, jopaki wrote:

 I get this error when trying to parse/compile my uiBinder 
 LoginPanel.ui.xml:

 Rebinding com.tll.client.ui.LoginPanel.LoginPanel2UiBinder
Invoking generator com.google.gwt.uibinder.rebind.UiBinderGenerator
   [ERROR] Attribute 'from' does not have a computed value Element 
 ui:text from='res.constants.loginTitle' (:45)
 [ERROR] Deferred binding failed for 
 'com.tll.client.ui.LoginPanel.LoginPanel2UiBinder'; expect subsequent 
 failures

 *LoginPanel.ui.xml*
 !DOCTYPE ui:UiBinder SYSTEM http://dl.google.com/gwt/DTD/xhtml.ent;
 ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder 
 xmlns:g=urn:import:com.google.gwt.user.client.ui
   ui:with field='res' type='com.tll.client.ui.Resources' /
   g:HTMLPanel styleName=loginPanel
 form ui:field=form action=post 
 target={res.constants.formLoginTarget}
   div ui:field=title styleName=title
 ui:text from=res.constants.loginTitle /
   /div
   div ui:field=statusMsg styleName=statusMsg/div
   table
 tr
   td
 label ui:field=lblUsername 
 for={tbUsername.getElement.getId}
   ui:text from={res.constants.labelUsername} /
 /label
   /td
 ...

 *LoginPanel.java*
 public class LoginPanel extends Composite implements ClickHandler, 
 SubmitHandler {

 private static LoginPanel2UiBinder uiBinder = 
 GWT.create(LoginPanel2UiBinder.class);

 interface LoginPanel2UiBinder extends UiBinderWidget, LoginPanel {
 }

 static enum Mode {
 LOGIN,
 FORGOT_PASSWORD,
 }

 Mode mode = Mode.LOGIN; // default

 @UiField DivElement title;
 @UiField DivElement statusMsg;

 @UiField LabelElement lblUsername;
 @UiField TextBox tbUsername;
 @UiField LabelElement lblPassword;
 @UiField PasswordTextBox tbPassword;
 @UiField Anchor lnkTgl; // toggles btwn view modes
 @UiField Button btnSubmit;
 @UiField FormElement form;

 /**
  * Because this class has a default constructor, it can be used as a 
 binder
  * template. In other words, it can be used in other *.ui.xml files as
  * follows: ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder
  * xmlns:g=urn:import:**user's package**
  * g:**UserClassName**Hello!/g:**UserClassName /ui:UiBinder Note 
 that
  * depending on the widget that is used, it may be necessary to implement
  * HasHTML instead of HasText.
  */
 public LoginPanel() {
 }
 ...


 I can't for the life of me figure this out!  Pls help!

 -Jon



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



SimplePager last page issue

2012-08-26 Thread Juan Pablo Gardella
Hi,

There is a bug with SimplePager that enable go to next page in the last
page (an must be disabled). Well, after some debugging if I change the
method onRangeOrRowCountChanged() in this way works well.

@Override
  protected void onRangeOrRowCountChanged() {
HasRows display = getDisplay();
label.setText(createText());

// Update the prev and first buttons.
setPrevPageButtonsDisabled(!hasPreviousPage());

// Update the next and last buttons.
//if (isRangeLimited() || !display.isRowCountExact()) {
if (isRangeLimited() || *display.isRowCountExact()*) {
  setNextPageButtonsDisabled(!hasNextPage());
  setFastForwardDisabled(!hasNextPages(getFastForwardPages()));
}
  }

As see, I remove ! in display.isRowCountExact() and works. Hope helps
someone.

Juan

-- 
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 Frame Load Wrong Page in IE 8 (Different Than The URL Showed In URL Toolbar)

2012-08-26 Thread the.wizard
Hello everyone,
I have a GWT Application that use couple of GWT Frame to load other site 
content. Let say in the left side of my application I have tree menu, and 
every time user click one of those menu, it will open a new tab in the 
right side of my application, and in the tab item, it will load other site 
content. Let say first I click tree menu A1, the application then open a 
new tab item in the right site with URL 
http://application.first.com/first.aspx. After that I click the other tree 
menu B1, the application then open a new tab item in the right side with 
URL http://application.first.com/second.aspx. After that, I hit the F5 key, 
and the browser reload again. Then I repeat the step from the beginning, 
when I click tree menu A1, the application open a new tab item in the right 
side, but the content that loaded is from 
http://application.first.com/second.aspx, but when I do right click in the 
frame area, it will show me that the currently accessed URL is 
http://application.first.com/first.aspx.
Have anyone ever experience this problem? Because I really stuck in here, 
the other major browser working just fine (FF and Chrome), only IE 8 that 
give me this problem. Any comment and advice will be appreciated.
Thanks.

Regards,
the.wizard

-- 
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/-/FeHtZfdQhUAJ.
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: CellTable - Synchronization problem with AsyncDataProvider

2012-08-26 Thread Magnus
Hello,

I found this interesting article:
http://turbomanage.wordpress.com/2011/03/02/gwt-2-2-asyncdataprovider-celltable-gotcha/

It also states that one should always update both row count and row data. 
But when looking to the code in the article, it seems that the author 
assumes that AsyncDataProvider.updateRowCount expects the number of 
*visible* rows. My understanding is that it expects the number of *total* 
rows. Is this correct?

However, I cannot call both at the same time with the exact values. I have 
to make two different RPC calls, one for the data in onRangeChanged, and 
one to fetch the total record count.
As I posted before, I call updateRowCount(0) on reload, just to be sure 
that old rows disappear. Later, when the RPC call for the row count 
returns, I call updateRowCount with the exact number.

Unfortunately the old rows still remain visible after reload...

Magnus

-- 
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/-/N1_-jnTTfmAJ.
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: UiBinder ERROR: Attribute 'from' does not have a computed value Element

2012-08-26 Thread Thomas Broyer


On Monday, August 27, 2012 1:47:13 AM UTC+2, jopaki wrote:

 Thank you for the reply.   Yes embarasingly I missed the { }.  I fixed and 
 works.  One more question: When will com.google.gwt.i18n.Constants be 
 usable in a ui.xml file ??  AFAICT, only TextResources are available !  Am 
 I missing something?


What's wrong with ui:with field=myConstants 
type=com.example.myproject.client.MyConstants / and ui:text 
from={myConstants.foo} / ? 

-- 
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/-/7_HoE4a7YmQJ.
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: UiBinder ERROR: Attribute 'from' does not have a computed value Element

2012-08-26 Thread jopaki
An compile error like can't implement the constants interface:  It must
implement TextResource or _.  I forget the other type the error states.

My semantics here are:

interface MyResources extends ClientBundle {

  @Source(MyConstants.properties)
  MyConstants constants();

}

where MyConstants interface is auto-generated via the gwt-maven-plugin.

I'm on 2.4

On Sun, Aug 26, 2012 at 10:39 PM, Thomas Broyer t.bro...@gmail.com wrote:



 On Monday, August 27, 2012 1:47:13 AM UTC+2, jopaki wrote:

 Thank you for the reply.   Yes embarasingly I missed the { }.  I fixed
 and works.  One more question: When will com.google.gwt.i18n.Constants be
 usable in a ui.xml file ??  AFAICT, only TextResources are available !  Am
 I missing something?


 What's wrong with ui:with field=myConstants
 type=com.example.myproject.client.MyConstants / and ui:text
 from={myConstants.foo} / ?

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




-- 
-jpk-

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