Re: custom event + event bubbling

2011-06-25 Thread ashwin.desi...@gmail.com
for listening on events on your widget you can define UiHandler or Attach /
Add handlers

for example, if you have a button defined in your UIBinder

Hello

now if you want to listen on click event of this button, you can do either
of these two operations

@UiHandler("button1")
public void OnButton1Click(ClickEvent event) {
 ///do what ever you want on button click
}

when you are not using a UiBinder you can define

button1.addClickHandler(new ClickHandler() {
 @Override
public void onClick(ClickEvent arg0) {
//do your opertaions
}
})


hope this is clear.

Thanks
Ashwin

On Sun, Jun 26, 2011 at 4:40 AM, isern  wrote:

> I come from the Flex/JS/Tapestry worlds and a technique commonly used
> is to attach listeners to certain events expecting they'll will go up
> like a bubble through the component hierarchy. Actually if I'm not
> wrong this kind of behavior also occurs with native hardware events in
> GWT.
>
> A typical example is the Accept/Cancel widget. It's a widget because
> it's repeated all over the application.
>
> To reduce coupling to a minimum, I'd like to listen to the events
> "accept" and "cancel" on the current widget (that contains accept/
> cancel directly or indirectly), being aware that if users click
> "accept" the event will be caught and what you do depends on that
> context (UI structure)
>
> The EventBus is okay, but it doesn't seem to take into account this
> component hierarchy, all the event handlers are notified without
> discrimination.
>
> I've managed, however, to create a BubbledEvent/BubbledEventHandler
> that only is dispatched if the current listener (a visual widget) is a
> parent of that which triggered it.
>
> I hope I was clear,
>
> Best regards, Juan
>
> On Jun 25, 3:34 am, Ashwin Desikan  wrote:
> > what sort of events are you looking to capture? You can create custom
> events
> > and register those events with the eventBus. When ever that event occurs
> all
> > handlers would receive a notification and you can take necessary action.
> >
> > Thanks
> > Ashwin
>
> --
> 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.
>
>

-- 
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: Problem with Deploying GWT 2.3 Samples in Eclipse (*Expenses)

2011-06-26 Thread ashwin.desi...@gmail.com
try importing them as Maven Project in eclipse.

~Ashwin

On Sun, Jun 26, 2011 at 1:51 PM, saurabh saurabh wrote:

> Hi all,
>I am going through Sample applications that comes with GWT 2.3
> plugin. There is problem with these samples that you can't simply
> import them in eclipse. Eclipse do not recognize em as a project. So
> till now what I do is to make a gwt project in eclipse and copy paste
> the source code there maintaining the package structure. Anyway one of
> application 'Expenses' comes with really a very different package
> structure. So I am a bit confused about its deployment. I am trying
> here anyway to get it but any suggestion or link for its explanation/
> deployment or demo will be a great Time saver.
>
> Thanks in advance
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
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: No source code is available for type com.google.gwt.user.server.rpc.RemoteServiceServlet; did you forget to inherit a required module?

2011-06-26 Thread ashwin.desi...@gmail.com
Nicolas,

The first this I can think of is in your module definition you have not
included the path



Your UserServiceImpl is defined in your server package but you don't have
that included in the module.

Try adding that.

Regards
Ashwin

On Mon, Jun 27, 2011 at 12:12 PM, Zgouingo  wrote:

> Well, I still have my problem. I spent quite a lot of time on this. I
> can't understand why it's impossible to compile. If anyone has an
> idea, I would thank him/her for eternity +15 days.
> Thanks a lot.
> Nicolas
>
>
>
> On 17 juin, 13:17, Zgouingo  wrote:
> > Hello everyone,
> >
> > I know there has already been some subjects about this kind of error,
> > but this time I honnestly can't understand what's happening.
> > Let me introduce my project :
> > I'm just beginning in the world of GWT.
> > I followed some tutorials, and I try to do a RPC exchange in my
> > project.
> > I succeeded in adapting the RPC model into the StockWatcher example
> > project, but in my personnal project, it won't work.
> >
> > I get this message :
> > "No source code is available for type
> > com.google.gwt.user.server.rpc.RemoteServiceServlet; did you forget to
> > inherit a required module?" on the following line of my server
> > implementation of the RPC system :
> > public class UserInfoServiceImpl extends RemoteServiceServlet
> > implements UserInfoService {
> >
> > As you can see, the ServiceImpl class extends RemoteServiceServlet,
> > and he seems to be unable to find the source.
> >
> > Here is my gwt.xml :
> >
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >  > class="com.msa.logoexpress.server.UserInfoServiceImpl"/>
> > 
> >
> > I tried with and without the  line, and it does the
> > same.The same architecture worked for the stockwatcher project, and
> > there I have no idea of what's wrong.
> >
> > What could be the problem ? Any idea ?
> > Thank you very much
> > Nicolas
>
> --
> 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.
>
>

-- 
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: RequestFactory object lifecycle & change propagation

2011-06-28 Thread ashwin.desi...@gmail.com
J,

did you look at EntityProxyChange.registerForProxyType ? You can use this
and register for any changes to your entities with the eventBus. The Handler
method is called on change of entities (especially version changes).

example:

EntityProxyChange.registerForProxyType(eventBus, UserContactsProxy.class,
new EntityProxyChange.Handler() {

@Override
public void onProxyChange(
EntityProxyChange arg0) {

  proxyId =
arg0.getProxyId()
 //data has changed, so fetch the contact again
fetchUserContact(prxoyId);
}
});

Regards
Ashwin

On Wed, Jun 29, 2011 at 2:29 AM, isern  wrote:

> Hi people,
>
> Since I'm new to GWT in general and RequestFactory in particular I
> resort to your experience, cause I'm trying to find out what's the
> best way to solve a problem, that has an impact on my application as a
> whole, regarding RequestFactory, and I couldn't find a previous
> discussion about it.
>
> I have a master/detail, typical CRUD manager where I edit contacts.
> Since those contacts rarely surpass 200 or so I thought it was okay to
> load them at start time, just like GMail does.
>
> So, I keep them in a singleton ModelLocator, and to render my contact
> CRUD and use contacts everywhere in my application I use that
> reference. Like, for instance, from a CellTable.
>
> Now, when I'm editing one of those contacts, I invoke request.edit()
> so that the changes are tracked in the context of the current request,
> and finally .fire(). The remote service method gets called and
> everything works fine.
>
> The moment after doing so, I notice that I must refresh somehow
> ModelLocator.contacts because it points to an element that now is
> stale, it didn't get noticed about the edition.
>
> In an ideal world, I'd like to think of the original RequestFactory
> pretty much like a Hibernate session and merge the successful save()
> request into the original getContacts() request, so that the original
> proxies get updated and finally have just one copy of the data. But as
> far as I've seen RequestContexts objects have a rather short
> lifecycle.
>
> So, I think most people using RF should have faced the same situation,
> what is the best possible solution to this?
>
>
> Thanks a lot, and I'd greatly appreciate your help
>
> J.
>
>
>
>
>
> --
> 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.
>
>

-- 
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: ActionCells within a CompositeCell not receiving onBrowserEvent()

2011-06-28 Thread ashwin.desi...@gmail.com
Are you following the exact sample? or are you using the CompositeCell in
your own project?

Can you paste the code where you are associating your CompositeCell with a
table or CellList

~Ashwin

On Wed, Jun 29, 2011 at 9:42 AM, Daniel Johnston wrote:

> Thanks for the help Ashwin, but I checked the import,
> com.google.gwt.dom.client.Element, and its correct, however the
> ActionCells within the CompositeCell are still not receiving the
> onBrowserEvent()  .
>
>
>
> On Tue, Jun 28, 2011 at 6:58 PM, Ashwin Desikan 
> wrote:
>
>> Daniel,
>>
>> Check your import statement for the Element class. Thus should be using
>> the .dom.Element package and not .client
>>
>> Most probably that would be the issue for onbrowserEvent not getting
>> invoked
>>
>> Thanks
>> Ashwin
>>
>> Sent from my iPhone
>>
>> On Jun 28, 2011, at 10:46 PM, Daniel Johnston 
>> wrote:
>>
>> The ActionCell's onBrowserEvent() methods are not called.  Is there
>> something I need to override in the CompositeCell or ConsumedEvents to make
>> this work?
>>
>> Below my example code, based on the Sample 
>> 
>> http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellTree  
>>
>>
>> // Construct a composite cell for actions
>>
>> List> hasCells = new ArrayList>();
>>
>> hasCells.add(new HasCell() {
>>
>>
>> private ActionCell cell = new ActionCell(
>>
>> SafeHtmlUtils
>>
>> .fromTrustedString(Utils.makeImage(deleteIcon)),
>>
>> new ActionCell.Delegate() {
>>
>>
>> @Override
>>
>> public void execute(Item item) {
>>
>> listener.onDeleteClicked(item);
>>
>>
>> }
>>
>> });
>>
>>
>>  public Cell getCell() {
>>
>> return cell;
>>
>> }
>>
>>
>> public FieldUpdater getFieldUpdater() {
>>
>> return null;
>>
>> }
>>
>>
>> public Item getValue(Item item) {
>>
>>  return item;
>>
>> }
>>
>> });
>>
>>
>> hasCells.add(new HasCell() {
>>
>>
>> private ActionCell cell = new ActionCell(
>>
>> SafeHtmlUtils.fromTrustedString(Utils.makeImage(editIcon)),
>>
>> new ActionCell.Delegate() {
>>
>>
>> @Override
>>
>> public void execute(Item item) {
>>
>> listener.onEditClicked(item);
>>
>>
>> }
>>
>> });
>>
>>
>> public Cell getCell() {
>>
>> return cell;
>>
>> }
>>
>>
>> public FieldUpdater getFieldUpdater() {
>>
>> return null;
>>
>> }
>>
>>
>> public Item getValue(Item item) {
>>
>> return item;
>>
>> }
>>
>> });
>>
>>
>> CompositeCell actionsCell = new CompositeCell(
>>
>> hasCells) {
>>
>> @Override
>>
>> public void render(Context context, Item value,
>>
>>  SafeHtmlBuilder sb) {
>>
>> sb.appendHtmlConstant("");
>>
>> super.render(context, value, sb);
>>
>> sb.appendHtmlConstant("");
>>
>> }
>>
>>
>> @Override
>>
>> protected Element getContainerElement(Element parent) {
>>
>> // Return the first TR element in the table.
>>
>> return parent.getFirstChildElement().getFirstChildElement()
>>
>> .getFirstChildElement();
>>
>> }
>>
>>
>>  @Override
>>
>> protected  void render(Context context, Item value,
>>
>>  SafeHtmlBuilder sb, HasCell hasCell) {
>>
>> Cell cell = hasCell.getCell();
>>
>> sb.appendHtmlConstant("");
>>
>> cell.render(context, hasCell.getValue(value), sb);
>>
>> sb.appendHtmlConstant("");
>>
>> }
>>
>>  };
>>
>>
>>
>> Thanks in advance
>>
>> ---
>> -Daniel Johnston
>>
>> --
>> 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.
>>
>>  --
>> 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.
>>
>
>
>
> --
> -Daniel Johnston
>
> --
> 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.
>

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



RequestContext & GAE EntityGroups?

2011-06-29 Thread ashwin.desi...@gmail.com
Hello,

I am building a project where I have a datamodel as shown below.


A {

@Transient

B b;


@Transient

C c;


}

//there are few more params, just showing the basic structure
B {

String title;
Set child;

}

C {

//set of keys is stored
Set d;
Set count;

}

D {

String name;
String country;

}

As I am using Spring-Roo for generating my entites it automatically only
store only keys/ primary id's of the referencing entities.

All entities are rendered using custom widgets. I am using Editor frramework
to edit the entities.

On my parent View (which displays Entity A), I have a save button, on click
I persists all the children (B, C) and the parent  Currently I make
individual calls to persist each entity set in the datastore.

I have two challenges

1. Can I combine the request to persist all of these entities into a single
call using entitygroups? Can this be achieved using RequestContext &
RequestFactory framework. Any advice/ suggestions would be much appreciated

2. If I go with my current approach of saving all entities separately, even
though it works well, the implementation becomes messy when I have to
re-edit the Objects. for example, I had to display details of Object A in my
home page, so I fetched A from datastore, while doing so I used the with
clause as below

requestContext.findAllA().with("b")

now if I pass this retrieved proxy to the editor framework, it not only sets
the object A to edit mode, it also sets the Object B to edit. Without entity
groups, I cannot persist any changes to B along with A. The only way for me
to save B (using my current approach to save entities separately) is to use
AutoBeanUtils and freeze the entity B, dis-associate the requestContext
reference and re-edit it using a different requestContext.

This approach works, but i feel its messy and there should be a better and
cleaner approach to achieve data persistance.


Appreciate all your advice/ suggestions.

Thanks
Ashwin

-- 
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: RequestFactory and populate form field with dynamic data

2011-06-29 Thread ashwin.desi...@gmail.com
you should be able to dynamically populate a drop list using requestFactory.
Once you fetch the data from the server, you can update your list.

The only instance where you would have to build a custom widget is when you
want to dynamically populate a SelectionCell with your dynamic data. For
that you can refer to the following link

http://stackoverflow.com/questions/4565790/how-to-dynamically-update-the-choices-in-a-selectioncell-using-gwt

Thanks
Ashwin

On Wed, Jun 29, 2011 at 7:14 PM, ungarida  wrote:

> Hi all,
> I'm studying new RequestFactory framework and I have a big doubt.
> If the RequestFactory is stricly associated with a single Entity,
> which is the best way transmit dynamic data to populate form fields
> with default values?
>
> For example I want to fill a drop down list, I can not use
> RequestFactory to load all data. Should I use RPC?
>
> --
> 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.
>
>

-- 
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: Making a button fire inside a custom AbstractCell

2011-06-29 Thread ashwin.desi...@gmail.com
 you have not specified the events you want your cell to consume. You will
have to add a constructor and specify the events you want  to consume

AbstractButtonCell() {
super(new String[] { "click", "keydown" });
//do rest of the init;
}

~Ashwin


On Wed, Jun 29, 2011 at 7:30 PM, Tod Jackson  wrote:

> Greetings,
>
> First off, the sample I'm describing here is just a trimmed down version of
> what I'm really going for.  What I'm really trying to do is put a FileUpload
> widget (gwtupload) inside a Cell so for each row within the table, the user
> can select one or more files and upload them.  I know one wouldn't typically
> do what I'm describing here because there are other Cell widgets available
> that cover it.  I've just trimmed it down to this to try and make sure I
> understand what I can/can't do in an AbstractCell.  When I saw this behavior
> as I was trying to use the file upload widget from gwtupload, I simplified
> it to try and get an idea as to where the issue might be.  The bottom line
> is it appears as though when creating an AbstractCell that contains a
> button, I am unable to get the button to fire it's click handler.  Here's
> some sample code that should demonstrate what I'm trying to do in this
> narrowed down case:
>
> My AbstractCell:
>
> private static class AbstractButtonCell extends AbstractCell {
>
> @Override
>
> public void render(com.google.gwt.cell.client.Cell.Context context,
>
>  final String value, SafeHtmlBuilder sb) {
>
>
> if (value == null) {
>
> return;
>
> }
>
>
> VerticalPanel buttonPanel = new VerticalPanel();
>
> Button addLinkButton = new Button("Click " + value);
>
> addLinkButton.addClickHandler(new ClickHandler() {
>
> public void onClick(ClickEvent event) {
>
> Window.alert("You clicked " + value);
>
> }
>
> });
>
>   buttonPanel.add(addLinkButton);
>
> sb.appendHtmlConstant(buttonPanel.toString());
>
> }
>
> }
>
>
> My column that's using the AbstractCell above:
>
>
> AbstractButtonCell buttonCell = new AbstractButtonCell();
>
> Column buttonColumn =
>
> new Column (buttonCell) {
>
>  @Override
>
>  public String getValue(SimilarApplication object) {
>
>  return object.getName();
>
>  }
>
> };
>
>  _cellTable.addColumn(buttonColumn, "A Button");
>
>
> So, when the cell renders, it's got a button in it that says "Click
>  it's onClick handler doesn't seem to fire.  I've looked through several
> other posts that discuss AbstractCells but I haven't been able to find one
> that describes quite what I'm seeing.
>
> Any thoughts or suggestions would be greatly appreciated.  Thanks.
>
> --
> 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/-/FHDa0IaRZUkJ.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>



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



Re: RequestFactory object lifecycle & change propagation

2011-06-29 Thread ashwin.desi...@gmail.com
since you want to update your in-memory list you can look at custom events
and pass the updated object by throwing an event whenever your contact was
modified. Your contact list can listen for this custom event and update the
existing object with new data.

with regards to EntityProxyId, you have to main a map of your proxies and
their proxyId's. this way you whenever a proxy has changed, you can pick the
corresponding proxy from the map and update it by fetching new data from the
server.

Thanks
Ashwin

On Wed, Jun 29, 2011 at 7:45 PM, isern  wrote:

> Ashwin,
>
> Thanks for your reply.
>
> Basically, as I hold an "in memory" contact list (held in
> ModelLocator) I'd like to refresh that list with the newly updated
> object.
>
> I don't think it's necessary a trip to the server because I know I
> have the latest object version (I just saved it!). EntityProxyChange
> doesn't seem to provide a reference to the proxy object that triggered
> the change.
>
> I'm kind of confused with RequestFactory, I see having multiple change
> contexts and multiple proxy graphs as a handicap rather that an
> advantage.
>
> :-(
>
>
> On Jun 29, 12:59 am, "ashwin.desi...@gmail.com"
>  wrote:
> > J,
> >
> > did you look at EntityProxyChange.registerForProxyType ? You can use this
> > and register for any changes to your entities with the eventBus. The
> Handler
> > method is called on change of entities (especially version changes).
> >
> > example:
> >
> > EntityProxyChange.registerForProxyType(eventBus, UserContactsProxy.class,
> > new EntityProxyChange.Handler() {
> >
> > @Override
> > public void onProxyChange(
> > EntityProxyChange arg0) {
> >
> >   proxyId =
> > arg0.getProxyId()
> >  //data has changed, so fetch the contact again
> > fetchUserContact(prxoyId);
> >
> > }
> > });
> >
> > Regards
> > Ashwin
> >
> > On Wed, Jun 29, 2011 at 2:29 AM, isern  wrote:
> > > Hi people,
> >
> > > Since I'm new to GWT in general and RequestFactory in particular I
> > > resort to your experience, cause I'm trying to find out what's the
> > > best way to solve a problem, that has an impact on my application as a
> > > whole, regarding RequestFactory, and I couldn't find a previous
> > > discussion about it.
> >
> > > I have a master/detail, typical CRUD manager where I edit contacts.
> > > Since those contacts rarely surpass 200 or so I thought it was okay to
> > > load them at start time, just like GMail does.
> >
> > > So, I keep them in a singleton ModelLocator, and to render my contact
> > > CRUD and use contacts everywhere in my application I use that
> > > reference. Like, for instance, from a CellTable.
> >
> > > Now, when I'm editing one of those contacts, I invoke request.edit()
> > > so that the changes are tracked in the context of the current request,
> > > and finally .fire(). The remote service method gets called and
> > > everything works fine.
> >
> > > The moment after doing so, I notice that I must refresh somehow
> > > ModelLocator.contacts because it points to an element that now is
> > > stale, it didn't get noticed about the edition.
> >
> > > In an ideal world, I'd like to think of the original RequestFactory
> > > pretty much like a Hibernate session and merge the successful save()
> > > request into the original getContacts() request, so that the original
> > > proxies get updated and finally have just one copy of the data. But as
> > > far as I've seen RequestContexts objects have a rather short
> > > lifecycle.
> >
> > > So, I think most people using RF should have faced the same situation,
> > > what is the best possible solution to this?
> >
> > > Thanks a lot, and I'd greatly appreciate your help
> >
> > > J.
> >
> > > --
> > > 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.
>
> --
> 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.
>
>

-- 
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: Questions about complex UI events in MVP mode

2011-07-04 Thread ashwin.desi...@gmail.com
Victor,

based on what I read, your flowpanel is part of a view which is mapped to a
presenter. You are dynamically adding buttons to the flowpanel. You can
setup click handlers for each of your buttons. if the button is present and
clicked, its handler would be invoked. Inside the handler call the presenter
of the view to perform what ever operation you want to

for example :

interface view {


void setDelegate(Delegate delegate);

interface Delegate {
void save();
}

}


public class MyView extends Composite implements view {

Delegate delegate;


public void setDelegate(Delegate delegate) {
   this.delegate = delegate;

}

public OnLoad() {

FlowPanel panel = new FlowPanel();

Button btn = new Button("Click Me");

panle.add(btn);

btn.addClickHandler( new ClickHandler() {

public void onClick(ClickEvent event) {

delegate.save();
}

});

}

}


Thanks
Ashwin

On Tue, Jul 5, 2011 at 7:41 AM, Victor Zhang wrote:

> Any ideas buddies?
>
> --
> 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.
>
>

-- 
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: ListBox with multiple selection

2011-07-11 Thread ashwin.desi...@gmail.com
Associate a MultiSelectionModel with your list box. On the selection change
event, you can do the following

selectionModel.getSelectedSet();

this would fetch you all selected items.

Thanks
Ashwin


On Mon, Jul 11, 2011 at 6:09 PM, Jose Luis Hernandez <
jose.hernande...@gmail.com> wrote:

> Hello!
> I'm trying to draw a ListBox with multiple selection. My problem is
> when I want to collect the selected values from de ListBox. If I call
> getItemText method I only obtain one value, but I would like to get
> all selected values. How could I do it?
> Thanks!
> Nice day!
>
> --
> 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.
>
>

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



Re: How to detect if a Popup is showing

2011-07-11 Thread ashwin.desi...@gmail.com
Popup Panels have a isShowing() method, use that to determine if its
currently displayed

~Ashwin

On Tue, Jul 12, 2011 at 6:30 AM, Craig Mitchell  wrote:

> Hi,
>
> I wanted to check if a popup is showing, so I wrote this method:
>
> public static int getNumPopupsShowing() {
> int result = 0;
> NodeList divs = Document.get().getElementsByTagName("div");
>  for (int i=0; i if ("gwt-PopupPanel".equals(divs.getItem(i).getClassName())) {
> result++;
> }
> }
>  return result;
> }
>
> However, is there a better way?
>
> Thanks.
>
>  --
> 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/-/Jwf77I4AUsoJ.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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



Re: tab layout suggestions needed

2011-07-12 Thread ashwin.desi...@gmail.com
look at the source code, the initialize method shows how to add new tabs.
You can add a button in one of these tab panels and on click of it create
new tabs.

Thanks
Ashwin

On Tue, Jul 12, 2011 at 7:21 PM, Vik  wrote:

> hie
>
> the demo does not show the adding new tab etc
> http://gwt.google.com/samples/Showcase/Showcase.html#!CwTabLayoutPanel
>
>
> Thankx and Regards
>
> Vik
> Founder
> http://www.sakshum.org
> http://blog.sakshum.org
>
>
> On Tue, Jul 12, 2011 at 6:09 PM, Ashwin Desikan 
> wrote:
>
>> What do you mean dynamically? Say on click of a new tab button? Yes that
>> can be done. Refer to tablayout showcase and documentation. It show how to
>> add tabs using code.
>>
>> Thanks
>> Ashwin
>>
>> Sent from my iPhone
>>
>> On Jul 12, 2011, at 5:29 PM, Vik  wrote:
>>
>> anyone on this please?
>>
>> Thankx and Regards
>>
>> Vik
>> Founder
>> http://www.sakshum.org
>>  http://blog.sakshum.org
>>
>>
>> On Sat, Jul 9, 2011 at 5:57 PM, Vik < 
>> vik@gmail.com> wrote:
>>
>>> Hie
>>>
>>> Is it possible to open tabs dynamically and close them like we do for
>>> browsers using gwt ?
>>>
>>> Thankx and Regards
>>>
>>> Vik
>>> Founder
>>> http://www.sakshum.org
>>>  http://blog.sakshum.org
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Google Web Toolkit" group.
>> To post to this group, send email to google-web-toolkit@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-web-toolkit+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>>  --
>> 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.
>>
>
>  --
> 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.
>

-- 
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: Configuring Places to work with Tabs

2011-07-18 Thread ashwin.desi...@gmail.com
Mark,

I think you should be able to achieve it using places. Try to have an
additional property in your place, lets say location which would tell you
which tab the user clicked. Now pass this value to the activity/ Delegate
which drives your view.  Based on the location render the contents.

Regards
Ashwin



On Mon, Jul 18, 2011 at 10:50 PM, Mark Wengranowski  wrote:

> Hi Everyone, im looking for suggestions on the best way to implement
> places in the following scenario.
>
> I have a main content container which contains a dynamic tab tanel:
> i.e. you can have have up to 3 tabs open at once with different pages
> in each, tabs can be closed/opened.
>
> When i use the goto(place newplace) call it navigates away from my
> current place (dynamic tabs) and loads the new place. This is normally
> how you would want things to happen.
>
> What i want to happen is that instead of navigating away from the
> current place of the main content window, the tab which is in focus
> will navigate to the new place. Can this be done with places so that i
> can take advantage of browser history? Ideally when the goto()
> function is called i'd like to insert some custom logic that controls
> the tabs
>
> Thanks,
> -Mark
>
> --
> 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.
>
>

-- 
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: Configuring Places to work with Tabs

2011-07-18 Thread ashwin.desi...@gmail.com
render to the content inside your tab panel. ie. each tab panel has a header
(for rendering the tabs) and a content area. your view should expose the
content area as a widget. Your activity should render to this widget



On Mon, Jul 18, 2011 at 11:06 PM, Mark Wengranowski  wrote:

> Thanks! Should i be using the content panel that contains the tab
> panel or should i somehow create content panels and activity mappers
> for each tab panel.
>
> On Jul 18, 10:30 am, "ashwin.desi...@gmail.com"
>  wrote:
> > Mark,
> >
> > I think you should be able to achieve it using places. Try to have an
> > additional property in your place, lets say location which would tell you
> > which tab the user clicked. Now pass this value to the activity/ Delegate
> > which drives your view.  Based on the location render the contents.
> >
> > Regards
> > Ashwin
> >
> > On Mon, Jul 18, 2011 at 10:50 PM, Mark Wengranowski <
> m...@greatlittlebox.com
> >
> >
> >
> > > wrote:
> > > Hi Everyone, im looking for suggestions on the best way to implement
> > > places in the following scenario.
> >
> > > I have a main content container which contains a dynamic tab tanel:
> > > i.e. you can have have up to 3 tabs open at once with different pages
> > > in each, tabs can be closed/opened.
> >
> > > When i use the goto(place newplace) call it navigates away from my
> > > current place (dynamic tabs) and loads the new place. This is normally
> > > how you would want things to happen.
> >
> > > What i want to happen is that instead of navigating away from the
> > > current place of the main content window, the tab which is in focus
> > > will navigate to the new place. Can this be done with places so that i
> > > can take advantage of browser history? Ideally when the goto()
> > > function is called i'd like to insert some custom logic that controls
> > > the tabs
> >
> > > Thanks,
> > > -Mark
> >
> > > --
> > > 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.- Hide quoted
> text -
> >
> > - Show quoted text -
>
> --
> 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.
>
>

-- 
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: Place an Image into the center of DockLayoutPanel ??

2011-07-18 Thread ashwin.desi...@gmail.com
use an absolute panel and render the image inside it. use absolute position
to render your images at the prescribed positions.

regards
Ashwin

On Mon, Jul 18, 2011 at 9:00 PM, JC  wrote:

> I have a DockLayout Panel. I want to place an image into the center
> of: . If I add the image to  or nest it within a
> SimplePanel, HTMLPanel, Grid etc - it always appears at the top left.
> How can I place the image in the center of the  panel ??
>
> --
> 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.
>
>

-- 
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: Place an Image into the center of DockLayoutPanel ??

2011-07-18 Thread ashwin.desi...@gmail.com
Very good.

if you are doing more than one image then placing them relative to each
other would be difficult using a HTMLPanel and table combination. In those
instances you can use an absolute panel



On Mon, Jul 18, 2011 at 11:34 PM, JC  wrote:

> It was frustrating but in the end I figured it out by using HTMLPanel:
>
>
>
> height="100%">
>
> align="center" valign="center">
>
>
>
>
>
> --
> 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.
>
>

-- 
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: ClientBundle don't load the ImageResource

2011-07-18 Thread ashwin.desi...@gmail.com
include the statement INSTANCE..ensureInjected(); that should fix your
problem.

For your reference read the following
http://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.html#ImageResource
Overview

   1. Write a CSS file, with or without GWT-specific extensions
   2. If GWT-specific extensions are used, define a custom subtype of
   CssResource
   3. Declare a method that returns
CssResource
or
   a subtype in an
ClientBundle
   4. When the bundle type is generated with GWT.create() a Java expression
   that evaluates to the contents of the stylesheets will be created
  - Except in the simplest case where the Java expression is a string
  literal, it is generally not the case that a CSS file could be generated
  into the module output
   5. At runtime, call CssResource.ensureInjected() to inject the contents
   of the stylesheet
  - This method is safe to call multiple times, as subsequent
  invocations will be a no-op
  - The recommended pattern is to call ensureInjected() in the static
  initializer of your various widget type


On Mon, Jul 18, 2011 at 11:42 PM, Markus  wrote:

> Hello!
>
> I try to use the ClientBundle implementation to manage my Images to a
> large File and minimize the HTTP-Requests.
>
> I put  in my
> gwt.xml
>
> Generate the ClientBundle
>
> public interface ResourceBundle extends ClientBundle {
>
>public static final ResourceBundle INSTANCE =
> GWT.create(ResourceBundle.class);
>
>@Source("tiles/smiley.png")
>ImageResource smiley();
>
> }
>
> The Image would be found, no errors.
>
> Here is the code
>
> @Override
>public void onModuleLoad() {
>
>CLogger.log("Start Engine");
>
>int width = 800;
>int height = 600;
>
>Canvas canvas = Canvas.createIfSupported();
>canvas.setWidth(width + "px");
>canvas.setHeight(height + "px");
>canvas.setCoordinateSpaceWidth(width);
>canvas.setCoordinateSpaceHeight(height);
>Context2d c = canvas.getContext2d();
>
>Image img = new Image(ResourceBundle.INSTANCE.smiley());
>img.addLoadHandler(new LoadHandler() {
>
>@Override
>public void onLoad(LoadEvent event) {
>CLogger.log(event.getSource() + " loaded");
>}
>});
>CLogger.log("Visible: " + img.isVisible());
>
>c.drawImage((ImageElement) new
> Image(ResourceBundle.INSTANCE.smiley()).getElement().cast(), 0, 0);
>
>RootPanel.get().add(canvas);
>
> }
>
> I create a simple Canvas and set the size to 800x600. I create a new
> Context2D Object to draw the Image at the Context and add the Canvas
> to the RootPanel.
>
> The logs shows:
>
> [20:10:21.676] - Start Engine
> [20:10:21.851] - Visible: true
> [20:10:21.853] -
> http://127.0.0.1:/engine/7D39451825E9952050F44A6B8E2E15F3.cache.png
>
> The Image exists under the logged URL so everything looks fine. But
> the Image would not be draw or it would draw but not display.
>
> Anybody an idea?
>
> I thought the ClientBundle loads the Images as the start in the
> backend. So if I get an Instance every Image/Css and others fill be
> loaded?
>
> Regars Markus
>
> --
> 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.
>
>

-- 
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: Place an Image into the center of DockLayoutPanel ??

2011-07-18 Thread ashwin.desi...@gmail.com
all layout panels have to be placed under other layout panels otherwize they
won't render properly as the resizing would not work automatically. You can
alternatively use a ResizeLayoutPanel which is an extension of a
SimplePanel. Use it instead of the simple panel.



On Tue, Jul 19, 2011 at 3:59 AM, JC  wrote:

> Ok, another follup to my own question. I have named the root
> DockLayoutPanel like so:
>
> 
>
> I add and remove panels like this.
>
> rootDockLayoutPanel.remove(4);
> rootDockLayoutPanel.add(new SomePanel());
>
> Is there a better way to remove the center panel than use constant 4 ??
>
> --
> 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.
>
>

-- 
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: TabLayoutPanel expand to fit content?

2011-07-18 Thread ashwin.desi...@gmail.com
you are having this problem because your page is not able to resize
properly. What sort of widget is your  is that a Simple Panel?

 you can place your Tab Layout Panel directly inside the RootLayout Panel.
since you want to have two Tab Panels, place them inside a simple panel
would not work properly. Instead use ResizeLayoutPanel (this is an extension
of SimplePanel) which can automatically resize.

Regards
Ashwin

On Mon, Jul 18, 2011 at 11:37 PM, MChan  wrote:

> Hi,
> Have you figured out how to accomplish what you were trying to do?
> It could help the similar issue I've got here. I'm trying to get something
> like:
> 
> 
>   Title
>   
> 
>   
> ...
>   
> 
>   
>   
> 
>   
> ...
>   
> 
>   
> 
> 
>
> The h1 item displays, but the first Widget that contains the TabLayoutPanel
> takes the rest of the page height. and the second TabLayoutPanel is not
> displayed at all (but I can see it's there when inspecting the html output).
>
> Thanks,
> MChan
>
> --
> 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/-/ExNkErT3rNMJ.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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



Re: ClientBundle don't load the ImageResource

2011-07-18 Thread ashwin.desi...@gmail.com
here is an example

public interface DesktopResouces extends ClientBundle {

}

On Tue, Jul 19, 2011 at 2:49 AM, Markus  wrote:

> Thanks for your reply. But I don't know how it should work with CSS
> Resource?
>
> Ok I created
>
> public interface ResourceBundle extends ClientBundle {
>
> public static final ResourceBundle INSTANCE =
> GWT.create(ResourceBundle.class);
>
>  @Source("css/example.css")
> public CssResource css();
>
> }
>
> But now?
>
> Where can I define ImageResources? Could you please explain your
> solution... maybe with an short example?
>
> Thanks for your help
>
> Regards, Markus
>
> --
> 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.
>
>

-- 
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: ClientBundle don't load the ImageResource

2011-07-18 Thread ashwin.desi...@gmail.com
sorry,

hit send too early... here is the example

public interface DesktopResources extends ClientBundle {
 @NotStrict
@Source("desktop.css")
CommonResources commonResources();
 @Source("./images/app_logo.png")
ImageResource appLogo();
}

public interface CommonResources extends CssResource {
/**
 * Width of the Main Page
 */
int pagewidth();
 /**
 * application logo
 */
String appLogo();
}

desktop.css
/* css file definition */


@def pageWidth 1000px;

@sprite .appLogo {
gwt-image: 'appLogo';
float: left;
}

/* end css file def */

you need to define a main Style class which you can use to refer all your
resources

public class Style {
private static DesktopResources resources;
 static {
resources = GWT.create(DesktopResources.class);
resources.commonResources().ensureInjected();
}
 public static CommonResources common() {
return resources.commonResources();
}
 public static DesktopResources resources() {
return resources;
}
}


now in each of your UiBinder define the following line. This would allow you
to refer the styles defined in your css files. Its a good practice to
centrally define all the styles in a CSS files as this would help in easily
managing your changing styles for the page








Thanks
Ashwin


On Tue, Jul 19, 2011 at 9:33 AM, ashwin.desi...@gmail.com <
ashwin.desi...@gmail.com> wrote:

> here is an example
>
> public interface DesktopResouces extends ClientBundle {
>
> }
>
> On Tue, Jul 19, 2011 at 2:49 AM, Markus  wrote:
>
>> Thanks for your reply. But I don't know how it should work with CSS
>> Resource?
>>
>> Ok I created
>>
>> public interface ResourceBundle extends ClientBundle {
>>
>> public static final ResourceBundle INSTANCE =
>> GWT.create(ResourceBundle.class);
>>
>>  @Source("css/example.css")
>> public CssResource css();
>>
>> }
>>
>> But now?
>>
>> Where can I define ImageResources? Could you please explain your
>> solution... maybe with an short example?
>>
>> Thanks for your help
>>
>> Regards, Markus
>>
>> --
>> 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.
>>
>>
>

-- 
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: Configuring Places to work with Tabs

2011-07-18 Thread ashwin.desi...@gmail.com
i would recommend the following approach,

in your AppEntry/ main class define the HistoryMapper something  similar to
the following

//default place
final Place defaultPlace = new Home(userName);

// Start PlaceHistoryHandler with our PlaceHistoryMapper
AppPlaceHistoryMapper historyMapper=
GWT.create(AppPlaceHistoryMapper.class);
PlaceHistoryHandler historyHandler = new
PlaceHistoryHandler(historyMapper);
historyHandler.register(placeController, eventBus, defaultPlace);

// Goes to the place represented on URL else default place
historyHandler.handleCurrentHistory();



here i am considering the following as my distinct places Home, Accounts,
Search

My AppPlaceHistoryMapper is defined as below

@WithTokenizers(value = { Home.Tokenizer.class , Accounts.Tokenizer.class,
Search.Tokenizer.class})
public interface AppPlaceHistoryMapper extends PlaceHistoryMapper {

}


lets just look at my home place

public class Home extends Place {
 private String helloName;

public Home(String token) {
super();
if (null != token)
this.helloName = token;
else
this.helloName = "GUEST"; //guest user
}

public String getHelloName() {
return helloName;
}
 public static class Tokenizer implements PlaceTokenizer {

@Override
public Home getPlace(String token) {
return new Home(token);
}

@Override
public String getToken(Home helloPlace) {
return helloPlace.getHelloName();
}
 }
}


lets assume my view has a tablayoutpanel and each of my first tab is the
home place and second tab is the accounts place

on click of the tab, make your view forward the request to the delegate. The
delegate would determine which tab was selected, now if its a tab the
delegate does not handle or determines its a place change event then it
throws a placeControllder.goTo(new Accounts()); //issue a place change event


You have to define an ActivityMapper for your application

public final class AppMasterActivities implements ActivityMapper {

private ApplicationRequestFactory requests;
private PlaceController placeController;
 @Inject
public AppMasterActivities(ApplicationRequestFactory requests,
PlaceController placeController) {
this.requests = requests;
this.placeController = placeController;
}

   @Override
public Activity getActivity(Place place) {
if (place instanceof Home) {
  //call home activity or which ever activity would
render your home tab
 return new HomeActivity(requests, placeController);
}

else if(place instanceof Accounts) {

  //call accounts activity
   return new AccountsActivity(requests,
placeController)
}
  }


Now , you place is mapped to activities and history through the above
definitions.

When you move between tabs history mapping would automatically happen and
the corresponding activities would be invoked and pages fetched.


Regards
Ashwin


On Tue, Jul 19, 2011 at 8:56 AM, Mark Wengranowski
wrote:

> OK, so i have that working properly now but im stuck on configuring
> browser history. How can i make it so that each of my tabs has their
> own browser history so that when i flip to a different tab it will
> change to it's previous page without affecting the others.
>
> For testing purposes i created a second variable of the following:
>
>EventBus eventBus = clientFactory.getEventBus();
>EventBus eventBus1 = clientFactory.getEventBus1();
>
>
>PlaceController placeControllerTab1 =
> clientFactory.getPlaceControllerTab1();
>PlaceController placeControllerTab2 =
> clientFactory.getPlaceControllerTab2();
>
>PlaceHistoryHandler historyHandlerTab1 = new
> PlaceHistoryHandler(historyMapper);
>PlaceHistoryHandler historyHandlerTab2 = new
> PlaceHistoryHandler(historyMapper);
>
>historyHandlerTab1.register(placeControllerTab1,
> eventBus, defaultPlace);
>historyHandlerTab2.register(placeControllerTab2,
> eventBus1, defaultPlace);
>
> I keep track of which tab is currently selcted and utilize the
> variables depending on the selected index of the tab. for example when
> the second tab is selected the 2 variables are used. doing this still
> combines all the browser history together no matter what tab is
> selected. Is there something im missing?
>
>
> thanks,
> -Mark
>
> On Jul 18, 10:39 am, "ashwin.desi...@gmail.com"
>  wrote:
> > render to the content inside your tab panel. ie. each tab panel has a
> header
> > (for rendering the tabs) and a content area. your view should expose the
> > content area as a widget. Your activity should render to this widget
> >
> > On Mon, Jul 18, 2011 at 11:06 PM, Mark Wengranowski <
> m...@grea

Re: Ajax Call

2011-07-19 Thread ashwin.desi...@gmail.com
register for entitychange events in your delegate and on change of the
entity values, update your view.

On Tue, Jul 19, 2011 at 12:22 PM, sanjay kanwar wrote:

> Hi there,
>
> How can i update an entity in a webpage without refreshing the  whole page.
> using AJAX refresh method of the delegate. Thx in Advance
>
> Regards
> Sam
>
> --
> 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.
>

-- 
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: TabLayoutPanel expand to fit content?

2011-07-19 Thread ashwin.desi...@gmail.com
the problem is not with your TabLayout panel. what you have there would work
fine. The issue is with the Grid.

Its best to use LayoutPanels inside other layoutpanels. In your case if all
that you are doing is rendering two TabLayoutPanels, you don't have to
necessarily use a grid.

i would instead try the following options

Option 1:

use a SplitLayoutPanel and add it to the RootLayoutPanel. render both your
tablayoutpanels to this panel.

Option 2:

Use a HTMLPanel instead of the grid, with two ResizeLayoutPanels. Render a
TabLayoutPanel to each of these resize Panels.


~Ashwin

On Tue, Jul 19, 2011 at 7:55 PM, MChan  wrote:

> Hi,
> As a matter of fact, I'll have more than two TabLayoutPanel on one page.
> I'm trying to create a result page, and each result has a "Show details"
> link which opens a TabLayoutPanel that displays 2 tabs.
> I simplified what I'm trying to achieve in a separated project, but I still
> can't get what I want...
> Here's what I have:
>
> public void onModuleLoad() {
>
> Grid grid = new Grid(2, 1);
> grid.setWidth("550px");
> grid.setWidget(0, 0, createResult());
> grid.setWidget(1, 0, createResult());
> RootLayoutPanel.get().add(grid);
>
> }
>
> private Widget createResult() {
>
> TabLayoutPanel details = new TabLayoutPanel(1.5, Unit.EM);
> HTML contentFirst = new HTML("Lorem Ipsum is simply dummy text of the
> printing and"
>
> + "typesetting industry. Lorem Ipsum has been the"
>
> + " industry's standard dummy text ever since the 1500s,"
>
> + "when an unknown printer took a galley of type and scrambled" + "it to
> make a type specimen book."
>
> + "Lorem Ipsum is simply dummy text of the printing and"
>
> + "typesetting industry. Lorem Ipsum has been the"
>
> + " industry's standard dummy text ever since the 1500s,"
>
> + "when an unknown printer took a galley of type and scrambled" + "it to
> make a type specimen book.");
>
> details.add(contentFirst, "First");
>
> HTML contentSecond = new HTML("Content bold");
> details.add(contentSecond, "Second");
>
> details.selectTab(0);
> details.setAnimationDuration(500);
> details.setHeight("100%");
>
> ResizeLayoutPanel detailsContainer = new ResizeLayoutPanel();
> detailsContainer.add(details);
> detailsContainer.setHeight("100%");
>
> return detailsContainer;
>
> }
>
> When I set ReisizeLayoutPanel height to "100px", it displays the content of
> the tabs. However, when I set it to 100%, I can only see the two
> TabLayoutPanel headers (with the "First" and "Second" tab title). And the
> content varies from result to result, so I can't set a pixel height.
> When I add the ResizeLayoutPanels returned by createResult() directly in
> RootLayoutPanel, they are overlying.
> I also tried adding .gwt-TabLayoutPanel { height: 100%; } in my CSS.
>
> I'm a bit out of ideas; do I need to add something other than HTML elements
> as widgets in the TabLayoutPanel? (I tried with LayoutPanel, SimplePanel..).
> I also tried using a FlowPanel instead of the grid, with no much success
> either.
>
> Regards,
> MChan
>
> --
> 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/-/XqQ1pIsUN0QJ.
>
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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



Re: TabLayoutPanel expand to fit content?

2011-07-19 Thread ashwin.desi...@gmail.com
Also, make sure the height of the tabLayoutPanel is set to 100%

.gwt-TabLayoutPanel {
height : 100%;
}

~Ashwin

On Tue, Jul 19, 2011 at 8:10 PM, ashwin.desi...@gmail.com <
ashwin.desi...@gmail.com> wrote:

> the problem is not with your TabLayout panel. what you have there would
> work fine. The issue is with the Grid.
>
> Its best to use LayoutPanels inside other layoutpanels. In your case if all
> that you are doing is rendering two TabLayoutPanels, you don't have to
> necessarily use a grid.
>
> i would instead try the following options
>
> Option 1:
>
> use a SplitLayoutPanel and add it to the RootLayoutPanel. render both your
> tablayoutpanels to this panel.
>
> Option 2:
>
> Use a HTMLPanel instead of the grid, with two ResizeLayoutPanels. Render a
> TabLayoutPanel to each of these resize Panels.
>
>
> ~Ashwin
>
>
> On Tue, Jul 19, 2011 at 7:55 PM, MChan  wrote:
>
>> Hi,
>> As a matter of fact, I'll have more than two TabLayoutPanel on one page.
>> I'm trying to create a result page, and each result has a "Show details"
>> link which opens a TabLayoutPanel that displays 2 tabs.
>> I simplified what I'm trying to achieve in a separated project, but I
>> still can't get what I want...
>> Here's what I have:
>>
>> public void onModuleLoad() {
>>
>> Grid grid = new Grid(2, 1);
>> grid.setWidth("550px");
>> grid.setWidget(0, 0, createResult());
>> grid.setWidget(1, 0, createResult());
>> RootLayoutPanel.get().add(grid);
>>
>> }
>>
>> private Widget createResult() {
>>
>> TabLayoutPanel details = new TabLayoutPanel(1.5, Unit.EM);
>> HTML contentFirst = new HTML("Lorem Ipsum is simply dummy text of the
>> printing and"
>>
>> + "typesetting industry. Lorem Ipsum has been the"
>>
>> + " industry's standard dummy text ever since the 1500s,"
>>
>> + "when an unknown printer took a galley of type and scrambled" + "it to
>> make a type specimen book."
>>
>> + "Lorem Ipsum is simply dummy text of the printing and"
>>
>> + "typesetting industry. Lorem Ipsum has been the"
>>
>> + " industry's standard dummy text ever since the 1500s,"
>>
>> + "when an unknown printer took a galley of type and scrambled" + "it to
>> make a type specimen book.");
>>
>> details.add(contentFirst, "First");
>>
>> HTML contentSecond = new HTML("Content bold");
>> details.add(contentSecond, "Second");
>>
>> details.selectTab(0);
>> details.setAnimationDuration(500);
>> details.setHeight("100%");
>>
>> ResizeLayoutPanel detailsContainer = new ResizeLayoutPanel();
>> detailsContainer.add(details);
>> detailsContainer.setHeight("100%");
>>
>> return detailsContainer;
>>
>> }
>>
>> When I set ReisizeLayoutPanel height to "100px", it displays the content
>> of the tabs. However, when I set it to 100%, I can only see the two
>> TabLayoutPanel headers (with the "First" and "Second" tab title). And the
>> content varies from result to result, so I can't set a pixel height.
>> When I add the ResizeLayoutPanels returned by createResult() directly in
>> RootLayoutPanel, they are overlying.
>> I also tried adding .gwt-TabLayoutPanel { height: 100%; } in my CSS.
>>
>> I'm a bit out of ideas; do I need to add something other than HTML
>> elements as widgets in the TabLayoutPanel? (I tried with LayoutPanel,
>> SimplePanel..). I also tried using a FlowPanel instead of the grid, with no
>> much success either.
>>
>> Regards,
>> MChan
>>
>> --
>> 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/-/XqQ1pIsUN0QJ.
>>
>> To post to this group, send email to google-web-toolkit@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-web-toolkit+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>
>

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



Re: CSS right and bottom margins Not showing

2011-07-19 Thread ashwin.desi...@gmail.com
reduce the width of the topPanel. try to inspect the resizelayoutpanel, it
would be going out of the frame. If you set overflow : auto, you may mostly
see a scroll bar. if you reduce the width to below 100% your right margin's
 should get set.


On Tue, Jul 19, 2011 at 8:30 PM, JC  wrote:

> I can't understand this. I am starting a simple dock layout panel. It
> sits within another dock layout panel (the center section).
>
> The left and top margins are showing but not the right and bottom
> margins. Please help.
>
>
> 
>
> .toppanel {
>background: #FF;
>color: #fff;
>font-size: 14pt;
>padding: 15px;
>margin-left: 10px;
>margin-right: 40px;  // does not show on
> page
>height: 100%;
>width: 100%;
> }
>
> .label {
>background: #666;
>color: #fff;
>font-size: 14pt;
>padding: 5px;
>margin: 10px;// only displays left
> and top margins
>height: 100%;
>width: 100%;
> }
>
> 
>
> 
>
> addStyleNames="{style.toppanel}">
>
>
>
>
> addStyleNames="{style.label}">Scoreboard g:Label>
>
>
> addStyleNames="{style.label}">West g:Label>
>
>
> addStyleNames="{style.label}">East g:Label>
>
>
>
> 
>
> --
> 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.
>
>

-- 
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: TabLayoutPanel expand to fit content?

2011-07-19 Thread ashwin.desi...@gmail.com
are you setting 100% as the height for both the resize layout panels? if yes
how will the page render as your total height is 100% and you are assigning
to the 1st resisze panel, the second panel would not be able to calculate
its layout details.


try setting the height to 50% and see the out come.

On Tue, Jul 19, 2011 at 8:41 PM, MChan  wrote:

> Hey,
> Thanks for your quick reply.
>
> So, I already had the CSS rule for TabLayoutPanel set to 100%. I can see it
> in "Inspect Element" tool of Chrome.
> I'm not sure if using the SplitLayoutPanel (or DockLayoutPanel) would be
> okay in my situation, as the their center panel only accept one child
> widget. And I will eventually need to have more than 2 TabLayoutPanel
> (something like 10 on the same page, one per result, and opened when
> clicking the "Show details" link of a result). Am I wrong, should I really
> use it?
>
> I tried with the HTMLPanel in my module load:
>
> HTMLPanel html = new HTMLPanel("");
> html.setWidth("550px");
> html.add(createResult());
> html.add(createResult());
> RootLayoutPanel.get().add(html);
>
>
> And in the createResult method:
> - When: [ResizeLayoutPanel] detailsContainer.setHeight("100%"); --> it does
> show the first TabLayoutPanel on the resulting page, but not the second.
> - When: [TabLayoutPanel] details.setHeight("100%); --> I can only see the
> tabs title, but not the tabs content.
>
> Thanks,
> MChan
>
> --
> 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/-/jacRfjQiapQJ.
>
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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



Re: TabLayoutPanel expand to fit content?

2011-07-19 Thread ashwin.desi...@gmail.com
oh, if you want to render your panels on click of a button, then you don't
necessarily need two ResizeLayoutPanels, just render the contents of the
appropriate tabLayoutPanel

alternatively, you can set the visibility of the panels to true/ false on
click. this would also force the height adjustment. But I would recommend
the first approach

Thanks
Ashwin



On Tue, Jul 19, 2011 at 9:51 PM, MChan  wrote:

> Yeah, I was setting both heights to 100%.
> When I set the ResizeLayoutPanels height to 50%, I see them both on my test
> page, each taking 50% of the vertical space. That's a start!
>
> However, what I'm trying to achieve is the TabLayoutPanel to show when I
> click on "Show details" on a result.
>
> *Example:*
> Results
>   Result { Title, Date, @"Show details" }
> When clicking Show details, show TabLayoutPanel with its 2
> tabs, positioned under Result
>   Result ...
>
> Is there a way to fit the *tab content*? My two tabs will generally not
> have the same height, and the content varies from result to result.
> Can the tab height adjust dynamically to its content?
>
> Regards,
> MChan
>
> --
> 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/-/opD5PS4OZrcJ.
>
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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



Re: TabLayoutPanel expand to fit content?

2011-07-19 Thread ashwin.desi...@gmail.com
you can set styles via code.

On Wed, Jul 20, 2011 at 1:42 AM, MChan  wrote:

> It still did not work. However, when I changed the resulting divs (Chrome
> inspect element tool) position to "relative" instead of absolute, I was able
> to see the tab content fit. But I can't do that programmatically.
> I ended up creating my own control, with custom animation.
>
> Thanks for your time!
> MChan
>
> --
> 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/-/qtlWPf9OZk4J.
>
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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



Re: Click events with UIBinder

2011-07-19 Thread ashwin.desi...@gmail.com
use RootPanel or RootLayoutPanel and add your widget to it.

On Tue, Jul 19, 2011 at 8:40 PM, Matt  wrote:

> I am trying to add events to a Button using the UiBinder, but nothing
> is happening when I click the Button. Here is my code:
>
> Login.ui.xml:
>   xmlns:ui="urn:ui:com.google.gwt.uibinder"
>  xmlns:g="urn:import:com.google.gwt.user.client.ui" >
>
>
>test
>
> 
>
> Login.java:
> package com.company.client.view;
>
> import com.google.gwt.core.client.GWT;
> import com.google.gwt.event.dom.client.ClickEvent;
> import com.google.gwt.uibinder.client.UiBinder;
> import com.google.gwt.uibinder.client.UiField;
> import com.google.gwt.uibinder.client.UiHandler;
> import com.google.gwt.user.client.ui.Button;
> import com.google.gwt.user.client.ui.Composite;
> import com.google.gwt.user.client.ui.Widget;
>
> public class Login extends Composite {
>interface LoginUiBinder extends UiBinder { }
>private static LoginUiBinder uiBinder =
> GWT.create(LoginUiBinder.class);
>@UiField Button button;
>
>public Login() {
>initWidget(uiBinder.createAndBindUi(this));
>}
>@UiHandler("button")
>void onButtonClick(ClickEvent event) {
>Window.alert("test");
>button.setSize("200px", "300px");
>}
> }
>
> Entry.java:
> package com.company.client.presenter;
>
> import com.google.gwt.core.client.EntryPoint;
> import com.google.gwt.dom.client.Document;
> import com.presto.client.view.Login;
>
> public class Entry implements EntryPoint {
>
>@Override
>public void onModuleLoad() {
>Login l = new Login();
>Document.get().getBody().appendChild(l.getElement());
>}
>
> }
>
> 
> The button correctly shows on the page, but there is no click event.
> I am new to GWT, so I'm not sure what else I'm missing.  Any ideas?
> 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.
>
>

-- 
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: Changing the Place History without really going to a place

2011-07-19 Thread ashwin.desi...@gmail.com
best would be to do a place change, call the same activity, but re-use the
view (you can mark it singleton). this would make the code clean.

On Wed, Jul 20, 2011 at 5:43 AM, P.G.Taboada wrote:

> Hi,
>
> I need to tell the history manager that I am switching from
> userViewPlace: to userViewPlace:someToken. I do not need to really
> switch the place, but I need the history to change.
>
> The following does the trick, but it feels like cheating.
>
>History.newItem("SomePlace:" + new
> SomePlace.Tokenizer().getToken(new SomePlace(infosNeeded)), false);
>
>
> Any better solution?
>
> brgds,
>
> Papick
>
> --
> 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.
>
>

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



Re: how to make DataGrid column heading looks like swing table heading

2012-05-03 Thread ashwin.desi...@gmail.com
Daya,

you can customize the style of the DataGrid by overriding the CSS
properties? Did you try that.

Regards
Ashwin

On Fri, May 4, 2012 at 11:28 AM, Dayananda B V wrote:

> please help on this regard
>
> On May 3, 11:57 am, Dayananda B V  wrote:
> > Hi all,
> >
> > How to make DataGrid column heading looks like swing table heading,
> > now DataGrid column shows plain text with vertical line but i need
> > excel or swing table heading where the background color is gray.
> > appreciate your help
> >
> > ThanksDaya
>
> --
> 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.
>
>

-- 
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: Resubmitting RequestFactory request when server side logic requires it

2012-06-05 Thread ashwin.desi...@gmail.com
Ryan,

You can create your own custom annotation (for example : LoggedIn). Apply
this on all methods you want to authenticate the user/ session to be
validated.

Define your own ApplicationRequestFactoryServlet and
ApplicationServiceLayerDecorators. Override the invoke method under
ServiceLayerDecorator and validate for the presence of @LoggedIn
annotation. If present, check if the user session is valid.

regards
Ashwin



On Tue, Jun 5, 2012 at 4:08 PM, Ryan McFall  wrote:

> Thanks for the ideas, Thomas.
>
> Two questions on the response:
> 1.  I was hoping to detect this within my service method, rather than
> at a higher level like a servlet filter.  Is it possible to return a
> non-200 error code from within the service method?  I tried getting
> the thread local HttpResponse object and changing its status code, but
> this had no effect.
>



>
> 2.  If I do write a servlet filter, there are only certain service
> methods that I want this code to apply to (for example, I use a
> service method, rather than the built in servlet authentication to
> authenticate the user, and I certainly don't want to require a valid
> session during this call).  From what I see in the sample code you
> posted, it looks like that application is doing this on every
> request.  What is the best way to differentiate which service
> method(s) are being called as part of the request?  Are there classes
> available that will help me parse the request payload on the server
> and identify the methods being called?
>
> Ryan
>





>
> On Jun 5, 5:21 am, Thomas Broyer  wrote:
> > On Monday, June 4, 2012 10:17:52 PM UTC+2, Ryan McFall wrote:
> >
> > > I am having issues when I want to resubmit some requests to the server
> > > when the server-side logic indicates it should happen.  In particular,
> > > here's what happens:
> >
> > > 1.  The user logins in, which causes an object (SurveyResponseHeader)
> > > to be created on the server-side, and sent back to the client.  edit
> > > is then called on the client side on that object.
> >
> > > 2.  The user fills in a set of SurveyResponse objects into a list
> > > contained by the SurveyResponseHeader object (and a corresponding
> > > request is made to save the object on the server).
> >
> > > 3.  The user submits the survey responses, but the session has timed
> > > out on the server.  An error code is sent back to the client, and the
> > > user is asked to re-authenticate.
> >
> > > At this point, I want to resubmit the request that caused the error;
> > > it should succeed on the server now because the session has been
> > > restarted.  However, I can't use the same request object because I'll
> > > get the "request is already in progress" error message.
> >
> > > Rather than tell you everything I've tried, I'd like to hear what
> > > people think is the right way to accomplish this.  I can provide more
> > > details if needed, but I want to keep the description simple at least
> > > to start.
> >
> > You have to make sure you convey the session-expiry-error as a "transport
> > error" or "general failure", and not as a "service method return value".
> > Using the DefaultRequestTransport, any non-200 response from the server
> > will be a "transport error", so handling session expiration from a
> servlet
> > filter on the server and responding with a non-200 status code (let's
> say,
> > for instance, a 401, or 400; make sure you don't redirect to your login
> > page though!) should Just Work(tm).
> > To tell the difference between a real server failure and session
> expiration
> > though, you'll have to make your own RequestTransport on the client
> > (possibly extending DefaultRequestTransport) and define some kind of
> > "protocol" (shared knowledge) with the server. Have a look at how it's
> done
> > in the MobileWebApp sample in the GWT SDK:
> http://code.google.com/p/google-web-toolkit/source/browse/trunk/sampl...It's
> > specific to Google AppEngine but is really easy to adapt to whatever you
> > use. The trick is to make sure you don't set a  on
> the
> > RequestFactoryServlet in your web.xml, and instead handle the absence of
> > authenticated user from code (in a servlet filter is the easiest)
>
> --
> 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.
>
>

-- 
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: Should I use HTML5 canvas just to create my own slideshow reader ?

2012-06-07 Thread ashwin.desi...@gmail.com
there are multiple options available apart from HTML5 canvas.

1. RapahelGWT (this is an extension of Raphael JS for GWT), using this
images would be rendered as SVG. And raphael works with lower versions of
ie as well http://code.google.com/p/raphaelgwt/
2. you can also look at a SlidingPanel (example of this is provided in
expense tutorial), and customize it to load your images.
3. vectomatic (gwt project available), an svg & html5 canvas plugin for
GWT.  http://code.google.com/p/vectomatic/

svg is supposed to be more suited for static images and interactivity.
HTML5 canvas when there is lots of animation/ computations involved.

the following video link provides a good introduction to html5 and
showcases differences between svg and canvas

http://www.youtube.com/watch?v=siOHh0uzcuY&feature=relmfu

~Ashwin

On Fri, Jun 8, 2012 at 9:59 AM, regnoult axel  wrote:

> Hello,
>
> I am trying to develop my own slideshow reader (you just see the albums
> fotos in the full screen mode and slide them).
> I started using HTML5 canvas but just because it was more "modern" but IE8
> does not support HTML5 canvas. So my question is :  "Should I use HTML5
> canvas to do my slideshow (I will need a caroussel and animation between
> images) ?" Could you argue your answer (because maybe HTML5 canvas are more
> interesting to do more complicated things) ?
>
> Thanks you,
>
> --
> 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/-/MYtozTQ1cSgJ.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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



Re: Facing issue while designing UI in GWT

2012-07-05 Thread ashwin.desi...@gmail.com
simply put GWT is a client side library. you develop using java/ phyton or
Go instead of javascript.

Its is similar to packaging a jsp/ html page inside a web app and would run
under any j2ee container.

yes you can combine, servlets and jsp in GWT app.

~Ashwin


On Fri, Jul 6, 2012 at 11:44 AM, vikash@Atos wrote:

> Hi,
>
> Is there any way, we can develope and run a J2EE App in GWT environment?
>
> Can we mix J2EE components, like servlets and jsps in GWT app?
>
> Facing issue while designing UI with GWT.
>
> Any help guide would be helpful.
>
> Thanks in advance.
>
> Regards,
> Vikash
>
> --
> 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/-/pAA-jpmoOsQJ.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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



Re: PopupPanel size problem

2012-07-09 Thread ashwin.desi...@gmail.com
are you setting the size of the docklayout panel or making it use all the
available size of your popuppanel? Yes you can use window %.

I would suggest you set min width and height for your popup panel and make
the docklayout panel cover the width and height of your popup.  Setting min
width and height would ensure that even on small screens your widget would
render tidily.

~Ashwin

On Mon, Jul 9, 2012 at 3:50 PM, tong123123  wrote:

> is using a percentage of Window.getClientHeight() and
> Window.getClientWidth() the correct direction?
>
>
> On Monday, July 9, 2012 4:37:33 PM UTC+8, tong123123 wrote:
>>
>> In developer guide
>> https://developers.google.com/**web-toolkit/doc/2.4/**DevGuideUiPanels
>> seems it must explicit set the size inside PopupPanel
>> in section
>>
>>> Using a LayoutPanel without RootLayoutPanel
>>
>>
>>
>> my PopupPanel encloses a DockLayoutPanel and the DockLayoutPanel has size
>>
>>> setSize("1230px", "720px");
>>>
>>
>> the problem is different computer will have different resolution, so
>> sometime the PopupPanel is too large to see in the client's computer,
>> sometime it is too small to see in another client's computer, any method to
>> resolve it?
>>
>> the popuppanel is shown as attached (this resolution is just match in my
>> pc, but not in others clients pc).
>>
>>
>>
>>  --
> 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/-/O0JkE2ZKRugJ.
>
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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



Re: How do I make sure Widgets receive mouse events if placed in front of a Canvas or Vaadin DrawingArea?

2012-07-13 Thread ashwin.desi...@gmail.com
i have a similar implementation for my project. I have a panel to which I
add a canvas (first) and dynamically I add multiple widgets.

I actually don't use z-index ( so i am wrong with my previous comment). All
that I do is I add the canvas before any of my other widgets. I have
enabled domEvents on my widget and capture mouse/ key-board events.

seems to work just fine. Use DevTool (like in chrome) to check how the
widgets are getting rendered. I use absolute positioning on my widgets.

~ashwin

On Fri, Jul 13, 2012 at 9:56 PM, Navigateur  wrote:

> I tried this but unfortunately to no avail!
>
> I did it as follows:
>
> canvas.addStyleName("behind");
> absolutePanel.add(canvas); //drawing surface, whether it's a Canvas or
> Vaadin DrawingArea
> absolutePanel.**setWidgetPosition(canvas, 0, 0);
> myWidget.addStyleName("inFront");
> absolutePanel.add(myWidget);
> absolutePanel.**setWidgetPosition(myWidget, 0, 0);
>
> ..where CSS file says:
>
> .behind{
> z-index:-1;
> }
>
> .inFront{
> z-index:1;
> }
>
> Problem remains even if I change z-indexes to, say, 1 and 4, respectively,
> or -100 and 100. So the z-indexing was probably not the cause of the
> Widgets not getting the mouse events. Any ideas of how I'd make sure they
> do? Are you able to get this to work?
>
> On Friday, July 13, 2012 3:06:19 PM UTC+1, Ashwin Desikan wrote:
>
>> Use z-index CSS property to set the depth of your widgets. Higher z-index
>> would get priority
>>
>> Sent from my iPhone
>>
>> On Jul 13, 2012, at 5:17 PM, Navigateur wrote:
>>
>> This used to work on Firefox in GWT 2.3 on Window XP, but now on Chrome
>> and IE with GWT 2.4 and Windows Vista I can't make my Widgets, which are in
>> front of a Canvas (or Vaadin DrawingArea), receive any mouse events at all.
>>
>> A widget is placed in front of the drawing surface like so:
>>
>> absolutePanel.add(canvas); //drawing surface, whether it's a Canvas or
>> Vaadin DrawingArea
>> absolutePanel.**setWidgetPosition(canvas, 0, 0);
>> absolutePanel.add(myWidget);
>> absolutePanel.**setWidgetPosition(myWidget, 0, 0);
>>
>> If I do not add the "canvas", "myWidget" receives its mouse events fine.
>> How do I make sure "myWidget" can receive all its mouse events properly
>> in this scenario?
>>
>>  --
> 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/-/f9Hl9DzQ6QMJ.
>
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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



Re: Drag and Drop UI using GWT with Connectors

2012-08-11 Thread ashwin.desi...@gmail.com
Santosh,

If you have the privilege (depending on your app) to use html5 and css3 as
the min browser requirement, then I would suggest draw the process as as
div and style them as circle using border-radius CSS style.

to draw the connectors, use HTML5 canvas. GWT supports canvas on browsers
which are html5, chrome, opera, firefox (3.6 and above) and IE (9 and
above). This is the technique yahoo also uses with its pipes project

You can implement drag and drop using techniques provided for any gwt
widget.

I have implemented connectors in my project. All you have to do is place
your widgets using absolute positioning on a panel (call it the editor),
draw the connector to a canvas between the widgets and add the canvas to
the editor. You will have to update the position of the widgets &
respective canvas when you drag any of your process widgets.


Regards
Ashwin




On Fri, Aug 10, 2012 at 6:03 PM, Santosh wrote:

> We have a requirement to create a diagram which shows a sequence of
> process in circular manner with Connectors. UI should be flexible
> enough so that user can drag and drop any process between any of the
> other two process in the diagram. Automatically connectors should get
> re-arranged with new sequence. All examples what I saw using GWT-DND
> are drag and drop components, but no examples with Connector arrows
> concepts. We have also heard about SVG and YUI. But I am not sure how
> far we can use that within GWT. Do we have any suggestion on what to
> choose and how we can design this?
>
> --
> 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.
>
>

-- 
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: Big MultiWordSuggestOracle

2012-08-13 Thread ashwin.desi...@gmail.com
Check out
https://groups.google.com/forum/m/?fromgroups#!topic/google-web-toolkit/VpQq_gxATYY
 On Aug 13, 2012 11:25 PM, "James"  wrote:

> I get a long list of records (2) for MultiWordSuggestOracle from
> database. The page containing SuggestBox takes very long time to load. I
> can add its implementation to onLoad method but it still interferes some
> data inputs. Is there some way to load partial data for
> MultiWordSuggestOracle for user inputs and build a whole list of data for
> MultiWordSuggestOracle progressively?
>
> Thanks,
>
> James
>
> --
> 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/-/suUtG2aJod4J.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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



Re: Pb with activity and events (using gin)

2013-06-04 Thread ashwin.desi...@gmail.com
check if the instance of EventBus is the same. I know you have declared it
as eagerSingleton in your GIN configuration. But do a quick log to see if
the instances are the same.

I remember encountering a similar issue wherein I used to have a new
instance of the EventBus getting injected even though I had a similar
configuration as yours. In order to fix the problem I had to do the
following

1. define a provider

public static class EventBusProvider implements Provider {
 private static EventBus bus = null;

/* (non-Javadoc)
 * @see com.google.inject.Provider#get()
 */
@Override
public EventBus get() {
 if(null == bus)
bus = new SimpleEventBus();
 return bus;
}
 }

2. bind

bind(EventBus.class).toProvider(EventBusProvider.class).in(Singleton.class);


On Tue, Jun 4, 2013 at 4:16 PM, Tugdual Huertas
wrote:

> Hi all,
>
> i'm facing a litlle problem using places activities and events... Have
> tried multiple tricks but not luck .
>
> My problem:
> i try to fire an event from the activity but my widget does not catch it
> since its not loaded (I mean that if i fire this event once the widget's
> loaded everything works fine).
>
> Here is my Gin configuration:
>
> @Override
> protected void configure()
> {
>bind(EventBus.class).to(SimpleEventBus.class).asEagerSingleton();
>
>  
> bind(PlaceHistoryMapper.class).to(MyPlaceHistoryMapper.class).in(Singleton.class);
>
>  bind(ActivityMapper.class).to(MyActivityMapper.class).in(Singleton.class);
>bind(MyActivity.class);
>install(new
> GinFactoryModuleBuilder().build(MyActivityMapper.Factory.class));
> }
>
> @Provides
> @Singleton
> public PlaceController getPlaceController(EventBus eventBus)
> {
>return new PlaceController(eventBus);
> }
>
> @Singleton
> @Provides
> public ActivityManager provideActivityManager(ActivityMapper
> activityMapper, EventBus eventBus)
> {
>return new ActivityManager(activityMapper, eventBus);
> }
>
> in MyActivity:
> @Inject
> private MyWidget myWidget;
> @Inject
> private EventBus globalEventBus;
>
> @Override
> public void start(AcceptsOneWidget panel, EventBus eventBus)
> {
>panel.setWidget(myWidget);
>MyEvent event = new MyEvent();
>event.setAction(MyEvent.Action.INIT);
>globalEventBus.fireEvent(event);
> }
>
> I also try two different ways of binding events in my widget, during
> onLoad and in constructor:
>
> During onLoad:
>
> @Inject EventBus eventBus;
>
> @Override
> protected void onLoad()
> {
>handlersRegistration.add(eventBus.addHandler(MyEvent.TYPE, this));
> }
>
>
> In constructor:
>
> private EventBus eventBus;
>
> @Inject
> public MyWidget(EventBus eventBus)
> {
>this.eventBus = eventBus;
>// registration of handlers
>handlersRegistration = new ArrayList();
>// register myself has a listener of different event TYPE
>handlersRegistration.add(eventBus.addHandler(MyEvent.TYPE, this));
>
>...
> }
>
>
> Am I doing something w rong or missing something?
>
> Thks in advance
>
> Tugdual
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

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




Re: How to add absolute panel to celltable column

2012-01-29 Thread ashwin.desi...@gmail.com
Doc,

You cannot add Widgets directly to a CellTable. You will have to write a
custom implementation by extending one of the AbstractCell Types.

Is there a reason why you need to place a Panel inside a CellTable? If you
are using a table to place widgets either use Grid or FlexGrid. CellTable
is for a different purpose.

~Ashwin

On Fri, Jan 27, 2012 at 8:53 PM, Doc  wrote:

> Hi,
>
> Can anybody please help me with below query:
>
> I am using cell table. For one of the column, I need to add
> AbsolutePanel dynamically as a cell element.
>
> Please let me know about it OR share me any document/URL if any ASAP.
>
> Thanks in advance.
>
> Thanks
> Doc
>
> --
> 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.
>
>

-- 
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: Tutorial for security in GWT + GAE (Cloud SQL) + Request Factory

2012-12-19 Thread ashwin.desi...@gmail.com
some previous threads where securing RequestFactory has been discussed

https://groups.google.com/forum/#!searchin/google-web-toolkit/securing$20RequestFactory/google-web-toolkit/QjZhnGydDFA/GmdSq5FlyckJ


https://groups.google.com/forum/#!searchin/google-web-toolkit/securing$20RequestFactory/google-web-toolkit/CZ3cKCZoUHc/Lc28Z8C-1hIJ

Also look at the expenses example. It implements security and protects all
requests using a filter.

regards
ashwin

On Wednesday, December 19, 2012, Manuel Alejandro Fernandez Casado wrote:

> Any? :(
>
> --
> 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/-/s3sy6jBMjMwJ.
> To post to this group, send email to 
> google-web-toolkit@googlegroups.com 'google-web-toolkit@googlegroups.com');>
> .
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com  'cvml', 'google-web-toolkit%2bunsubscr...@googlegroups.com');>.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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



Re: datagrid body is disappeared!! height is zero!!

2013-01-14 Thread ashwin.desi...@gmail.com
do you place your grid directly on the layoutPanel or is it inside other
panels like HTMLPanel etc?

I have had similar issues with loosing the size of the panel, In my case
since I was using absolute positioning, I forced position of my grid on
code to over come the issue.
myGrid.getElement().getStyle().setPosition(Position.ABSOLUTE);

Regards
Ashwin


On Tue, Jan 15, 2013 at 12:37 PM, tong123123  wrote:

> I see the following link
>
> http://code.google.com/p/google-web-toolkit/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Milestone%20Summary%20Stars&groupby=&sort=&id=7065
>
> and I follow the suggestion to add a SelectionHandler to the
> TabLayoutPanel, but the result is the datagrid scrollbar is not shown. I
> also add the comment to the above link.
>
> I am using GWT 2.4
>
> --
> 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/-/OmjAuqnAJZkJ.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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



Re: datagrid body is disappeared!! height is zero!!

2013-01-15 Thread ashwin.desi...@gmail.com
datagrid inside a flex table would not invoke the resize of the grid. Add a
resizelayoutPanel inside your dockLayout, override the resize method and
set the height of the grid.


On Tue, Jan 15, 2013 at 1:25 PM, tong123123  wrote:

> DataGrid inside a FlexTable which is then inside a DockLayoutPanel.
> it seem it is a bug of DataGrid inside a DockLayoutPanel as mentioned in
>
> http://code.google.com/p/google-web-toolkit/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Milestone%20Summary%20Stars&groupby=&sort=&id=7065
> but the provided workaround (add a selectionHandler in TabLayoutPanel and
> then redraw the DataGrid) is not worked properly, the scrollbar inside the
> DataGrid is not shown.
>
>  --
> 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/-/1zTaWe9wARQJ.
>
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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



Re: Canvas dynamical size?

2013-01-19 Thread ashwin.desi...@gmail.com
drop your canvas inside a ResizeLayoutPanel. This way onResize event you
can adjust the width and height of the canvas.


 
  
   

 
  
   

 


On Sat, Jan 19, 2013 at 7:16 PM, RyanZA  wrote:

> Make sure that the actual container your uibinder is using is a
> RequiresResize. Usually you use a Composite for UiBinder - if that's the
> case, change it to a ResizeComposite
>
>
> On Friday, January 18, 2013 5:07:02 PM UTC+2, membersound wrote:
>>
>> Could you give me the link of your working example?
>>
>> My layout looks like this (stripped down to the canvas concerning
>> elements):
>>
>> 
>>  
>>   
>>
>> 
>>  
>>   
>>
>> 
>>
>  --
> 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/-/YwZgwcpJb1YJ.
>
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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



Re: ONLINE DOTNET TRAINING

2013-01-19 Thread ashwin.desi...@gmail.com
Please respect the sanctity of this forum. This is not the place to
advertise.

Admin,

Please remove/ block such users.

Regards
Ashwin


On Sun, Jan 20, 2013 at 12:45 PM,  wrote:

> HI,
>
> PLEASE FIND THE BELOW LINK FOR .NET ONLINE TRAINING AND PROJECT SUPPORT.
>
> http://onlinenettrainings.blogspot.com/
>
> PLEASE FEEL FREE TO CONTACT FOR ANY QUERIES TO BELOW MAIL ID
>
> rudrajayku...@gmail.com
>
> THANK YOU
>
> AJAY KUMAR
>
>  --
> 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.
>

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



Re: How to remove drawn elements on the canvas?

2013-01-20 Thread ashwin.desi...@gmail.com
easiest way to clear a canvas is to use the context clearRect function and
pass the canvas co-ordinate space width & height. This would clear the
entire canvas. And you can redraw the shapes you want to remain on screen.

You can also clear portion of a screen, using the above function by passing
the position and size of the ellipse you draw but if there are multiple
shapes in that position then they would also get erased, you will have to
manage redrawing them.

check out the canvas sample in gwt-examples, it gives a very good demo of
how to use front and back canvas for complex rendering. Using this
technique gives you smooth graphics and also better performance.


On Mon, Jan 21, 2013 at 1:31 AM, membersound  wrote:

> Hi,
>
> I draw ellipses on a canvas on click, and want to remove them on
> doubleclick.
> Therefor I track them in a list with coordinates tracked, and iterate if
> on mouseclick. I'm already detecting if an element is under mouseclick or
> not.
>
> BUT: how do I remove that element from the canvas? Would I have to remove
> it from my list, then clear and redraw the whole canvas?
> Can't I just somehow "clear" the ellipse selected?
>
>  --
> 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/-/kAQ-dtNuGz4J.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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



Re: How to remove drawn elements on the canvas?

2013-01-21 Thread ashwin.desi...@gmail.com
great. let me know if you need more details on the same. I have implemented
panning and zooming as well for one of my projects

regards
Ashwin


On Mon, Jan 21, 2013 at 7:01 PM, Kody  wrote:

> Followed your suggestion using front and drag/back-canvas. Works really
> nice.
>
> If someone else is looking for this: you can dublicate a canvas just by:
> desintationCanvas.getCtx().drawImage(sourceCanvas.getCanvasElement(), 0,
> 0);
>
> Don't create an image from the source canvas to draw it on the
> destination, this will take too much time and resources!
>
>  --
> 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.
>

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