Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    #16
    We confirmed a bug here and it's being worked on.

    Comment


      #17
      Thanks. Any idea when the fix might be available?

      Comment


        #18
        Most likely tomorrow.

        Comment


          #19
          I think this is the same problem that I'm having (in another thread). I need to configure the DataSource so that the server side knows what to load.

          I'm trying to pass arbitrary data into a databound object by calling setDefaultParams() on the DataSource that I'm binding to a widget.

          Theoretically (if i understand this), those default parameters should show up on the server in the Request object somewhere correct?

          Comment


            #20
            Was this fixed? If so, how would one go about picking up the fix? thx

            Comment


              #21
              Just testing the July 10 nightly build at http://www.smartclient.com/builds/smartgwtee-eval/ and it does not appear to have been fixed yet.

              Comment


                #22
                I just checked with the files in 'http://www.smartclient.com/builds/smartgwt/2010-07-12/' which is where I think it should be since DataSource is part of smartgwt.jar and this does not pass parameters set with

                DataSource.setDefaultParams()

                I believe the bug still exists.

                Can you please give an ETA on when this will be fixed? thanks

                Comment


                  #23
                  I managed to solve this in a not-too-inelegant manner. 'setDefaultParameters()' would still be ideal, but this works in a pinch.

                  I added a new Map to my DataSource (in my case the base class GenericGwtRpcListDataSource found in another thread on these forums) and I stick my DataSource configuration parameters inside.
                  Code:
                  protected Map<String,String> dataSourceParameters = new HashMap<String,String>();
                  In the DataSource.transformRequest() method I added
                  Code:
                  criterias.putAll(dataSourceParameters);
                  The data I put in my new Map is then sent across the wire as Criteria to the Service implementation. A little bit of clever naming or typing will avoid problems with these munging up your actual criteria clauses.

                  Alternatively for people not using the DataSource classes above, essentially you need to make a new fetch method with extra parameters. Add your own fetch method and make one of the parameters a serialized object (Map<String,String> seems best). It will then come across the wire and be usable on the server.

                  Comment


                    #24
                    I tried to get this out of the HTTPRequest as well. Then saw that on the server fetch(), there was actually NO params.. the paramMap was empty. Glad I checked the forums and going with work around. Now I know, when something simple dosn't seem to work check the forums and don't sweat it.

                    Code:
                        HttpServletRequest request = this.getThreadLocalRequest();
                        Map<String, String> paramMap = request.getParameterMap();
                        for (  Map.Entry <String,String> entry: paramMap.entrySet()){
                          String key = entry.getKey();
                          String value = entry.getValue();
                          System.out.println("Entry key:value ->" + entry + " :" + value);
                          
                        }

                    Comment


                      #25
                      Hi,
                      By doing the following in GwtRpcDataSource

                      Code:
                          public GwtRpcDataSource () {
                              setDataProtocol (DSProtocol.CLIENTCUSTOM);
                              setDataFormat (DSDataFormat.CUSTOM);
                              setClientOnly (false);
                              
                          }
                      we break the link of the Http request to the Server... (based on the JavaDoc for CLIENTCUSTOM) so I wouldn't expect the setDefaultParms() data to be there.. We can try and get it from the DSRequest in the transformRequest() we override. Please comment.. as the way I'm thinking there was never a bugin the setDefaultParams()....

                      Comment


                        #26
                        Hi
                        I'm having the same problem. Can Isomorphic please tell us if this bug is fixed?
                        I'm running Smart GWT 2.4.
                        I'm also not getting any params on the server side.

                        It's urgent please.

                        Comment


                          #27
                          Hi there
                          Another thing. The workaround proposed, I battle to get method DataSource.transformRequest() . Or do I misunderstand something.

                          Right now, I'm stuck - no workaround.

                          Please help.

                          Comment


                            #28
                            Hello there Isomorphic
                            Is nobody going to at least just help me understand when this bug will be fixed?
                            Please.
                            Henkie

                            Comment


                              #29
                              Note post 25 - if you're using GWTRPCDataSource, SmartGWT is not forming the HttpRequest to the server and cannot supply HTTP parameters. This is one of the reasons we recommend against GWTRPCDataSource in the FAQ.

                              If you think this API is broken when GWTRPCDataSource is *not* being used, show a minimal, standalone test case that allows the issue to be reproduced.

                              Comment


                                #30
                                Thanks for the reply.
                                I do need further help please. According to the FAQ you recommend that I should NOT use GWT-RPC.
                                I'm using SmartGWT Pro and uses DataSources that integrate with Hibernate.

                                What am I suppose to use? What is the best way to communicate with the database in SmartGWT Pro?

                                Comment

                                Working...
                                X