• Welcome to KonaKart Community Forum. Please login or sign up.
 
December 30, 2024, 04:11:13 pm

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - rula

1
Hi KonaKarts,

here the welcome page of my konakart gwt frontend.
http://www.ruladev.de/konakart1gwt/Konakart.html
Thanks all KonaKardians for the good groundwork in onePageCheckout. ;)

Regards, rula
2
Hi Brian,

it seems to work if I do all these things direct in the onSuccess methode of the callback object. Regards, rula
3
Hi Brian,

Quote
I don't understand your problem - because it doesn't make any sense to me.

Ups, I will only navigate through the products array with first, previous, next, last buttons and process the array in seperate methods. First I return the array with one single callback, and then I view the selected products according the navigation buttons. How and where would you do this?
Quote
Are you sure your variables are in scope when you check them?  Have you investigated this by stepping through the debugger?

I have debugged and inside of the callback methode the products variable is correct filled by the result and after the callback it is null.

Regards, rula
4
Hi KonaKarts,

second warm-up ;),
how can I fill member variables with callback results?
In WelcomeBody I have:


private GWT_Product[] products;

/**
* Get the products
*/
AsyncCallback getAllProductsCallback2 = new KKCallback(this)
{
@Override
public void onSuccess(Object result) {
GWT.log("getAllProductsCallback2Succeeded.1", null);
   
            allProducts2 = (GWT_Products) result;
           if (allProducts2 != null){
              GWT.log("allProducts2.getTotalNumProducts.1: " + allProducts2.getTotalNumProducts(), null);             
products = allProducts2.getProductArray(); ...

Here products is filled


getKK().getMyKKGWTService().getAllProducts(getAllProductsCallback2);
GWT.log("products: " + products, null);

Here products isn't filled

If I fill widgets with the results all seems to be o.k. but if I use member variables the values get lost. Please, where is my problem?

Regards, rula
5
Hi KonaKarts,

how can I fill member variables with callback results?

In WelcomeBody I have:

private GWT_Product[] products;

/**
* Get the products
*/
AsyncCallback getAllProductsCallback2 = new KKCallback(this)
{
@Override
public void onSuccess(Object result) {
GWT.log("getAllProductsCallback2Succeeded.1", null);
   
            allProducts2 = (GWT_Products) result;
           if (allProducts2 != null){
              GWT.log("allProducts2.getTotalNumProducts.1: " + allProducts2.getTotalNumProducts(), null);              
products = allProducts2.getProductArray(); ...


6
Hi KonaKarts,
now localized imageBundles are displayed correct in IE7 with default security settings. ;)
Sorry, regards rula.
7
Hi KonaKarts,

my konakart gwt app should use imageBundles, in hosted mode all seems ok, but in web mode in IE the images are not displayed, in firefox there is no problem. In IE I see nothing (only clear.cache.gif in the place of the expected image).  O.K., onePageCheckout not works with imageBundles, but perhaps adminApp. Could this be a caching problem in the gwt tomcat or the IE?  Regards, rula
8
Hi KonaKarts,

thanks for your fine severside untility classes  KKBeanCopierBase, KKBeanCopier and KKGWTServiceImpl!
My gwt app throws exception: java.lang.StackOverflowError

in methode getCategoryTree of class KKGWTServiceImpl.


    public GWT_Category[] getCategoryTree() throws KKGWTException
    {
        try
        {
            KKAppEng appEng = getAppEng();
            CategoryIf[] serverCategorys = appEng.getEng().getCategoryTree(-1, true);

            if (serverCategorys == null)
            {
                return null;
            }

            GWT_Category[] clientCategorys = new GWT_Category[serverCategorys.length];
            for (int i = 0; i < serverCategorys.length; i++)
            {
                CategoryIf serverCategory = serverCategorys[i];
                GWT_Category clientCategory = helper.getGWT_Category(serverCategory);
                clientCategorys[i] = clientCategory;
            }

            return clientCategorys;
        } catch (KKException e)
        {
            throw new KKGWTException(getExceptionMessage(e));
        }
    }   


If I comment
client.setParent(getGWT_Category(server.getParent()));
server.setParent(getCategoryIf(client.getParent()));
there is no exception.

What's my mistake in the use of the helper methode getGWT_Category? Regards, rula.


[WARN] StandardContext[]Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract com.konakart.client.app.GWT_Category[] com.konakart.client.KKGWTServiceIf.getCategoryTree() throws com.konakart.client.util.KKGWTException' threw an unexpected exception: java.lang.StackOverflowError
at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:360)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:546)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:163)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at com.google.gwt.dev.shell.GWTShellServlet.service(GWTShellServlet.java:290)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
Caused by: java.lang.StackOverflowError: null
at com.konakart.server.KKBeanCopier.getGWT_Category(KKBeanCopier.java:347)
at com.konakart.server.KKBeanCopier.getGWT_Category(KKBeanCopier.java:337)
9
Hi julie,

I think I have found my failure.
In onModuleLoad before login I can only get data from the serverEngine and not from the clientEngine.
This have nothing to do with the callbacks. I have made the same mistake in struts at the beginning;-(
Tell me if I am wrong, otherwise it's okay. Regards, rula.
10
Hi Konakarts,

what is wrong with this rpc? Only somtimes I get a result?


1. public GWT_Category[] getCats() throws KKGWTException;

2. public void getCats(AsyncCallback callback);

3. public GWT_Category[] getCats() throws KKGWTException
    {

    if(log.isDebugEnabled()){
    log.debug("getCats");
    }
   
        try
        {
            KKAppEng appEng = getAppEng();
            appEng.getCategoryMgr().reset();
            CategoryIf[] serverCats = appEng.getCategoryMgr().getCats();
           
            //CategoryIf[] serverCats = appEng.getEng().getCategoryTree(-1, true);

            if (serverCats == null)
            {
                return null;
            }

            GWT_Category[] clientCats = new GWT_Category[serverCats.length];
            for (int i = 0; i < serverCats.length; i++)
            {
                CategoryIf serverCat = serverCats[i];
                GWT_Category clientCat = helper.getGWT_Category(serverCat);
                clientCats[i] = clientCat;
            }
            return clientCats;

           
        } catch (Exception e)
        {
            throw new KKGWTException(getExceptionMessage(e));
        }
       
    }

4. getKK().getMyKKGWTService().getCats(getCatsCallback);


regards, rula

11
Hi julie,
hm, I can't recognize the cause, one tip would be fine. regards, rula
12
Sorry julie,
there could be another problem, i have to check it first, you don't have to answer at the moment.
regards, rula
13
Hi julie,

I can't get debug logs from KKGWTServiceImpl in hosted mode to the eclipse consol.
I always get: Should only see this message in debug mode.

Settings in the property files of konakart,konakartadmin and in the classpath of the eclipse project. 
# Konakart classes
log4j.logger.com.konakart                     = DEBUG
log4j.logger.com.konakartadmin                = DEBUG

# KonaKart Client Logging
log4j.logger.com.konakart.clientlogging       = DEBUG

I need log infos from serverside too. Can you give me a tip? regards, rula
14
Hi julie,
do you think that the connection to the KKEng ist clearer than to the KKAppEng? In this case, KKGWTServiceImp have to instatiate a KKEng engine. This could be configured in the properties files and have to changed in the sourcecode of KKGWTServiceImp? Too heavy stuff for me! I will stay in KKAppEng altough perhaps KKEng is clearer.

regards, rula
15
Hi julie,
I commented out all the struts redirects in the client sources and the exception remaitds. I searched all the gwt sources and I cannot find the cause. After all, in my desperation, I added the struts.jar and the exception disappears. Have you a idea?
Now I see LoginBody in hosted mode, thats a small progress for me.
I get lost in konakart gwt, the advantage of all these is that I have now an small overview about these things konakarts have done for the gwt frontend. I understand nothing, but I think it's really good, and I will use all your groundwork.
The communication seems to work. Now I will start with the Welcome page, so I build the page with panels and widgets in the manner of konakart, add the required rpc calls and extend the controller. Is this a good way? Have I to note something special because this app is not father embedded in struts?