Re: Generate URL to image stored on server

2012-06-06 Thread Piro
I don't think you can access files in this manner. If it would be possible it 
would mean you can access any file on server(no security). 

What you have to do is to store the file anywhere and generate some sort of ID 
for it. Then you need to implement HTTP GET request by servlet. Servlet will 
need to map ID to file location and write file to response (and set some things 
like content type).

Iam sure there are other ways (REST,...).
Piro

-- 
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/-/hldf-fpDy98J.
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 GWT 2.4 RC1

2011-10-13 Thread Piro
Get inspired by ButtonCell source code. All you need is to set image
as css background. But css styles doesn't work. At least they didn't
use to. You have to create button with own css class name and define
background image for css class. Something like .
 Or use  tag and set hand cursor (through css class too).

On 13. Okt, 14:58 h., Ash  wrote:
> Hi All,
>
> Did anyone managed to add a image to a cell that can be clicked (or a
> button with image on it)??
>
> I'm trying from last two days.. plz help.
>
> Thanks,
> -ash
>
> On Aug 15, 6:55 pm, NR  wrote:> Thank you all. Adding 
> the DataGrid directly to a LayoutPanel works.
>
> > On Aug 15, 8:02 am, Jeff Larsen  wrote:
>
> > > DockPanel mainPanel = new DockPanel();
>
> > > DockPanel isn't a LayoutPanel. Try DockLayoutPanel.

-- 
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: What's a good widget for a small table?

2011-10-08 Thread Piro
I would use CellTable even if it says it is ideal for large amount of
data. The "ideal" sentence only says that CellTable has no performance
issues with large amount of data because it supports paging (if you
need it) and renders only visible cells. If you are not familiar with
cell widgets it can take some time, but it is worth.
On 8. Okt, 18:21 h., "Aidan O'Kelly"  wrote:
> Well Grid uses a html  to work, yes. The point is when working with
> UiBinder you can use normal HTML markup to make a widget, so you can do:
>
> 
>   
>     
>        Name
>     
>     
>         Phone
>     
>   
> 
>
> Jeff: I guess it reduces DOM complexity, and improves performance (almost
> certainly negligible in most cases, unless your widget is large and needs to
> be created many times over) In any case, I'm not saying this approach is
> better or worse than using Panels, its just the approach I take.
> The obvious disadvantage is that its a static table, you can't really modify
> it at runtime easily. If you need a dynamic table, Panels/FlexTable/Grid are
> more suited.
>
>
>
>
>
>
>
> On Sat, Oct 8, 2011 at 4:39 PM, Mike Dee  wrote:
> > Wouldn't that be a Grid control?  Would a Grid control be a little
> > heavy handed in that it seems to be designed to handle widgets in its
> > cells.
>
> > A property table - or something like that - seems ideal (if it
> > existed).
>
> > On Oct 8, 8:30 am, Jeffrey Chimene  wrote:
> > > On 10/8/2011 7:29 AM, Aidan O'Kelly wrote:
>
> > > > Well, its creating a table with a table for each row.. to end up with
> > > > a table structure...
> > > > If its a statically sized table, you can just write the 
> > > > structure yourself in UiBinder, and place Widgets/Text in each .
>
> > > Is that to to reduce DOM complexity, time to implementation,
> > > performance? Or some other factor I'm not understanding?
>
> > > > On Sat, Oct 8, 2011 at 2:53 PM, Jeffrey Chimene  > > > > wrote:
>
> > > >     On 10/8/2011 4:23 AM, benneq wrote:
> > > >     > A vertical panel containing several horizontal panels SOUNDS
> > pretty
> > > >     > straight forward, indeed.
> > > >     > BUT: Do it, look at you dom tree, and see that it's totally ugly!
> > > >     > It is: A  (vertical panel) containing several
> > > >     >  (1 horizontal
> > panel).
>
> > > >     Sorry, I'm missing the point here...
>
> > > >     > On 7 Okt., 22:45, Jeff Chimene  > > >     > wrote:
> > > >     >> On 10/07/2011 01:38 PM, Mike Dee wrote:
>
> > > >     >>> I have small data tables that I'd like to display.  In the
> > widget
> > > >     >>> showcase for DataGrid and CellTable it says they are ideal for
> > > >     large
> > > >     >>> amounts of data.
> > > >     >>> The goal is to display detail info.  For example, to display a
> > > >     single
> > > >     >>> record from a database - not a bunch of records from a
> > > >     database.  So
> > > >     >>> the columns of the database will be different.  Think of
> > something
> > > >     >>> like:
> > > >     >>> Name: John Doe
> > > >     >>> Address: Main St.
> > > >     >>> Phone: 555-1234
> > > >     >>> I was thinking a PropertyTable would be ideal.  It doesn't
> > exist,
> > > >     >>> although they have something similar in SmartGWT, which I'd
> > > >     like to
> > > >     >>> avoid for now.
> > > >     >>> Any ideas would be appreciated.
> > > >     >> I'd probably create a custom widget based on using ui.xml  It
> > > >     might not
> > > >     >> even be a widget, just an MVP instance. From your description
> > > >     it sounds
> > > >     >> like a Popup enclosing a VerticalPanel enclosing several
> > > >     >> HorizontalPanels. Very simple, very straightforward to
> > implement.
>
> > --
> > 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: Bean Validation: Client vs Server

2011-10-03 Thread Piro
What methods are you using with Pattern/RegExp. String.matches isn't
enough?

On 3. Okt, 00:53 h., objectuser  wrote:
> I'm differentiating validations to be run on the client vs. the server using
> validation groups.
>
> However, I have one validation for which I'd like a different implementation
> the client, due to the unavailability of the Pattern class there.  So on the
> client, I'd like to use the GWT RegExp class, while on the server, I'd like
> to use the JDK Pattern class.
>
> So far, I've not figured out a way to do this.  It seems like the only place
> to specify the validator class is in the validatedBy property of the
> @Constraint annotation.
>
> I even tried creating two different custom validation annotations, but the
> validation framework still seems to load the server version, and I get a
> runtime error due to the unavailability of the Pattern class.
>
> Thanks for any advice.

-- 
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: GWT CELLTABLE : How to add empty row in celltable with different celltype

2011-08-11 Thread Piro
You need custom cell that overrides render method to choose proper
cell to render. Something like this:

MyCell extends AbstractCell .
.
...
@Override
public void render(Cell.Context context, C value,
com.google.gwt.safehtml.shared.SafeHtmlBuilder sb) {
Cell cell = getCell(context, value);
actual = cell;
cell.render(context, value, sb);
};

public abstract Cell getCell(Cell.Context context, C value);

Actual cell should be stored to be receiver of browser events in
onBrowserEvent

@Override
public void onBrowserEvent(Cell.Context context, Element parent, C
value, NativeEvent event, ValueUpdater valueUpdater) {
if (actual == null) {
return;
} else {
actual.onBrowserEvent(context, parent, value, event, 
valueUpdater);
}
};


On Aug 11, 9:13 am, vaibhav bhalke  wrote:
> Hi,
>
> How to add empty row in celltable with different celltype ?
>
> 4 columns present in my celltable i.e
> DatePickerCell,EditTextCell,NumberCell,SelectionCell
>
> I can able to set record values in cell with different celltype.
>
> I want to add empty row with different cell type in celltable also want few
> of them editable and rest are non-editable.
>
> I want to do MassUpdate in Celltable.So I required 1st row as empty because
> whenever I will change value in particular cell which editable then all
> values in that column should be updated immediately
>
> Suppose I edited value in edittextcell of 1st empty row then all values in
> same column should be edited immediately.
>
> Any help or guidance in this matter would be appreciated
>
> --
> Best Regards,
> Vaibhav Bhalke
>
> 

-- 
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: GWT Validation framework

2011-08-08 Thread Piro
Just google gwt validation!
I recommend gwt-vl too. It is not perfect but it works.
I use it since i did not get built in validation to work (http://
code.google.com/p/gwt-validation/).


On 8. Aug, 09:13 h., RVSN  wrote:
> Thanks Juan.
>
> That seems to be custom validation framework. Can you pls let me know
> that is there any in-build validation framework in GWT??
>
> On Aug 5, 9:31 pm, Juan Pablo Gardella 
> wrote:
>
>
>
>
>
>
>
> > I recommend gwt-vl 
>
> > 2011/8/5 RVSN 
>
> > > I'm a naive to Gwt. I'm trying to implementing GWT validation
> > > framework. but i couldnt make this.
> > > Could anyone pls help me to implementing GWT validation framework in
> > > my web application. For this I need some samples. pls help me out 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: how to open a new window with output of other file in GWT

2011-07-01 Thread Piro
You can also manually invoke Window.open(String,String,String)

On 30. Jún, 23:05 h., Eric Metcalf  wrote:
> There is a way to open a new window with results from a click, but it may
> not be the best solution for what you want.  What are you trying to display?
>
> You will have the Anchor target set to "_blank" or similar.  In the Url you
> will need to provide the page you want and any parameters.  Something
> similar tohttp://127.0.0.1:/index.html#myPage!param1=value1. This will
> load your entire application in the new window.  Now you need to display
> GTDWeb2 by having your app see the page/parameters passed and display the
> appropriate page. Hopefully your using history and can just call
> History.getToken() to get the page/parameters.

-- 
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: Regular expression email validation in GWT

2011-06-25 Thread Piro
I had problems with validation framework so i changed it to gwt-vl
http://gwt-vl.sourceforge.net/
You can try it too. It is perfect framework, but it works. It is not
using annotations so it is more verbose.
More about email regex: http://www.regular-expressions.info/email.html

On 24. Jún, 07:37 h., creativepragmatic 
wrote:
> Hello,
>
> I am trying to validate a form using gwt-validation but have not been
> having any success validating the email field of a POJO.  The field is
> annotated as follows:
>
>         @NotNull
>         @Pattern(regexp = ".+@.+\\.[a-z]+")
>         private String email;
>
> Whenever Pattern is annotated to the above code, it fails after the
> following line that I modeled after Gwt_validation_sample:
>
>         Set> violations =
> validator.validate(email);
>
> I have added the following JARs to the classpath:
>
>         dom4j-1.6.1
>         freemarker-gae-2.3.18
>         guava-r09
>         gwt-validation-2.0-preview-r199
>         javassist
>         reflections-0.9.5-RC2
>         reflections-0.9.5-RC2.one
>         slf4j-api-1.6.1
>         validation-api-1.0.0.GA-sources
>         validation-api-1.0.0.GA
>
> I am not sure if they are all required.
>
> Thank you in advance for any help,
>
> Orville

-- 
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: Error while updating/installing the Eclipse plugin

2011-06-21 Thread Piro
Are you installing over internet? You can try installation from packed
installation site.
http://code.google.com/intl/en-EN/eclipse/docs/install-from-zip.html

On 20. Jún, 20:00 h., ToddySM  wrote:
> I am hitting an error while updating/installing the plugin. Here the
> details:
>
> An error occurred while collecting items to be installed
> session context was:(profile=epp.package.jee,
> phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=,
> action=).
> Artifact not found: osgi.bundle,com.google.appengine.eclipse.core,
> 2.3.1.r36v201105092302.http://dl.google.com/eclipse/plugin/3.6/plugins/com.google.appengine
> Unable to read repository 
> athttp://dl.google.com/eclipse/plugin/3.6/plugins/com.google.gdt.eclips
> Invalid argument: setsockopt
> Artifact not found: osgi.bundle,com.google.gdt.eclipse.maven,
> 2.3.1.r36v201105092302.http://dl.google.com/eclipse/plugin/3.6/plugins/com.google.gdt.eclips...
> Artifact not found: osgi.bundle,com.google.gdt.eclipse.platform,
> 2.3.1.r36v201105092302.http://dl.google.com/eclipse/plugin/3.6/plugins/com.google.gdt.eclips...
> Artifact not found:
> osgi.bundle,com.google.gdt.eclipse.platform.e36,2.3.1.r36v201105092302.http://dl.google.com/eclipse/plugin/3.6/plugins/com.google.gdt.eclips...
> Artifact not found: osgi.bundle,com.google.gdt.eclipse.platform.shared,
> 2.3.1.r36v201105092302.http://dl.google.com/eclipse/plugin/3.6/plugins/com.google.gdt.eclips...
> Artifact not found: osgi.bundle,com.google.gdt.eclipse.suite,
> 2.3.1.r36v201105092302.http://dl.google.com/eclipse/plugin/3.6/plugins/com.google.gdt.eclips...
> Artifact not found: osgi.bundle,com.google.gwt.eclipse.core,
> 2.3.1.r36v201105092302.http://dl.google.com/eclipse/plugin/3.6/plugins/com.google.gwt.eclips...
> Artifact not found: osgi.bundle,com.google.gwt.eclipse.oophm,
> 2.3.1.r36v201105092302.http://dl.google.com/eclipse/plugin/3.6/plugins/com.google.gwt.eclips...
> Artifact not found: osgi.bundle,com.google.appengine.eclipse.sdkbundle,
> 1.5.0.r36v201105092302.http://dl.google.com/eclipse/plugin/3.6/plugins/com.google.appengine
> Artifact not found:
> org.eclipse.update.feature,com.google.appengine.eclipse.sdkbundle.e36.featu 
> re,
> 1.5.0.r36v201105092302.http://dl.google.com/eclipse/plugin/3.6/features/com.google.appengine...
> Artifact not found: osgi.bundle,com.google.gdt.eclipse.gph,
> 2.3.1.r36v201105092302.http://dl.google.com/eclipse/plugin/3.6/plugins/com.google.gdt.eclips...
> Artifact not found:
> osgi.bundle,com.google.gdt.eclipse.gph.e36,2.3.1.r36v201105092302.http://dl.google.com/eclipse/plugin/3.6/plugins/com.google.gdt.eclips...
> Artifact not found: osgi.bundle,com.google.gdt.eclipse.gph.hge,
> 2.3.1.r36v201105092302.http://dl.google.com/eclipse/plugin/3.6/plugins/com.google.gdt.eclips...
> Artifact not found: osgi.bundle,com.google.gdt.eclipse.gph.subclipse,
> 2.3.1.r36v201105092302.http://dl.google.com/eclipse/plugin/3.6/plugins/com.google.gdt.eclips...
> Artifact not found: osgi.bundle,com.google.gdt.eclipse.gph.subversive,
> 2.3.1.r36v201105092302.http://dl.google.com/eclipse/plugin/3.6/plugins/com.google.gdt.eclips...
> Artifact not found: osgi.bundle,com.google.gdt.eclipse.login,
> 2.3.1.r36v201105092302.http://dl.google.com/eclipse/plugin/3.6/plugins/com.google.gdt.eclips...
> Artifact not found: osgi.bundle,com.google.gdt.eclipse.managedapis,
> 2.3.1.r36v201105092302.http://dl.google.com/eclipse/plugin/3.6/plugins/com.google.gdt.eclips...
> Artifact not found:
> org.eclipse.update.feature,com.google.gdt.eclipse.suite.e36.feature,
> 2.3.1.r36v201105092302.http://dl.google.com/eclipse/plugin/3.6/features/com.google.gdt.eclip...
> Artifact not found: osgi.bundle,com.google.gwt.eclipse.sdkbundle,
> 2.3.0.r36v201104261928.http://dl.google.com/eclipse/plugin/3.6/plugins/com.google.gwt.eclips...
> Artifact not found:
> org.eclipse.update.feature,com.google.gwt.eclipse.sdkbundle.e36.feature,
> 2.3.0.r36v201104261928.http://dl.google.com/eclipse/plugin/3.6/features/com.google.gwt.eclip...

-- 
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: Hide CellList on selection of cell

2011-06-20 Thread Piro
Scheduled command didn't work as expected (It still throws exception
when hiding in deffered command). So i put deffered command in
deffered command, and it works! Here is program i created:

private final ScheduledCommand hideCommand2 = new ScheduledCommand() {

@Override
public void execute() {
setVisible(false);
}
};

private final ScheduledCommand hideCommand = new ScheduledCommand() {

@Override
public void execute() {
Scheduler.get().scheduleDeferred(hideCommand2);//WORK

//doesn't work setVisible(false);
}
};

private final SelectionChangeEvent.Handler selectionHandler = new
Handler() {
@Override
public void onSelectionChange(SelectionChangeEvent event) {
Customer c = selectionModel.getSelectedObject();
if (c == null) {
return;
}
customerEditor.setCustomer(c);
Scheduler.get().scheduleDeferred(hideCommand);
}
};


On Jun 17, 11:04 am, Thomas Broyer  wrote:
> How about slightly delaying the moment when you hide the list?
> Scheduler.get().scheduleDeferred(...) ?

-- 
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 CellList on selection of cell

2011-06-17 Thread Piro
Hi all, i use cell list to select one of customers, and at selection
(through SelectionChangeEvent.Handler ) i hide this list.
Problem is that on selection cell receives focus, but list is hidden
and exception is thrown:

com.google.gwt.core.client.JavaScriptException: (Error): Can't move
focus to the control because it is invisible, not enabled, or of a
type that does not accept the focus

It cause no problems in application, i just want to get rid of
exception. Is there any solution?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-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 set background color for button?

2011-06-08 Thread Piro
Have you tried something like Firebug to see applied css in browser?
It helped me when i was making some css stuff, since i am just css
beginner.

On 7. Jún, 22:17 h., Ryan McFall  wrote:
> I believe you need to make sure that the rule in which you are
> eliminating the background-image has a higher CSS priority than the
> default one.  The rule for the default push-button which is setting
> the background-image contains two class selectors, making it higher
> priority than the rule you've written for .color-icon.
>
> Ryan
>
> On Jun 6, 3:05 pm, Lars Ruoff  wrote:
>
>
>
>
>
>
>
> > Hello,
> > yes, i know, but the problem is that:
> > ToggleButton has its predefined style gwt-Togglebutton or similar.
> > That style defines a background-image for the button.
> > In order to set a background color i need to get rid of the background
> > image.
> > So i defined a style
> > .color-icon {
> >   height: 16px;
> >   width: 23px;
> >   background-image: none;
> >   background-color: #77;}
>
> > and added it with
> >   button.addStyleName("color-icon");
>
> > The size is taken into account, but not the background color.
> > The image is still there.
> > How can i get rid of the background image of the default style?
>
> > On Jun 5, 4:44 pm, Piro  wrote:
>
> > > Use CSS to style buttons.
>
> > >http://code.google.com/intl/sk-SK/webtoolkit/doc/latest/DevGuideUiCss...
>
> > > On 4. Jún, 17:10 h., Lars Ruoff  wrote:
>
> > > > Hello,
>
> > > > how to change the background color of a ToggleButton?
> > > > I want to have ToggleButtons in various colours displayed on my page.
> > > > The buttons are actually for choosing a color in the application.
>
> > > > regards,
> > > > Lars

-- 
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 set background color for button?

2011-06-06 Thread Piro
Use CSS to style buttons.

http://code.google.com/intl/sk-SK/webtoolkit/doc/latest/DevGuideUiCss.html

On 4. Jún, 17:10 h., Lars Ruoff  wrote:
> Hello,
>
> how to change the background color of a ToggleButton?
> I want to have ToggleButtons in various colours displayed on my page.
> The buttons are actually for choosing a color in the application.
>
> regards,
> Lars

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