Quantcast
Channel: SmartClient Forums
Viewing all 4756 articles
Browse latest View live

Spinner graphics misaligned

$
0
0
SmartClient Version: v9.0p_2013-12-11/LGPL Development Only (built 2013-12-11)

Browser IE11

I have a case where we are doing some customization of the form item styles. When we do this with the spinner item, in some cases (not all) the spinner graphics in the spinner item are misaligned (they are one pixel lower than they should be). You can see this in the attached picture of a sample. You can see in the screen shot that the upper control has misaligned graphics and the lower one does not. The issue appears to be related to the vertical position of the control (I'm guessing it has something to do with whether the Y-coord of the control is an odd or even number).

I've included our sample class code and our CSS file. Let me know if I've left out anything else relevant that you need.

Attached Images
File Type: png spinner.png (39.9 KB)
Attached Files
File Type: java SpinnerItemIssue.java (763 Bytes)
File Type: css issues.css (5.7 KB)

Grid column resize issue

$
0
0
SmartClient Version: v9.0p_2013-12-11/LGPL Development Only (built 2013-12-11)

Browser IE11

My customer ran into an issue when trying to resize columns in a grid. You can see the issue using the Showcase. When you resize the column, at some point the column headers begin bouncing back and forth in an annoying fashion.

1. Go to the Grid Summaries sample
2. Resize the Price column using the mouse to drag the right edge of the Price column header. Move the mouse slowly to the right (making the column wider).

As you approach the right hand edge of the grid, the mouse and the column headers will begin to bounce left and right - if you continue this long enough the app eventually quits responding completely.

unnecessary loading with tabset control

$
0
0
smartclient v90p_2013-12-19
IE9 and Chrome 31

We've set up several pages using tabsets. Each tab references a jsp or html page. Looking at the network traffic, we noticed that when the page containing the tabset is loaded, it initiates calls to all the pages contained in the tabs. These are then cancelled and the tab contents aren't loaded successfully until the tab containing them is opened. Is there a way to stop the initial requests?

Here's a sample of the code used to construct one tabset page.

Code:

        isc.VLayout.create({
                        width: "100%",
                        height: "100%",
                        styleName: "PAGE_TITLE",
                        layoutMargin: 0,
                        members: [
                                isc.Label.create({
                                ID: "titleLabel",
                                contents:"${title}",
                                styleName: "df-title-text",
                                height: 30
                                }),
                                isc.TabSet.create({
                                        ID: "tabSet",
                                        styleName: "df-tab",
                                        tabBarProperties: {
                                                layoutTopMargin: 2,
                                                layoutLeftMargin: 0},
                                    tabs:[
                                          {title:"${tabNamed}", pane:isc.HTMLPane.create({
                                                        ID:"namedPane",
                                                        contentsURL:"Controller?class=controllerClasses.foundation.GoalsManagement&action=navigate&page=viewGoals&type=named",
                                                        contentsType:"page"
                                                        })
                                                  },
                                          {title:"${tabSystem}",pane:isc.HTMLPane.create({
                                                          ID:"systemPane",
                                                        contentsURL:"Controller?class=controllerClasses.foundation.GoalsManagement&action=navigate&page=viewGoals&type=system",
                                                        contentsType:"page"
                                                        })
                                          }
                                        ]       
                                })
                        ]               
                });


Attached is a screenshot that shows some of the network traffic for this page. It tries to load both tabs, shown in red, then loads the first, initial tab, under the last red entry.
Thanks

Attached Images
File Type: jpg traffic.jpg (120.7 KB)

"GET /%7Bnull%7D HTTP/1.1" 404 error

$
0
0
After we dynamically upgrade SmartGWT to a new version, the table grid becomes empty. There are errors in Jetty request.log:
"GET /%7Bnull%7D HTTP/1.1" 404

What is the file we try to retrieve?

Meanwhile, there are errors in the Jetty log file:
com.google.gwt.core.client.JavaScriptException: (TypeError)
description: Unable to set property 'innerHTML' of undefined or null reference
number: -2146823281: Unable to set property 'innerHTML' of undefined or null reference

PDFExport of grid with ValueIcons - ValueIcons missing

$
0
0
I'm attempting to export a TreeGrid with valueIcons to PDF and I'm not getting the ValueIcons to show up in the output PDF. I've put together a fairly simple test case useing RPCManager.exportContent() that demonstrates the issue.
Code:

                VLayout layout = new VLayout();
                layout.setHeight(300);
                layout.setWidth(1200);

                final ListGrid grid = new TreeGrid() {
                        {
                        }

                        @Override
                        public String getValueIcon(ListGridField field, Object value, ListGridRecord record) {
                                String icon = null;
                                if (field.getName().equals("status")) {
                                        if (value != null) {
                                                if (value.equals("Endangered") || value.equals("Threatened")) {
                                                        icon = "[SKINIMG]/actions/exclamation.png";
                                                } else {
                                                        icon = "[SKINIMG]/actions/approve.png";
                                                }
                                        }
                                }
                                return icon; // TODO Auto-generated method stub
                        }
                };

                grid.setDataSource(DataSource.get("animals"));

                grid.setAutoFetchData(true);
                grid.setUseAllDataSourceFields(true);
                IButton button = new IButton("export");
                button.addClickHandler(new ClickHandler() {

                        @Override
                        public void onClick(ClickEvent event) {
                                RPCManager.exportContent(grid);
                        }
                });

                layout.setMembers(grid, button);
                layout.draw();

I don't think it's a setup issue since I'm getting the Tree open/close and folder icons and I don't see any errors/warnings in the console output of note. Any suggestions? or is this a potential bug/issue in SmartGWT? I'm using the 01/05 nightly build of SmartGWT 4.1d.

Bug: expansion detail in ListGrid

$
0
0
To reproduce the bug:

* go to the SmartGWT showcase at http://www.smartclient.com/smartgwt/showcase/#grid_expanding_details .

* Scroll down the grid to near the end

* Click on the expansion symbol to expand a row


Result: the detail view is not shown at the right place



browser(s) and version(s) involved : FF, Chrome, IE8, IE10

PS: my screenshot is not provided because the forum limits the upload image size to 800 x 600, which is antiquated, and I dont't have time to resize the image.

ListGrid-SpinnerItem as CustomCellEditor.End editing row by press "enter" not working

$
0
0
How I can see in the showcase
Grids->Editing->Custom Cell Editors most of the editors accept the key press “enter” to end the editing for the edited row.
In my application I have implemented a custom SpinnerItem for input double values. After I updated from smartGWT 2.4 to version 4.0 the end edit by pressing “enter” will no longer work for the SpinnerItem.

I adapted the showcase sample to provide you a running sample to reproduce the behavior. (see attachment)

What is the best way to achieve the desired behavior?

In the sample my first try worked with:

spinnerItem.addKeyPressHandler(new KeyPressHandler() {
@Override
public void onKeyPress(KeyPressEvent event) {
if(event.getKeyName().equalsIgnoreCase("enter")){
countryGrid.endEditing();
}
}
});

But in my own application the ListGrid instance is not available. And I don’t want to pass the reference.

I also tried event.getItem().getContainerWidget() to get the ListGrid, but I don’t get the ListGrid.

What would be the best way to handle this? Why does “enter” no longer end the editing for the listgrid? (Maybe a bug?)

For the sample I used:
SmartgGWT 4.0 (downloaded from the nightly build section)
Development Console: SmartClient Version: v9.0_2013-07-03/LGPL Development Only (built 2013-07-03)

Testet in IE10 and FF17

Attached Files
File Type: java GridCellEditorCustomizerSample.java (6.3 KB)

HTML 4.01 doctype in the 4.0p samples differs from recommendation in the FAQ


Calendar default event editor still opening while selecting multiple cells.

$
0
0
1. SmartClient Version: v9.0p_2013-08-25/Enterprise Deployment (built 2013-08-25)

2. All browsers.

3. I’m using custom event editor on calendar instead of default event editor.
But default event editor opening when select multiple cells on week view and day view.

I have removed following js code fragment in the ISC_Calendar.js's 'cellMouseUp' listener for prevent open the default event editor.

JS Code:
//this.creator._showEventDialog(null, sRow, this._selectionTracker.colNum, diff);
var newEvent = {};
newEvent[this.creator.startDateField] = startDate;
newEvent[this.creator.endDateField] = endDate;
this.creator.showNewEventDialog(newEvent);


Is there any other way to prevent opening of default event editor?


Thank you in advance for your answers.

Several regressions in Smartclient 10.0 ListGrid

$
0
0
You will need to uncompress this content

https://mega.co.nz/#!cUYH0Y7C!ADABTHFZOnRXWtLTt8Tz1VUP6qBI7rc-L7D6eMAB1lw

inside

smartclientSDK-orig/isomorphic/system/reference


You can see the three issues I have noticed here:

http://screencast.com/t/VKrr4kx4

1. Problem with the filter area of frozen columns

2. Problem while trying to select several rows by clicking in the checkbox of the beginning of the row

3. Style problems while several rows are selected and you click on the checkbox of one selected cell (probably is a collateral damage of issue 2)


Regards.

SmartGWT 3.x development requirements

$
0
0
What kind of Windows setup are you using if you are on SmartGWT 3.x?

Is there anyone using Java7 with a modern IDE and SmartGWT 3.x on Windows XP with 4 gig of ram?

I'm wondering if my configuration is not correct because when in debug mode, everything is very slow. I'm wondering if I need to go to a 64 bit Windows version to increase ram?

Menu and createRecordComponent

$
0
0
GWT Version
2.5.1
SmartGWT Version
4.1d (Thu Nov 07 03:18:00 GMT-800 2013)


I've been trying to implement my own custom MenuItems by using a Menu (which extends ListGrid) and implementing the following on the menu:

Code:

    final Menu addMenu = new Menu()
    {
      private final String PANEL_FIELD = "panelfield";
      {
        setShowRecordComponents(true);
        setShowRecordComponentsByCell(true);
        setShowAllRecords(true);
        setFields(getFields());
      }

      @Override
      public ListGridField[] getFields()
      {
        ListGridField panelField = new ListGridField(PANEL_FIELD, "panel");
        panelField.setCanFilter(false);
        panelField.setCanEdit(false);

        return new ListGridField[]{panelField};
      }

      @Override
      public Canvas updateRecordComponent(ListGridRecord record, Integer colNum, Canvas component, boolean recordChanged)
      {
        return component;
      }

      @Override
      public Canvas createRecordComponent(final ListGridRecord record, Integer colNum)
      {
        System.out.println("HELLO, IS THERE ANYBODY OUT THERE?");
        return new HLayout()
        {
          {
            setBackgroundColor("red");
          }
        };
      }
    };
....

List<MenuItem> data = new ArrayList<MenuItem>();
...
          for(final String type : result)
          {
            data.add(new MenuItem()
            {
              {
                setAttribute("panelfield", "hello");
                setTitle(type);
              }
            });           
          }

          addMenu.setData(data.toArray(new MenuItem[data.size()]));

The above code does not stop at all in the "createRecordComponent" method, only producing standard menu items with 'type' as the menu item title/text.

My goal is to create a menu with menu items each showing my own custom canvas that has the following:
- a large icon that is approximate 36x26px to the left
- to the right of the icon, a VLayout with two labels, top label being a 'title' and bottom label being a 'sub title/description'.

Any ideas on how to accomplish this would be appreciated.

native json parsing

$
0
0
Hi,

I've asked about this before but I'm just double-checking and clarifying 2 points.

1. Setting useStrictJSON to true will force our application to use the brower's native json.parse instead of eval, correct? The docs don't specify this but I believe that is true.

2. Is there no meaningful performance difference between eval and json.parse for most browsers? This thread suggests there is a difference for Chrome as an example but I'm not sure if it is significant enough that it would be a noticeable performance improvement: http://forums.smartclient.com/showthread.php?t=21810&highlight=json.parse

TextArea Item input loses formatting

$
0
0
Hi,
We have a text area item in a form. After users insert text into the text area item, we go ahead and display it in a label. The issue is that any formatting (e.g. newline, tabs etc.) are lost after it is displayed in the label. We can have a work around by enclosing it in the <pre> tag which preserves the formatting. However, is there a plan to fix it in Smart GWT?

Thanks!

problem exporting cubegrid to excel

$
0
0
smartclient_v90p_2013-12-19
chrome 30

I'm trying to export the cubegrid shown in cubegrid.jpg using the following code. When I click on the button, I get a file button at the bottom of the page. When I open the file, I get a spreadsheet that only shows the headers for the column dimensions (cubegrid.jpg). Looking at the operation using chrome tools, the net traffic (netraffic.txt) shows all the cubegrid info packaged as a form. In the console, it gives me the warning:

Resource interpreted as Document but transferred with MIME type application/msexcel: "http://localhost:8091/DEMATIC/isomorphic/IDACall?isc_rpc=1&isc_v=v9.0p_2013-12-19&isc_tnum=10". ISC_Core.js?isc_version=SNAPSHOT_v9.1d_2013-10-08.js:1018

How can I get this to work?

Thanks

Code:


                isc.DefaultButton.create({
                    ID : "mExcelButton",
                    title:"${exportExcel}", 
                    prompt:"${exportExcel}",
                    click:function () {
                          report.exportClientData({ exportAs: "xls",
                              exportToClient: true,
                              exportDisplay: "download",
                              exportFilename: "export.xls"
                                });
                    }
                });


Attached Images
File Type: jpg excel.jpg (103.5 KB)
File Type: jpg cubegrid.jpg (78.9 KB)
Attached Files
File Type: txt nettraffic.txt (6.0 KB)

problem exporting cubegrid to pdf

$
0
0
SmartClient v90p_2013-12-19
Chrome 30

I'm trying to export a cubegrid to a pdf file using the following code where report is the cubegrid (cubegrid.jpg). When I attempt it, the browser pops up a new window with the text //isc_RPCResponseStart in a little box about halfway down the window (pdfexport.jpg). There is no network traffic and no console errors. How can I get this to work?

Thanks

Code:

                isc.DefaultButton.create({
                    ID : "mPDFButton",
                    title:"exportPDF", 
                    prompt:"exportPDF",
                    click:function () {
                          var settings = {
                        skinName: "Enterprise",
                        printForExport: true,
                        pdfName: "export"// without .pdf
                        };
                          isc.RPCManager.exportContent(report, settings);
                    }
                });


Attached Images
File Type: jpg cubegrid.jpg (78.9 KB)
File Type: jpg pdfexport.jpg (22.6 KB)

Slider change and valueChange Events on Dynamic Form?

$
0
0
Hello,
I am attempting to setup a slider to dynamically change the DrawPane zoom value. I have tried two different methods to get either the "change" or "valueChanged" events to fire on the Slider while on a DynamicForm, but neither of these techniques seem to work. I also created a stand-alone Slider and it works fine.

Scenario One: DynamicForm Slider valueChanged (see zoomSlide field):

isc.DynamicForm.create({
ID: "gridForm",
width: 500,
values: {snapDrag: true, snapResize: true, hgap: 20, vgap: 20},
numCols: 2,
fields: [{
name: "zoomSlide", title: "Zoom DrawPane: ", type: "slider", minValue: 0.10, maxValue: 3.00, numValues: 300, roundPrecision: 2, roundValues: false, valueChanged : function (value) {
gridCanvas.zoom(value);}, canDrag: true,
}, {
name: "snapDrag", title: "Enable Snap-To-Grid Move", type: "checkbox",
changed: "gridCanvas.setProperty('childrenSnapToGrid', !gridCanvas.childrenSnapToGrid)"
}, {
name: "snapResize", title: "Enable Snap To Grid Resize", type: "checkbox",
changed: "gridCanvas.setProperty('childrenSnapResizeToGrid' , !gridCanvas.childrenSnapResizeToGrid)"
}, {
name: "hgap", title: "Horizontal snap-to gap", type: "radioGroup",
valueMap: {10: "10 pixels", 20: "20 pixels", 50: "50 pixels"},
changed: "gridCanvas.setProperty('snapHGap', Number(this.getValue()))"
}, {
name: "vgap", title: "Vertical snap-to gap", type: "radioGroup",
valueMap: {10: "10 pixels", 20: "20 pixels", 50: "50 pixels"},
changed: "gridCanvas.setProperty('snapVGap', Number(this.getValue()))"
}
],
});

Scenario Two: DynamicForm Slider "changed" event (see zoomSlide field):

isc.DynamicForm.create({
ID: "gridForm",
width: 500,
values: {snapDrag: true, snapResize: true, hgap: 20, vgap: 20},
numCols: 2,
fields: [{
name: "zoomSlide", title: "Zoom DrawPane: ", type: "slider", minValue: 0.10, maxValue: 3.00, numValues: 300, roundPrecision: 2, roundValues: false, changed:"gridCanvas.setProperty('zoom', Number(this.getValue()))", canDrag: true
}, {
name: "snapDrag", title: "Enable Snap-To-Grid Move", type: "checkbox",
changed: "gridCanvas.setProperty('childrenSnapToGrid', !gridCanvas.childrenSnapToGrid)"
}, {
name: "snapResize", title: "Enable Snap To Grid Resize", type: "checkbox",
changed: "gridCanvas.setProperty('childrenSnapResizeToGrid' , !gridCanvas.childrenSnapResizeToGrid)"
}, {
name: "hgap", title: "Horizontal snap-to gap", type: "radioGroup",
valueMap: {10: "10 pixels", 20: "20 pixels", 50: "50 pixels"},
changed: "gridCanvas.setProperty('snapHGap', Number(this.getValue()))"
}, {
name: "vgap", title: "Vertical snap-to gap", type: "radioGroup",
valueMap: {10: "10 pixels", 20: "20 pixels", 50: "50 pixels"},
changed: "gridCanvas.setProperty('snapVGap', Number(this.getValue()))"
}
],
});

Scenario Three: Stand-alone Slider --> works fine

isc.Slider.create({
ID: "zoomSlider",
minValue: 0.10,
maxValue: 3.00,
numValues: 300,
roundValues: false,
roundPrecision: 2,
width: 400,
title: "Zoom DrawPane",
vertical: false,
valueChanged : function (value) {
gridCanvas.zoom(value);
},
canDrag: true
});

Any insight is appreciated.

Thank you in advance,

SmartClient_v83p_2013-12-20_Enterprise
Safari Version 5.1.10 (6534.59.10)

Running Reify from java code

$
0
0
Hello!

I'd want to include reification to build process of my system (I'm using sbt/scala and I can write simple plugins for it in scala/java very easily). At least, I consider this option.
Can I do it without starting separate tomcat instance? Just by calling some API from your java libraries? If answer is yes, how can I invoke it?

And can you give me also a point to API which I can run to generate JS code from XML files generated by Reify.

Thank you

ListGrid selectRecord(0) does not work because the index is not zero based.

$
0
0
SmartGWT 4.1d LGPL 2013-11-07

Wanted to get this out there in the forum for others to see....

In my DataArrivedHandler.onDataArrived method I was going crazy because ListGrid setRecord(0) or setSingleRecord(0) wasn't working.

I later noticed the index is 1 based. setRecord(1) / setSingleRecord(1) selected the first item in the list.

Thanks,
-B

Reify error during import assets

$
0
0
Hello.
I'm using Reify from SmartClient_v90p_2014-01-05
I'm trying to import Balsamiq mockup which consists of

<somedir>/test_main_page.bmml
<somedir>/assets/grid_symbol.bmml
<somedir>/assets/combo_symbol.bmml

Mockup test_main_page.bmml uses symbols from assets/grid_symbol.bmml and assets/combo_symbol.bmml

when I try to import test_main_page.bmml using "Select file from local disk" I recieve next error: "Unable to import this mockup. Asset is missing. Do you want to abort import or continue with placeholders. You will be able to upload this asset and import this mockup again."
with next stack trace in console:

=== 2014-01-08 23:26:46,274 [sor6] DEBUG RPCDMI - Invocation threw exception
java.io.FileNotFoundException: /Users/newf/Downloads/SmartClient_v90p_2014-01-05_PowerEdition/smartclientSDK (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.jav a:120)
at java.io.FileReader.<init>(FileReader.java:55)
at com.isomorphic.rpc.BuiltinRPC.loadFile(BuiltinRPC. java:304)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.isomorphic.base.Reflection.adaptArgsAndInvoke( Reflection.java:973)
at com.isomorphic.base.Reflection.adaptArgsAndInvoke( Reflection.java:805)
at com.isomorphic.rpc.RPCDMI.execute(RPCDMI.java:309)
at com.isomorphic.rpc.RPCDMI.execute(RPCDMI.java:66)
at org.apache.jsp.tools.bmmlImporterOperations_jsp._j spService(bmmlImporterOperations_jsp.java:84)
at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:328)
at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:315)
at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:188)
at com.isomorphic.js.JSSyntaxScannerFilter.doFilter(J SSyntaxScannerFilter.java:252)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:188)
at com.isomorphic.servlet.CompressionFilter.doFilter( CompressionFilter.java:260)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11 ConnectionHandler.processConnection(Http11BaseProt ocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.process Socket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThr ead.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:695)
Viewing all 4756 articles
Browse latest View live


Latest Images