Re: RequestFactory + collectios

2011-07-29 Thread ecstasy2
Hi.
I would be happy to implement the support for MapS.

Anyclue i should start looking at for this implementation? where
should it be contributed to.

Thanks.

On 13 juil, 17:59, Thomas Broyer  wrote:
> On Wednesday, July 13, 2011 7:48:27 PM UTC+2, frog wrote:
>
> > Hi
>
> > Dev guides say that RF supported collection types are Set and List
> > Is there a way to get around RF this limitation? What do you do if an
> > entity contains a map?
>
> Send a List of "pairs" (make a ValueProxy for that) instead, representing
> the Map#entrySet() (I've seen bugs reported about Sets of proxies, so you'd
> better use a List).
> Map will be supported in due time, as it's already supported at the AutoBean
> level AFAIK.
>
> …or you could contribute the Map support if you really need it and would
> better spend time building it than working around 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.



SingleSelectionModel not firing for root node (CellTree)

2011-07-06 Thread ecstasy2
Hi there.
I'm trying to implement the treeCell Widget in my project, but i'm
having an issue since days now...
The SElectionModel is not firing for my root nodes for some reason. It
get fired thougth for leaf nodes.

Here is my node info code.


@Override
public  NodeInfo getNodeInfo(T value) {
if (value == null) {
// LEVEL 0.
// We passed null as the root value. Return the 
composers.

// Create a data provider that contains the 
list of composers.
rootDataProvider = new 
ListDataProvider(partners);

// Create a cell to display a composer.
Cell cell = new 
AbstractCell() {
@Override
public void render(Context context, 
PartnerDTO value,
SafeHtmlBuilder sb) {
if (value != null) {

sb.appendEscaped(value.getCompanyName());
}
}
};

IconCellDecorator decorator = new
IconCellDecorator(
ICONS.partner_icon(), cell);

// Return a node info that pairs the data 
provider and the cell.
return new 
DefaultNodeInfo(rootDataProvider,
decorator, selectionModelLeaf, 
null, null);
} else if (value instanceof PartnerDTO) {
PartnerDTO dto = (PartnerDTO) value;
// LEVEL 2 - LEAF.
// We want the children of the playlist. Return 
the songs.
ListDataProvider dataProvider 
=
providerForPartners
.get(dto.getPartnerID());

if (dataProvider == null) {
dataProvider = new 
ListDataProvider();

providerForPartners.put(dto.getPartnerID(), dataProvider);

fetchClients(dto.getPartnerID());
}

// Create a cell to display a composer.
Cell cell = new 
AbstractCell()
{
@Override
public void render(Context context, 
ClientDetailsDTO value,
SafeHtmlBuilder sb) {
if (value != null) {

sb.appendEscaped(value.getDisplayName() + " ("
+ 
value.getNumberOfApp() + ")");
}
}
};

IconCellDecorator decorator = 
new
IconCellDecorator(
ICONS.client_icon(), cell);

// Use the shared selection model.
DefaultNodeInfo info = new
DefaultNodeInfo(
dataProvider, decorator, 
selectionModelLeaf, null);
return info;
}

return null;
}

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



Permissions on RequestFactory

2011-06-06 Thread ecstasy2
Hi There.
i'm exposing some @Entity object throught RequestFactory, but i'm
having trouble because there is no built-in support for permissions.
So i need to wrap all the code inside pemission checking.

I fill like this is not a good idea because i don't like mixing
business logic inside the service layer.

Do you have some recommendations on how i should best do this:

Note: i have a role based permission i what to add. There will be 3
roles: "users", "admins", "partners".

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.



Re: Getting ClassNotFound Exception for StringEscapeUtils in GWT-Dev.jar 2.2.0

2011-03-22 Thread ecstasy2
Hi.
Did you find any solution to this problem?

Thanks.

On 4 mar, 03:09, Austin Dworaczyk Wiltshire 
wrote:
> Pretty much as the title says. I'm using GWT 2.2.0, and everything
> compiles without errors in Eclipse.
>
> However, as soon as I use my applications such that it makes a call to
> StringEscapeUtils.escapeHTML(), I get a stack trace and a
> ClassNotFound exception.
>
> Here is my stack trace:
>
> 2011-03-03 18:52:48.615 java[1074:a07] Can't open input server /Users/
> adub/Library/InputManagers/Edit in TextMate
> 2011-03-03 18:52:48.640 java[1074:a07] [Java CocoaComponent
> compatibility mode]: Enabled
> 2011-03-03 18:52:48.640 java[1074:a07] [Java CocoaComponent
> compatibility mode]: Setting timeout for SWT to 0.10
> Initializing AppEngine server
> Logging to JettyLogger(null) via
> com.google.apphosting.utils.jetty.JettyLogger
> Successfully processed /Users/adub/Documents/eclipse_workspace/
> 307W11-3/war/WEB-INF/appengine-web.xml
> Successfully processed /Users/adub/Documents/eclipse_workspace/
> 307W11-3/war/WEB-INF/web.xml
> The server is running athttp://localhost:/
> [ERROR] javax.servlet.ServletContext log: Exception while dispatching
> incoming RPC call
> com.google.gwt.user.server.rpc.UnexpectedException: Service method
> 'public abstract java.lang.String
> edu.calpoly.cpe307.team3.weblat.client.LabToXMLGeneratorService.convertToXM 
> L(org.web_ide.shared.lab.Lab)
> throws edu.calpoly.cpe307.team3.weblat.shared.LTXGException' threw an
> unexpected exception: java.lang.NoClassDefFoundError: org/apache/
> commons/lang/StringEscapeUtils
>         at
> com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
> 385)
>         at
> com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
> 588)
>         at
> com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServi 
> ceServlet.java:
> 208)
>         at
> com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServi 
> ceServlet.java:
> 248)
>         at
> com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(Abstract 
> RemoteServiceServlet.java:
> 62)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
> 511)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1166)
>         at
> com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFi 
> lter.java:
> 58)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at
> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Trans 
> actionCleanupFilter.java:
> 43)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at
> com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFile 
> Filter.java:
> 122)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
> 388)
>         at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
> 216)
>         at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
> 182)
>         at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
> 765)
>         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
> 418)
>         at
> com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEn 
> gineWebAppContext.java:
> 70)
>         at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
> 152)
>         at com.google.appengine.tools.development.JettyContainerService
> $ApiProxyHandler.handle(JettyContainerService.java:351)
>         at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
> 152)
>         at org.mortbay.jetty.Server.handle(Server.java:326)
>         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> 542)
>         at org.mortbay.jetty.HttpConnection
> $RequestHandler.content(HttpConnection.java:938)
>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
>         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>         at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
> 409)
>         at org.mortbay.thread.QueuedThreadPool
> $PoolThread.run(QueuedThreadPool.java:582)
> Caused by: java.lang.NoClassDefFoundError: org/apache/commons/lang/
> StringEscapeUtils
>         at
> edu.calpoly.cpe307.team3.weblat.server.LabToXMLGenerator.cleanseHTML(LabToX 
> MLGenerator.java:
> 307)
>         at
> edu.calpoly.cpe307.team3.weblat.server.LabToXMLGenerator.buildLabElement(La 
> bToX