swfupload-gwt not visible

2011-07-24 Thread Ann Smith
Hi
Has anybody succeeded in using this in a DialogBox?
I've been trying to get it work for couple of days and I'm about to give up.
I copied code from the project's getting started page, I build my swfupload
object in onLoad/show and I can see it attached to the page but for some
reason the upload button isn't visible.
I appreciate any tips.

ta

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



ArrayOutOfBoundsException in editor 2.3

2011-06-14 Thread Ann Smith
hi

before I spend all night debugging  maybe someone can share his
experience with me.
Problem:
gwt 2.2 code works fine -> 2.3 in a single method use of
editor.edit(proxy,context) throws me ArrayOutOfBoundsException

Anyone has had it too?

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: Hibernate session in RequestFactory

2011-03-27 Thread Ann Smith
I think filters were designed for this kind of  job
Have you seen this?
http://stackoverflow.com/questions/4988397/gwt-requestfactory-how-to-use-single-entitymanager-per-request


On Sun, Mar 27, 2011 at 7:27 PM, rwiatr  wrote:

> Thanks for the response Nooonika.
> Unfortunately it doesn't work for me. I'm looking for a mechanism to
> open a session before request is processed and close after (or
> something like that).
> Here's something that works, at least for now.
>
> public class SessionRequestFactoryServlet extends
> RequestFactoryServlet {
>private static final ThreadLocal perThreadSession = new
> ThreadLocal();
>
>@Override
>protected void doPost(HttpServletRequest request,
>HttpServletResponse response) throws IOException,
> ServletException
> {
>
> perThreadSession.set(HibernateUtil.getSessionFactory().openSession());
>try {
>super.doPost(request, response);
>} finally {
>perThreadSession.get().close();
>perThreadSession.set(null);
>}
>}
>
>public static Session getPerThreadSession() {
>return perThreadSession.get();
>}
> }
> in the DAO object:
>@Transient
> public static List rootHierarchyRequest() {
> try {
>Session session = SessionRequestFactoryServlet
>.getPerThreadSession();
> List hList = new
> ArrayList(session
>.createQuery("from Hierarchy where
> parent is null").list());
> return hList;
>} catch (Exception e) {
>e.printStackTrace();
>}
>return null;
>}
> And a servlet entry in web.xml
> app.server.requestfactory.SessionRequestFactoryServlet servlet-class>
>
> RequestFactoryServet uses ThreadLocal variables so I guess it's ok.
> Anyone knows a more suitable way to achieve this? I don't have any
> experience with such thing and I'm afraid it can cause much more
> problems in the future. Anyone has any suggestions?
>
> On 27 Mar, 16:20, Nooonika  wrote:
> > Try: Hibernate.initialize(hList);
> >
> > On Mar 27, 11:47 am, rwiatr  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Hello,
> > > I have a problem with RequestFactory and Hibernate session.
> > > [hibernate.LazyInitializationException] - failed to lazily initialize
> > > a collection of role: app.server.dao.HierarchyImpl.children, no
> > > session or session was closed
> >
> > > @OneToMany(cascade = CascadeType.ALL)
> > > @JoinTable(name = "HIERARCHY_RELATE", joinColumns =
> > > { @JoinColumn(name = "parent_id") }, inverseJoinColumns =
> > > { @JoinColumn(name = "child_id") })
> > > public Set getChildren() {
> > > return children;
> > > }
> >
> > > public static List rootHierarchyRequest() {
> > > int i = 0;
> > > try {
> > > SessionFactory sessionFactory =
> HibernateUtil.getSessionFactory();
> > > Session session = sessionFactory.openSession();
> > > List hList = new
> ArrayList(session
> > > .createQuery("from Hierarchy
> where parent is null").list());
> > > session.close();
> > > return hList;
> > > } catch (Exception e) {
> > > e.printStackTrace();
> > > }
> > > return null;
> > > }
> > > Adding FetchType.EAGER helps but in long terms will not solve my
> > > problem.
> > > Is there a good way to manage Hibernate session by RequestFactory?
>
> --
> 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.