Re: FlexTable RowSpan problem

2011-08-17 Thread Ivan Pulleyn
Maybe this is a misunderstanding on my part then. When I insert at (0,0)
with colspan="2", then I was expecting that a subsequent insert at (0, 2)
would be the next cell over. HoweverFlexTable sticks an empty cell in
between, resulting in 3 cells existing in the table rather than 2, which is
what I expected.

In html terms, if I write ..., is the index of td xyz 0,1 or 0,2? I was assuming it's
at grid position 0,2.

If I'm wrong, then the documentation is confusing because there are two
meanings of "column", one for indexing the table and one for spanning.

Ivan...

On Wed, Aug 17, 2011 at 2:11 PM, Paul Robinson  wrote:

>
> On 16/08/11 21:47, Ivan Pulleyn wrote:
>
>>
>> I've recently experienced similar bugs in FlexTable and had to work around
>> it by next my tables and never using colSpan. I'm curious if GWT 2.4 will
>> fix this but I haven't had the chance to look into it.
>>
>>  This is not a bug in GWT, it is the way html tables work.
>
> Paul
>
> --
> 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<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: FlexTable RowSpan problem

2011-08-16 Thread Ivan Pulleyn
Hi,

I've recently experienced similar bugs in FlexTable and had to work around
it by next my tables and never using colSpan. I'm curious if GWT 2.4 will
fix this but I haven't had the chance to look into it.

Ivan...

On Tue, Aug 16, 2011 at 1:37 PM, md  wrote:

> Hi!
>
> I'm developing an application using GWT 2.3.3
> In this application I have a FlexTable which includes (as a widget)
> another FlexTable in many cells (some cells are empty, as for the
> reason that i want to set a colSpan so that the flexTable in Cell
> (1,0) combines (2,0).
>
> So the Problem:
> If setting the colSpan (0,0,2)  it should combine cell (0,0) and cell
> (1,0). Unfortunately cell (1,0) moves to another empty cell on the
> next column - so the whole structrue of the FlexTable is corrupt.
>
> __
> |0,0 | 0,1 | 0,2|
> |1,0 | 1,1 | 1,2|
> |2,0 | 2,1 | 2,2|
> |3,0 | 3,1 | 3,2|
> |4,0 | 4,1 | 4,2|
>
>
> with rowSpan(0,0,2)
>
> 
> |0,0 | 0,1 | 0,2|
> |0,0 | 1,0 | 1,1 | 1,2|
> |2,0 | 2,1 | 2,2 |
> |3,0 | 3,1 | 3,2 |
> |4,0 | 4,1 | 4,2 |
>
>
>
>
>
> Is there any solution for this problem?
> I've tried (as mentioned here on the mailing list) to give each row a
> "" (empty String) but unfortunately this didn't work.
>
>
>
>
> //here is how i set the widgets for the flexTable:
>
> flexTable_6.setWidget(1,0,newTable(komponenten.get(1));
>
> //This is the rowSpan
> flexTable_6.getFlexCellFormatter().setRowSpan(1,0,2);
>
>
> As a matter of fact I am setting the widgets dynamic out of an array
> (each widget/flextable representates an object) and the table contains
> about 140 widgets - if a widget "needs" a colSpan of e.g. 3, the
> following 2 cells are empty.
>
>
> I'm not sure if i explained the problem intelligible, caused by the
> reason that this is my first post ever on such issues, if there is a
> need for more informations please ask.
>
> I hope somebody can help?-Thanks alot!
>
> --
> 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: Obtaining the click position of the underlying widget from an overlay widget

2011-08-16 Thread Ivan Pulleyn
I believe you want this:

int x = event.getRelativeX(event.getRelativeElement());
int y = event.getRelativeY(event.getRelativeElement());


On Tue, Aug 16, 2011 at 7:26 PM, Alexander Orlov
wrote:

> I have something like
>
> 
> 
> 
> 
>
> The FocusPanel is attached to a random place within the ScrollPanel. Now I
> want to get the position of the place where the user places his click. I've
> tried the following
>
> focusPanel.addClickHandler(new ClickHandler() {
> @Override
> public void onClick(ClickEvent event) {
>   System.out.println(event.getClientX());
> System.out.println(event.getX());
>
> System.out.println(event.getRelativeX(event.getRelativeElement().getOffsetLeft()));
>
> System.out.println(event.getRelativeElement().getOffsetLeft());
>
> System.out.println(event.getRelativeElement().getOffsetWidth());
>
> System.out.println(event.getRelativeElement().getOffsetHeight());
>
> System.out.println(event.getRelativeElement().getOffsetTop());
> System.out.println(event.getScreenX());
> }
> }
>
> ...but I always get the same values, no matter where I place my click on
> the focusPanel.
>
> --
> 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/-/J4cH7AUDKBcJ.
> 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: debugging javascript call.?

2011-08-16 Thread Ivan Pulleyn
Then you should check that $wnd.codeAddress exists and is a function

On Tue, Aug 16, 2011 at 2:37 PM, Navindian  wrote:

> before call:sanfrancisco is showing up in this alert. But it is not calling
> javascript function.
>
>
> On Tue, Aug 16, 2011 at 12:54 PM, Ivan Pulleyn wrote:
>
>> address parameter is likely null is this case
>>
>> On Tue, Aug 16, 2011 at 1:35 PM, Navindian  wrote:
>>
>>> Hi
>>>> native void showGeoAddress(String address) /*-{
>>>>
>>>> alert('before call:'+address);
>>>>  $wnd.codeAddress(address);
>>>> alert('not reaching this');
>>>>}
>>>> I am trying to call javascript function from a GWT. somehow its not
>>>> getting called. Not sure about the problem. any ideas. Atleast let me know
>>>> how to debug this case?
>>>>
>>>>
>>>>
>>>  --
>>> 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: debugging javascript call.?

2011-08-16 Thread Ivan Pulleyn
address parameter is likely null is this case

On Tue, Aug 16, 2011 at 1:35 PM, Navindian  wrote:

> Hi
>> native void showGeoAddress(String address) /*-{
>>
>> alert('before call:'+address);
>>  $wnd.codeAddress(address);
>> alert('not reaching this');
>>}
>> I am trying to call javascript function from a GWT. somehow its not
>> getting called. Not sure about the problem. any ideas. Atleast let me know
>> how to debug this case?
>>
>>
>>
>  --
> 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: Embed pdf into gwt app

2011-08-15 Thread Ivan Pulleyn
Depending on your requirements, you may find the pdfjs project useful:

http://andreasgal.github.com/pdf.js/

Ivan...

On Tue, Aug 16, 2011 at 5:38 AM, karim duran  wrote:

> Hi Papick,
>
> In my opinion, the problem is not about your iframe or any GWT container.
> Concerning  or , i think you should use the standard way
> provided by W3C specifications e.g .
>
> GWT provides cross-browser support for rendering. But don't process
> media-type rendering.
>
> Remember that if your browser can find a plugin to display a media-type
> (PDF in your case), the media-type will display in your browser as you
> expect.
>
> If your browser can't find a plugin, it calls the system default
> application for this media-type ( Adobe Reader for exemple in your case with
> PDF ).
>
> But, from the point of view of the user of your application, *you don't
> have any control on how his browser will behave*. I mean that when the
> user browser meet the  tag, it can display the PDF as you expect
> because the Adobe Reader plugin is on the user system; Or it can call the
> Adobe Reader desktop application because the plugin is not available for his
> browser.
>
> In firefox, you can force the behavior for a media-type. Go to ->
> preference -> application, and search PDF document. You can see many actions
> the browser can provide. You can choose the one interesting you.
>
> to know about installed plugins for your browser, just type url
> "about:plugins".
>
> Regards.
>
> Karim Duran
>
>
> 2011/8/15 P.G.Taboada 
>
> hello,
>>
>> I am tryring to display PDF files in my app. Unfortunately, Firefox
>> and Safari are downloading the PDF instead of showing them embedded.
>>
>> I tried "object" and "embed" and an iframe element, the PDF always
>> gets downloaded. When using embed or object it even messes with the
>> history, the app get thrown back in history (I am using Places/MVP).
>>
>> Did anyone succeed in showing a PDF?
>>
>> 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.
>

-- 
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: Why this code can't get the event??

2011-08-12 Thread Ivan Pulleyn
I notice that you are removing the widget from it's parent. That doesn't
seem correct.

On Fri, Aug 12, 2011 at 12:55 PM, yourenzhuce  wrote:

> I want to add a div on TextBox, when textbox's value is empty, the div
> will be show.
> It look good, but it can't receive the event. the EventHandler does
> not take effect.
>
> What's the problem??
>
> The code is:
> 
>public static HTML insertLabelUpon(final ValueBoxBase widget) {
>final HTML label = new HTML();
>label.setStyleName("PlugInLabel");
>
>Element parent = widget.getElement().getParentElement();
>if (parent == null) return null;
>Element div = DOM.createDiv();
>widget.removeFromParent();
>parent.appendChild(div);
>div.appendChild(widget.getElement());
>div.appendChild(label.getElement());
>
>div.getStyle().setProperty("position", "relative");
>DOM.setStyleAttribute(label.getElement(), "position",
> "absolute");
>
>label.addClickHandler(new ClickHandler() {
>@Override
>public void onClick(ClickEvent event) {
>widget.setFocus(true);
>}
>});
>widget.addFocusHandler(new FocusHandler() {
>@Override
>public void onFocus(FocusEvent event) {
>label.setVisible(false);
>}
>});
>widget.addBlurHandler(new BlurHandler() {
>@Override
>public void onBlur(BlurEvent event) {
>Object value = widget.getValue();
>if(value != null && value != "") {
>label.setVisible(false);
>} else {
>label.setVisible(true);
>}
>}
>});
>
>return label;
>}
> 
>
> the CSS:
> 
> .PlugInLabel {
>position: absolute;
>font: 11px tahoma,arial,verdana,sans-serif !important;
>left: 5px !important;
>color: #99;
> }
> 
>
> --
> 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: Cannot deserialized ArrayList object in GWT 2.3

2011-08-09 Thread Ivan Pulleyn
Is you object a plain-old Java object? Are you using any persistence engine
on the server like Hibernate? Sometimes that can cause serialization issues,
especially when something like Javassist manipulates byte code on the
server.

Ivan...

On Wed, Aug 10, 2011 at 3:35 AM, BM  wrote:

> I am getting this weird error "The response could not be deserialized"
> during RPC call using GWT 2.3. I looked for similar threads on this
> forum but their problem seems to be different than mine. Here is the
> complete stack trace.
>
> Also my ArrayList contains an Object which implements Serializable and
> has properties with data types as String, Boolean and Date. All the
> data types seems to have implemented Serializable interface. Please
> help.
>
>
> com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: The
> response could not be deserialized
>at
>
> com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:
> 221)
>at
> com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:
> 287)
>at com.google.gwt.http.client.RequestBuilder
> $1.onReadyStateChange(RequestBuilder.java:395)
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 39)
>at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
> 25)
>at java.lang.reflect.Method.invoke(Method.java:597)
>at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:
> 103)
>at
> com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:
> 71)
>at
>
> com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:
> 167)
>at
>
> com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:
> 326)
>at
>
> com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
> 207)
>at
> com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
> 132)
>at
> com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
> 561)
>at
> com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:
> 269)
>at
>
> com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:
> 91)
>at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
>at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214)
>at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
>at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
> 25)
>at java.lang.reflect.Method.invoke(Method.java:597)
>at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:
> 103)
>at
> com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:
> 71)
>at
>
> com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:
> 167)
>at
>
> com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:
> 281)
>at
>
> com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
> 531)
>at
>
> com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
> 352)
>at java.lang.Thread.run(Thread.java:619)
> Caused by: com.google.gwt.user.client.rpc.SerializationException:
> java.util.ArrayList/3821976829
>at
>
> com.google.gwt.user.client.rpc.impl.SerializerBase.getTypeHandler(SerializerBase.java:
> 153)
>at
>
> com.google.gwt.user.client.rpc.impl.SerializerBase.instantiate(SerializerBase.java:
> 114)
>at
>
> com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:
> 111)
>at
>
> com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:
> 119)
>at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter
> $ResponseReader$8.read(RequestCallbackAdapter.java:106)
>at
>
> com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:
> 214)
>... 27 more
>
> --
> 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.

Re: why does DockLayoutPanel care about the order of its elements?

2011-08-09 Thread Ivan Pulleyn
DockLayoutPanel assumes that "center" is all the space that wasn't taken up
by a component that was added to the north, east, etc. There's a built in
assumption that when you call add() you have finished adding any components
that will be docked to an edge.

Ivan...

On Wed, Aug 10, 2011 at 3:09 AM, frische  wrote:

> Hi,
> why does DockLayoutPanel need its Center Element last? Also, why does
> GWT Designer allow that? Should I file a bug?
>
> The error thrown if you add an element after the center is:
> "
> dockLayoutPanel.addEast(stackLayoutPanel, 12.0)
>
> Exception during method invocation evaluation
> An exception happened during evaluation of
>
> dockLayoutPanel.addEast(stackLayoutPanel, 12.0)
>
> Method public void
>
> com.google.gwt.user.client.ui.DockLayoutPanel.addEast(com.google.gwt.user.client.ui.Widget,double)
> was used with the parameters { class="gwt-StackLayoutPanel">  style="position: absolute; overflow-x: hidden; overflow-y: hidden;
> ">Empty
> StackLayoutPanel.Header,12.0}.
>  "
>
>
> GWT 2.3 , gwt designer core 2.3.2.r37x201107161253
>
> --
> 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.