Select(listbox) box with custom selection image arrow in GWT 2.0

2009-11-20 Thread mnenchev
Hi,

Is it possible to create select(list) box with custom image for the
selection arrow? the standard gwt list box does not use any resources
so i think it can't be customized for that, so i need to create my own
widget?
Regards.

--

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




google-web-toolkit@googlegroups.com

2009-11-17 Thread mnenchev
Hi, i have image 1x600px that i need to "repeat" as panel background.
I am using CssResource and Client Bundle but i do not know how to do
it or i am missing somthing. I use  @ImageOptions
(repeatStyle=RepeatStyle.Horizontal), but it seems it is not working?
I am using gwt 2.0 MS2. The image is just rendered once(not repeated
in order to create background). Pleas could you give me some example
how to do this with CssResource and ClientBundle.
Regards.

--

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




Re: GWT + light streamer = integration problems

2009-08-05 Thread mnenchev

Hi, all.
I resolved my PushPage is not defined error, just with adding $wnd
like this var pushpage = new $wnd.PushPage() but i'm getting Error:
Permission denied to get property Window.PushPage because of the same
origin policy. Amy idea how to fix this?
regards.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



GWT + light streamer = integration problems

2009-08-04 Thread mnenchev

Hi, all i need to integrate gwt with lightstreamer. I have some
problems connected with how to call js in gwt. I have been using
native methods before but this time something is going wrong and i
can't understand what.

So here is every thing explained in brief:

Lightstreamer has 2 .js lib files. I include them in my host page and
they are loaded successfully.
I wrote native method that calls some js code that subscribes for ls
feeder:

private static native void init(ListGrid grid, ListGridRecord record,
int recordIndex) /*-{
try {
var page = new PushPage();
page.context.setDomain("localhost");
page.onEngineCreation = function(engine) {
engine.connection.setLSHost("localhost");
engine.connection.setLSPort();
engine.connection.setAdapterName("HELLOWORLD");
engine.changeStatus("STREAMING");
}
page.bind();
page.createEngine("HelloWorldApp", "LS/", 
"SHARE_SESSION");

var schema = new Array("message","timestamp");
var group = new Array("greetings");

var nvt = new NonVisualTable(group,schema,"MERGE");
nvt.setSnapshotRequired(true);
var c = 1;
nvt.onItemUpdate = function(item, itemUpdate, itemName) 
{
if (itemUpdate.isValueChanged("message")) {
var msg = itemUpdate.getNewValue("message");
var ts = itemUpdate.getNewValue("timestamp");
if (c == 1)  {
alert(msg + " " + ts);
c+= 1;
}
record.setAttribute("message", msg);
record.setAttribute("timestamp", ts);
grid.refreshRow(recordIndex);
}


}

page.addTable(nvt,"hellotable");
} catch(error) {
alert(error);
}
}-*/;'

The same code executed in html page is working, but if i call it from
onModuleLoad()
the alert(error) shows me an error: PushPage is not defined and
PushPage is defined in the external lightstreamer js lib files, which
i included in my host page.

Here is working code in html page:




  
  



loading...

loading...




Updates:





var page = new PushPage();
page.context.setDomain("localhost");
page.onEngineCreation = function(engine) {
engine.connection.setLSHost("localhost");
engine.connection.setLSPort();
engine.connection.setAdapterName("HELLOWORLD");
engine.changeStatus("STREAMING");
}
page.bind();
page.createEngine("HelloWorldApp", "LS/", 
"SHARE_SESSION");



var schema = new Array("message","timestamp");

var group = new Array("greetings");



var nvt = new NonVisualTable(group,schema,"MERGE");

nvt.setSnapshotRequired(true);



nvt.onItemUpdate = function(item, itemUpdate, itemName) {
var updateText = "updating item " + itemName + ". ";



if (itemUpdate.isValueChanged("message")) {

updateText += "New value for last_price: " + 
itemUpdate.getNewValue
("message");

}



document.getElementById("container").innerHTML += updateText + 
"
"; } page.addTable(nvt,"hellotable"); In the gwt application i want to update some grid row and in the html application i update some div as you can see. So the main problem is why PushPage is not defined? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---

GWT + Base64 encode Java object on server and decode on client

2009-07-14 Thread mnenchev

Hi, dear members,
Is it possible to base64 encode some java object( DTO) on the server
and send it to gwt client side, where i need to restore (decode it to
the same DTO object)?
Here is why i need this:
I have a servlet, that sends sends messages to active mq queue. I have
gwt client that uses active mq ajax to update some table with the
messages. Active mq needs the messages to be strings, and i manually
create object->string but it is annoying and not flexible. So what i
need to encode my objects in the servlet to base64 strings and send
them to the queue and when the gwt receives the base64 string it just
must decode it to the original DTO object.
Is this possible and how to do it?

Regards.

--~--~-~--~~~---~--~~
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: Need help in developing a simple application with GWT

2009-06-18 Thread mnenchev

Hi, all you need are 2 links that point to host page of the module.

srihari wrote:
> Hi,
>
> I went through quite a few discussions but still I am not clear how to
> use multiple modules while organizing the project.
>
> I attempted to develop a simple application which has two modules with
> different html pages. There will be a main host page where there will
> be two buttons, if click one of them one of the module should get
> loaded.
>
> Please, can any one provide me a good example to achieve the above?
>
> While reading the tutorial at
> http://code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects.html#DevGuideModuleXml,
> under 'Loading multiple modules in an HTML host page', point #2 is
> been suggested as the best way, how to achieve this is
> .gwt.xml?
>
> Thank You,
> Srihari
>
> >
>   


--~--~-~--~~~---~--~~
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: Event handler for model ?

2009-06-12 Thread mnenchev


Well what exactly you want to do?

Dalla wrote:

> Could you please post some examples will?
> Or maybe send me some code? mnenchevs example was good, but more
> examples never hurt :-)
>
> On 11 Juni, 14:08, Will  wrote:
>   
>> That's what I use as well.  I created an Abstract Class with
>> Hashmap for removing a handler
>> (because HandlerManager.removeHandler(..) is depricated) and use that
>> for all my UI components that create custom events.  I then create sub-
>> Classes of EventHandler for each logical group of events but that's
>> just to help keep the project readable.  Doing it once for the base UI
>> class didn't seem overweight but we'll see how it performs once I get
>> the project into a perf test.
>>
>> On Jun 10, 8:40 am, Dalla  wrote:
>>
>>
>>
>> 
>>> Hi
>>>   
>>> I´m having trouble understanding how to implement an event handler for
>>> my custom objects with the new event handler system. Let´s pretend I
>>> have a very simple model class like this one:
>>>   
>>> public class ArrivalData {
>>> private Date date;
>>> private boolean processing = false;
>>>   
>>> public Date getDate() {
>>> return date;
>>> }
>>>   
>>> public void setDate(Date date) {
>>> this.date = date;
>>> }
>>>   
>>> }
>>>   
>>> When setDate is called, I want to fire an event that my view
>>> components can listen on, and act on when called for.
>>> How would you go about doing that? Are there any existing handler
>>> interfaces that can be used?
>>> I found this tutorial (see link below), but it seems pretty
>>> complicated for what I´m trying to 
>>> acheive.http://www.itsolut.com/chrismusings/2009/04/28/business-events-with-g...
>>>   
>>> What´s best practice here?
>>>   
> >
>   


--~--~-~--~~~---~--~~
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: Event handler for model ?

2009-06-11 Thread mnenchev

Here you are some simple example, witch is not the best example but 
would point you:

public interface MyHandler {

 public void handle(T t);
}

public class ArrivalData {
private Date date;
private boolean processing = false;
private List> dateHandlers = new 
ArrayList();

public void addHandler(MyHandler h) {
dateHandlers.add(h);
}

public Date getDate() {
return date;
}

public void setDate(Date date) {
this.date = date;
for(MyHandler h : dateHandlers) {
h.handle(date);
}
}

}

public class CustomObject implements MyHandler {



@Override
public void handle(Date date) {
// receive data from setDate(..);
// handle it in some way
}


}




Dalla wrote:
> No clues anyone?
>
> On 10 Juni, 14:40, Dalla  wrote:
>   
>> Hi
>>
>> I´m having trouble understanding how to implement an event handler for
>> my custom objects with the new event handler system. Let´s pretend I
>> have a very simple model class like this one:
>>
>> public class ArrivalData {
>> private Date date;
>> private boolean processing = false;
>>
>> public Date getDate() {
>> return date;
>> }
>>
>> public void setDate(Date date) {
>> this.date = date;
>> }
>>
>> }
>>
>> When setDate is called, I want to fire an event that my view
>> components can listen on, and act on when called for.
>> How would you go about doing that? Are there any existing handler
>> interfaces that can be used?
>> I found this tutorial (see link below), but it seems pretty
>> complicated for what I´m trying to 
>> acheive.http://www.itsolut.com/chrismusings/2009/04/28/business-events-with-g...
>>
>> What´s best practice here?
>> 
> >
>   


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



GWT + JBOSS

2009-06-09 Thread mnenchev

Hi, could someone help me pls.

I create dynamic web project in eclipse. Start jboss server from
eclipse( view servers and add to it my project). In cypal run
configuration i set port 8080 and uncheck use built in server in order
to use my jboss).

When i start the jboss from eclipse it deploys me Test.war:
META-INF
WEB-INF
lib
  
classes
test
   Test.gwt.xml
public
   Test.html
client
Test.class  // the entry point
web.xml

When i run the application in hosted mode it gives me that it could
not find the host page.
Where is my mistake?
Regards.

--~--~-~--~~~---~--~~
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: Accessing a DB

2009-06-09 Thread mnenchev

WEB-INF is privete directory, no one outside could access it. So, 
storing username and pass there is totally secured, but i have never 
tried it. As i told you it is secured dont warry.

Sean wrote:
> So, not to be paranoid or anything, but there are no tricks or
> anything to get into the WEB-INF folder and beyond? If I try to access
> it from a browser I do get the 403 (FORBIDDEN) error, I just want to
> make sure there's no quick turn around for that. I guess I lied, I am
> paranoid. Thanks for your help!
>
> On Jun 9, 7:55 am, mnenchev  wrote:
>   
>> Every thing witch is in your server package is on the server, so no one
>> could access your private data. It is like in hibernate, that has
>> hibernate config file where the user and pass are stored. This config
>> file is on the server and no one has access to it.
>>
>> Sean wrote:
>> 
>>> In regards to using RPC's to access a database, I am worried about
>>> security. I'd love to use an RPC to access a DB, but what I can't
>>> figure out is how to store the name and pw of the DB. I'm afraid if I
>>> put it right in the code someone could just read it. If I try to read
>>> it from a file, I'm afraid that they will see the path to the file and
>>> read it.
>>>   
>>> Is it secure enough to put the PW in a locked directory from the
>>> outside world and read it? I'm afraid it'd be too easy to break in.
>>> How do you do it?
>>>   
> >
>   


--~--~-~--~~~---~--~~
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: Accessing a DB

2009-06-09 Thread mnenchev

Every thing witch is in your server package is on the server, so no one 
could access your private data. It is like in hibernate, that has 
hibernate config file where the user and pass are stored. This config 
file is on the server and no one has access to it.

Sean wrote:
> In regards to using RPC's to access a database, I am worried about
> security. I'd love to use an RPC to access a DB, but what I can't
> figure out is how to store the name and pw of the DB. I'm afraid if I
> put it right in the code someone could just read it. If I try to read
> it from a file, I'm afraid that they will see the path to the file and
> read it.
>
> Is it secure enough to put the PW in a locked directory from the
> outside world and read it? I'm afraid it'd be too easy to break in.
> How do you do it?
> >
>   


--~--~-~--~~~---~--~~
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: Client side vs Server side models

2009-06-08 Thread mnenchev

What if the persistence layer is ejb for example?

Miroslav Genov wrote:
> You don't have any problems to access client classes from server side 
> code. Just put all your model classes into client package
> and use them in the persistence layer.
>
>
> Kwhit wrote:
>   
>> I'm building my first serious GWT app and am looking for a 'template'
>> model to structure things. On the client side I need much the same
>> objects to populate the UI as on the server side to handle
>> persistence. Let's say I need Employee on the client side to edit
>> employee details and then I need Employee on the server side to
>> persist it.
>>
>> As I understand it client side objects must be located in the
>> package client.* and persistent objects in ...server.*. Therefore
>> I need two Employee.java files - with slightly different contents -
>> the one on the client side acting more or less only as a value object.
>>
>> Have I got things right?
>>
>> 
>>   
>> 
>
>
> >
>   


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



GWT + hosted mode + jboss

2009-06-06 Thread mnenchev

Hi, all,

I dig the web, but i could not find how to run hosted mode with
external jboss.

Here is what i do:

1) Create web project with google plugin for eclipse, that creates me
"hello world" project with gwt.

2) test it within the internal server and it works.

3) Add new server runtime jboss 4.2.

4) Change the project facets -> runtimes check jboss.

5) run configurations -> set the port 8080 and uncheck the "use
default server" checkbox

6) Start the jboss from eclipse(view servers)

6) run the application with the google plugin

When the hosted browser is displayed it says that it could not find
the resource on the server.

So my question is how to deploy on the server, if i have to do it
every time when i change something this host mode is useless with
external server.  I also added -noserver, but the application is not
deployed on the jboss so the effect is the same. How to manage this. I
look all over the net but i could not find any complete example how to
do this, every one just says use -noserver, but that does not solve
the problem.

Pls help me i am new with gwt.
Regards.

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