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

Scatter chart does not show up

$
0
0
After trying half a day I've given up on this scatter chart with dynamic data:
only the title shows up - no message in developer console.

If I omit the calls to setXAxisMetric or setYAxisMetric
it still gives a error in the developer console like "_gwt$exception:this.metricFacet is null at isc_FacetChart_getYAxisMetric()"

What is wrong here? I just mimicked the showcase scatter chart sample
with my data: occuretime should be x-axis, responsetime2 on y-axis.
(The dynamic data part worked well before with ChartType.LINE !)

I'm using SmartClient v10.0p_2015-04-01/EVAL Deployment (expires 2015.05.31_06.33.21),
Firefox 36.0.4 for ubuntu,
Eclipse 4.4 Luna.

Here's my source:
------------ BuiltInDS.java: ------------

chart = new FacetChart();
chart.setHeight( 600 );
chart.setTitle("Ping History5");
chart.setChartType(ChartType.SCATTER );

Facet metric = new Facet();
metric.setValues(new FacetValue("responsetime2"), new FacetValue("occuretime"));
metric.setInlinedValues(true);
chart.setFacets( metric );

chart.setValueProperty("responsetime2");

chart.setXAxisMetric("occuretime"); //otherwise: _gwt$exception: this.metricFacet is null
chart.setYAxisMetric("responsetime2");//otherwise: _gwt$exception:this.metricFacet is null

SC.logWarn("getXAxisMetric="+chart.getXAxisMetric() );
SC.logWarn("getYAxisMetric="+chart.getYAxisMetric() );

Criteria c = new Criteria("r_node", "1002");
DataSource ds = DataSource.get( "pinghists" );
ds.fetchData(c, new DSCallback() {
public void execute(DSResponse response, Object rawData, DSRequest request) {
chart.setData(response.getData());
}
});
chart.draw();

------------ BuiltInDS.gwt.xml: ------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd">
<module rename-to="builtinds">
<inherits name='com.google.gwt.user.User'/>
<inherits name="com.smartgwt.tools.SmartGwtTools"/>
<inherits name="com.smartgwtee.tools.Tools"/>
<inherits name="com.smartgwtee.SmartGwtEENoScript"/>
<inherits name="com.smartgwt.Charts"/>
<inherits name="com.smartgwt.Drawing"/>

<add-linker name="xsiframe" />

<entry-point class='com.smartgwt.sample.client.BuiltInDS'/>
</module>

------------- pinghists.ds.xml: ------------
<DataSource
ID="pinghists"
serverType="sql"
tableName="pings_history"
testFileName="pinghists.data.xml"
>
<fields>
<field name="id" title="Ping_h ID" type="integer" primaryKey="true" required="true"/>
<field name="r_node" title="Node ID" type="integer"/>
<field name="ping_id" title="Ping ID" type="integer" detail="true"/>
<field name="occuretime" title="ping'ed at" type="datetime"/>
<field name="responsetime1" title="Response time1" type="float" />
<field name="responsetime2" title="Response time2" type="float" />
<field name="responsetime3" title="Response time3" type="float" />
</fields>
</DataSource>
-------------------

howto export a WAR file for deployment?

$
0
0
If your readme.txt (i.e. developers.google.com) says to
create a *Java* project in eclipse
how do you deploy a SmartGWT project to a web container/production server?

Eclipse only offers a WAR file export for projects of type *Web* !

[And as I informed you in my first post here
the ant build file doesn't work either: 'ant war']

I'm using SmartClient v10.0p_2015-04-01/EVAL Deployment (expires 2015.05.31_06.33.21),
Firefox 36.0.4 for ubuntu,
Eclipse 4.4 Luna.

Duplicated value in Selectitem in TreeGrid

$
0
0
Hi there,

I'm trying to get SelectItems to work in the TreeGrid. Using the same logic like in a ListGrid seems to duplicate the selected value. In the example the selected value is represented and also the values from the valuemap. (Screenshot from Chrome)


Tested with the latest nightly SmartClient_v100p_2015-04-13_Pro and i't's reproducable in chrome/firefox/IE.
In IE (tested with IE 11.0.9600.17691) there seems also be a visual bug, whenswitching to edit-mode of the SelectItem the value of the SelectItem jumps few pixels down. Also there seems to be no need for the scrolling-bar in the picklist. See here:


There seems to be no example for SelectItems in the TreeGrid, but it makes sense for working with same elements under a node.

Edit:
After selecting one of the other shown values, there are only 2 elements shown. Afterwards it is working correct. So it seems to be only a initialization issue?

With this code you can reproduce this issue:
Code:

isc.TreeGrid.create({
        "width" : "100%",
        "height" : "100%",
        "fields" :
        [{
                        "name" : "reasonTreeGridField",
                        "title" : "Reason",
                        "type" : "text",
                        "canEdit" : true,
                        "editorProperties" : {
                                "ID" : "reasonTreeGridField_5Editor"
                        }
                }, {
                        "name" : "fruitSelectItemTreeGridField",
                        "title" : "select fruit",
                        "canEdit" : true,
                        "editorType" : "SelectItem",
                        "valueMap" : {
                                1 : "banana",
                                2 : "peach"
                        }
                }
        ],
        "selectionProperty" : "isSelected",
        "members" :
        [],
        data : isc.Tree.create({
                "modelType" : "children",
                "openProperty" : "isOpen",
                "root" : {
                        "isOpen" : true,
                        "id" : "1",
                        "children" :
                        [{
                                        "isFolder" : true,
                                        "isOpen" : true,
                                        "id" : "2",
                                        "_canEdit" : false,
                                        "reasonTreeGridField" : "theParentNode",
                                        "fruitSelectItemTreeGridField" : "",
                                        "children" :
                                        [{
                                                        "isFolder" : false,
                                                        "isOpen" : false,
                                                        "id" : "3",
                                                        "_canEdit" : true,
                                                        "reasonTreeGridField" : "child",
                                                        "fruitSelectItemTreeGridField" : "peach"
                                                }
                                        ]
                                }
                        ]
                }
        })
})

Best regards

getValue of TextItem with enabled keyPressFilter

$
0
0
Hey guys,

I am currently working on a DynamicForm which has saveOnEnter enabled with a submit function. In that form I also have a TextItem with a keyPressFilter, which allows only numbers to 5 and commas.

The problem appears when entering a number with comma and afterwards entering another number without comma. Doing so and calling TextItem.getValue() inside the submit function will cause getting the old value of the text item.

A gif with the described issue:


This also happens if there is no submit between changing the inputs:


Following also the example code:
Code:

isc.DynamicForm.create({
        "ID" : "form",
        "left" : 5,
        "submit" : function () {
                isc.say("Current value: " + textItem.getValue())
        },
        "saveOnEnter" : true,
        "hideUsingDisplayNone" : false,
        "fields" :
        [{
                        "ID" : "textItem",
                        "title" : "TextItem",
                        "type" : "text",
                        "keyPressFilter" : "[0-5.,-]"
                }
        ]
})

This issue is reproducible with the current SmartClient nighly (v10.0p_2015-04-12) and all current browser versions (Firefox, Chrome and IE)

Best Regards

Problem wuth cleearing all columns in grid

$
0
0
Be sure your post includes:

1. Problem appears in smart client 10.0 and olders (we have noticed that in 8.3 version and 9 version too)

2. All browsers : chrome, mozilla and IE, newest versions.

3. There is no bug log, but problem appears on java script side. I have tried to remove all columns from list grid and it has worked, but when i have tried to add them again there was no filters in the grid. Redrawing and setting showFilterEditor to true not works.

6. Below there is a sample of code. I have added two buttons. One is responsible for selecting all columns, the second one for removing them from grid. After removing all, seleect all not works properly.

getColumnPickerItems : function() {
var allColumns = this.Super("getColumnPickerItems", arguments);
var notSortColumns = new Array();
for (var i = 0; i < allColumns.length; i++) {
//if (!this.getSortSpecifier(allColumns[i].fieldName)) {
notSortColumns.push(allColumns[i]);
//}
}
var grid = this;
notSortColumns.sort(function(a, b) {
return a.title.localeCompare(b.title);
});
var clearAllColumns = {
autoDismiss : false,
checkIf : function (target, menu, item) {
return false;
},
click : function(target, item, menu) {
if (menu.data) {
var fieldsToHide = new Array();
if (allColumns.size() == (notSortColumns.size()-3)) {
for (var i = 0; i < menu.data.length; i++) {
var gridColumn = menu.data[i];
if (gridColumn.fieldName !== undefined && gridColumn.checked){
fieldsToHide.push(gridColumn.fieldName);
}
}
} else {
for (var i = 0; i < menu.data.length; i++) {
var gridColumn = menu.data[i];
if ((gridColumn.fieldName != undefined) && gridColumn.checked && gridColumn.fieldName !='') {
fieldsToHide.push(gridColumn.fieldName);
}
}
}
fieldsToHide.shift();
grid.hideFields(fieldsToHide);
grid.setCriteria(null);
menu.body.delayCall("markForRedraw");
}

},
enableIf : function (target, menu, item) {
return true;
},
title : "CLEAR"
};
var selectAllColumns = {
autoDismiss : false,
checkIf : function (target, menu, item) {
return false;
},
click : function(target, item, menu) {
if (menu.data) {
var fieldsToShow = new Array();
for (var i = 0; i < menu.data.length; i++) {
var gridColumn = menu.data[i];
if ((gridColumn.fieldName != undefined) && !gridColumn.checked) {
fieldsToShow.push(gridColumn.fieldName);
}
}
grid.showFields(fieldsToShow);
grid.setCriteria(null);
menu.body.delayCall('markForRedraw',null,1000);
}
},
enableIf : function (target, menu, item) {
return true;
},
title : "SELECT ALL"
};
notSortColumns.add(clearAllColumns, 0);
notSortColumns.add(selectAllColumns, 1);
notSortColumns.add({isSeparator:true}, 2);
return notSortColumns;
}

Y-Axis Value doesnt start from 0 by default

$
0
0
http://www.smartclient.com/smartgwtee/showcase/#dynamicDataCharting]

In the above example, the Y- Axis Value starts from 13,500. Is there any way of changing this to start from 0 or to toggle between the two scenarios.

Thank you

showHeader:false in Timeline

$
0
0
Hi there,

I'm searching for a method to hide the headerlevels completely. In my case i know, that there are plenty of informations in the events, so the headerLevels are not needed to display.

For example i have this little timeline.

Here i want to remove the first row (1/1 | 1/2 | 1/3 | 1/4 ...). In the Listgrid there is an option called showHeader with does exactly what i'm trying to get, but because Timeline extends Calendar, which extends canvas, this method is not available.

However is there an option i haven't seen to achieve this?

In addition I want to remove the grey border around the timeline. Setting the border-attribute in the initialization doesn't seem to remove the border, but add an additional border to it:
(For visualization I have set it to "1px solid red", later i want to use "none")

Here is the example code:
Code:

isc.Timeline.create({
        ID : "timeline",
        height : 58,
        showDayHeaders : false,
        startDate : new Date(2015, 0, 1),
        endDate : new Date(2015, 0, 31),
        lanes : [{
                        name : "charlesMadigen",
                        title : "Charles Madigen",
                        height : 30
                }
        ],
        headerLevels : [{
                        "unit" : "day",
                        "headerWidth" : 30
                }
        ],
        laneFields : [{
                        name : "title",
                        title : " ",
                        width : 100
                }
        ],
        canEditLane : true,
        showEventDescriptions : false,
        labelColumnWidth : 200,
        showControlsBar : false,
        border : "1px solid red"
});

Adopting to Window like modal for 3rd party software.

$
0
0
1. v9.1p_2015-01-08/Pro Deployment (built 2015-01-08)

2. Browser - any

3. I am using a thirdparty software called hopscotch for our product tours.

Currently I have

Code:

this.modal_o = isc.Canvas.create({
            ID:"tourModal",
            styleName: "canvasModalMask",
            height: "100%",
            width: "100%"
        });
this.modal_o.hideClickMask();

and the style
Code:

.canvasModalMask{
    background-color: black;
    opacity: .20;
    -webkit-opacity: .2;
    -moz-opacity: .2;
    filter: alpha(opacity=20);
    z-index: 1000;
}

To mimic smartclient's Window.modalMask. The above workaround still allows components in the background to be keyboard accessible - which should not happen for a modal. I was wondering if there are any APIs that might help me achieve the modal for above situation.

Thanks

Smargwtpro 3.1p and ios 8.1 and higher

$
0
0
Our smartgwt application does not render on the IPad Safari browser - i don't see any errors.. just stops with the following logs:

It works fine on chrome [ipad] and any other browser [ desktop]...

Not sure what is happening.

I tried setting the window.isc_useDefaultViewport = false...did not help

=== 2015-04-14 16:51:50,161 [80-5] INFO ISCInit - Isomorphic SmartClient/SmartGWT Framework initialization called from com.isomorphic.base.Init
=== 2015-04-14 16:51:50,161 [80-5] INFO ISCInit - Isomorphic SmartClient/SmartGWT Framework is already initialized
=== 2015-04-14 16:51:50,161 [80-5] INFO ISCInit - Isomorphic SmartClient/SmartGWT Framework initialization called from com.isomorphic.base.Init
=== 2015-04-14 16:51:50,161 [80-5] INFO ISCInit - Isomorphic SmartClient/SmartGWT Framework is already initialized
=== 2015-04-14 16:51:50,162 [80-5] INFO RequestContext - URL: '/rms/po/reports/poSGWT.jsp', User-Agent: 'Mozilla/5.0 (iPad; CPU OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12F69 Safari/600.1.4': Safari with Accept-Encoding header
=== 2015-04-14 16:51:50,255 [80-5] INFO ISCInit - Isomorphic SmartClient/SmartGWT Framework initialization called from com.isomorphic.base.Init
=== 2015-04-14 16:51:50,255 [80-5] INFO ISCInit - Isomorphic SmartClient/SmartGWT Framework is already initialized
=== 2015-04-14 16:51:50,318 [80-5] INFO ISCInit - Isomorphic SmartClient/SmartGWT Framework initialization called from com.isomorphic.base.Init
=== 2015-04-14 16:51:50,318 [80-5] INFO ISCInit - Isomorphic SmartClient/SmartGWT Framework is already initialized

exception during DMI crashes Tomcat

$
0
0
We have found one particular issue that is causing Smartgwt to throw an uncaught exception and that causes tomcat to crash. We fixed the issue but we are not convinced that this is the end of it.

We have a DMI:
Code:

public class RapidCharge {

        public DSResponse room(DSRequest req) throws Exception { 
                DSResponse response = new DSResponse(); 
                response.setData("Just plain text");
                //response.setDate(new LinkedList<Map<String,Object>());
                return response; 
        }
}

In the DSResponse, if we dont set the data or we set it with text or we set it with an empty list and we have our Operation Binding configured, like so:

Code:

<operationBinding operationType="fetch" operationId="rapidRoomSearch" serverMethod="room" outputs="ID,IDINVOICE,IDRESERVATION,Property,Status,NameFirstName,NameLastname,ConWorkTelephone,ConCellNumber"> 
            <serverObject 
                lookupStyle="new" 
                className="hti.nova.server.DMI.operations.RapidCharge" 
            /> 
        </operationBinding>       
        </operationBindings>

This causes smartgwt to throw an uncaught exception, which crashes everything. If we remove the outputs columns, like so:

Code:

<operationBinding operationType="fetch" operationId="rapidRoomSearch" serverMethod="room"> 
            <serverObject 
                lookupStyle="new" 
                className="hti.nova.server.DMI.operations.RapidCharge" 
            /> 
        </operationBinding>

Then it works. I have made a fix and upgraded this morning, it still continued with the same issue, not sure if something similar is happening else where

setCanDragSelectText not works in IE11

$
0
0
I am using smartgwtpro 4.1.b20150227

I have called these two methods for a listgrid, however, select & copy works in Chrome, but not works in IE11

setCanSelectText(true);
setCanDragSelectText(true);


well, I also tested smartclient version in demo page (http://www.smartclient.com/#columnOrder ) by :

canSelectText:true,
canDragSelectText : true,


it works in Chrome, but failed in IE11 too

getPrintHTML-Call thrown JS-Exception

$
0
0
Hello,

i'm working with smartgwt 4.1 power edition (2015-04-09).
I'm trying to export a listgrid to pdf. However, when i execute this code :
Code:

ListGrid grid =
            (ListGrid) Canvas.getById(getModuleName() + "_ListGrid");

        grid.getPrintHTML(null, new PrintHTMLCallback() {

            @Override
            public void setHTML(String html)
            {
                RPCManager.exportContent(html);
            }

        });

I get this exception:
Code:

com.google.gwt.core.client.JavaScriptException (TypeError)
@com.smartgwt.client.widgets.Canvas::getPrintHTML(Lcom/smartgwt/client/util/PrintProperties;Lcom/smartgwt/client/util/PrintHTMLCallback;)([null, Java object:
eisenmann.action.TestPdfExportAction$1@1982274035]): self._jsOverrideCall is undefined
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249)
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284)
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
com.smartgwt.client.widgets.Canvas.getPrintHTML(Canvas.java)
eisenmann.action.TestPdfExportAction.onClick(TestPdfExportAction.java:38)
com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:111)
com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:1)
com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:483)
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284)
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
com.google.gwt.core.client.impl.Impl.apply(Impl.java)
com.google.gwt.core.client.impl.Impl.entry0(Impl.java:356)
sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:483)
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
java.lang.Thread.run(Thread.java:745)

My ListGrid is defined in a .xml:
Code:

<ListGrid dataSource="mntt" autoFetchData="true"
        ID="MNT_ListGrid" height="100%" width="100%" autoDraw="false">
        <autoSaveEdits>false</autoSaveEdits>
        <showFilterEditor>true</showFilterEditor>
        <allowFilterExpressions>true</allowFilterExpressions>
        <filterOnKeypress>true</filterOnKeypress>
        <fetchDelay>1000</fetchDelay>
        <selectionType>single</selectionType>
        <canMultiGroup>true</canMultiGroup>
        <canAddSummaryFields>true</canAddSummaryFields>
        <groupByMaxRecords>10000</groupByMaxRecords>
    <sortField>PROJECTNO</sortField>
        <groupStartOpen>none</groupStartOpen>
        <!-- ==> to edit some fields don't set the global ListGrid canEdit as false.
                delete or uncommend it and set canEdit as true through the ListGridField.
            ==> if you wan't some fields to lock it, set the global ListGrid canEdit as true
                and set canEdit as false through the ListGridField
            ==> if you get a standard SAVE-Button you  m u s t  set canEdit at the ListGridField
        <canEdit>true</canEdit> -->
        <fields>
                <!-- PRIMARY KEY -->
                <ListGridField name="PROJECTNO"        width="100"  align="left" canEdit="false"  />
                <ListGridField name="LFDNR"            width="50"  align="left" canEdit="false"  />
                <!-- FIELDS -->
        </fields>
</ListGrid>

Is this a bug or what is wrong in my code?

Validation error message is not displaying if user enter wrong date.

$
0
0
Hi,
We are using Smart Gwt-4.1p (23rd May 2014)
Browser: IE10, 11, Google Chrome:37.0.2062.124 m

Please find the attached code for your reference.

Issue : If user enter the the invalid date (invalid digit) for DateItem date is getting converted to corresponding date.
Ex : 02/25/20154456677 is displaying as 01/01/1970
Expected behavior : It should display message as invalid date.

I am using DateUtil for localization issue like /(slash) is converted to .(dot) in german language.

Please guide me if any solution is available to display error message using date util.

Thanks.

Attached Files
File Type: java TestsmartGwtProject.java (2.9 KB)

Pagination support for LiveGrid

$
0
0
Hi,

I am using SmartGWT 5.0. I am looking for in built pagination support for List Grid. Please let me know if I can use any.

When I searched forums for pagination related threads, I got a good UI constructed in jsp attached here. But I need the same functionality and UI in java code where I can use it in my side.

Appreciate your help.

Thanks,
Sampath G

Attached Files
File Type: jsp gridPager.jsp (10.1 KB)

Add permanent request property

$
0
0
I have an application that is used to manage data for multiple sites. The application's outmost widget is a TabSet with tabs for each site. The user is only administrating one site at a time. Each table in the database has a field that identifies for which site it is. What I would like to do, is set a "permanent" request parameter when a tab is selected so that requests include that site identifier.

So, each table in the database has a field "site_code", with data like "shop_x", "shop_y" or "shop_z". The web application should include the site code in each request.

What I now have is global variable (actually, an property on the window object) with the active site code. On tabSelected of the application's outmost widget I change that active site code. In the transformRequest() method of each data source I include the request parameter based on the global variable.

Is this correct? Or is there something like isc.DataSource.setDefaultRequestParameters()?

How to use a ListGrid with a DataSource

$
0
0
I managed to create a working ListGrid in the following manner :

Code:

private ListGrid listGrid = new ListGrid();

listGrid.setShowAllRecords(true);
ListGridField employeeNameField = new ListGridField("employeeName","EmployeeName");
ListGridField emailField = new ListGridField("email", "Email");
ListGridField phoneWorkField = new ListGridField("phonework", "Phone work");
ListGridField phoneMobileField = new ListGridField("phonemobile", "Phone mobile);

listGrid.setFields(employeeNameField, emailField, phoneWorkField, phoneMobileField);

listGrid.setAutoFetchData(true);

and then filling the grid like this using a RecordList

Code:

RecordList data = new RecordList();
for (EmployeeResponse employee:response)
{
  ListGridRecord record = new ListGridRecord();
  record.setAttribute("employeeName", employee.getEmployeeName());
  record.setAttribute("email", employee.getEmail1());
  record.setAttribute("phonework", employee.getPhoneWork());
  record.setAttribute("phonemobile", employee.getPhoneMobile());
  data.add(record);
}

            listGrid.setData(data);


This is all working fine but now I want to use a filter on the ListGrid (using listGrid.setShowFilterEditor(true); and listGrid.setFilterOnKeyPress(true);
This however does not seem to work when using a RecordList as data for the ListGrid.
It seems that a DataSource must be used for this.
I tried creating a DataSource but the problem is that my table is always empty.

The things I did.
Create a DataSource class :
Code:

public class EmployeeDataSource extends DataSource
{
  public EmployeeDataSource()
  {
      setID("abc");

      DataSourceTextField employeeNameField = new DataSourceTextField("employeeName", I18NMessages.getMessage(4182));
      DataSourceTextField emailField = new DataSourceTextField("email", I18NMessages.getMessage(4377));
      DataSourceTextField phoneWorkField = new DataSourceTextField("phonework", I18NMessages.getMessage(2338));
      DataSourceTextField phoneMobileField = new DataSourceTextField("phonemobile", I18NMessages.getMessage(2196));

      this.setFields(employeeNameField, emailField, phoneWorkField, phoneMobileField);

      this.setClientOnly(true);
  }
}

Then I created a ListGrid.
Code:

private ListGrid listGrid = new ListGrid();
listGrid.setShowAllRecords(true);
listGrid.setShowFilterEditor(true);
listGrid.setFilterOnKeypress(true);
listGrid.setAutoFetchData(true);

And finally
Code:

ListGridRecord[] records = new ListGridRecord[response.size()];
for (int i = 0; i < records.length; i++)
{
  records[i] = new ListGridRecord();
  records[i].setAttribute("employeeName", response.get(i).getEmployeeName());
  records[i].setAttribute("email", response.get(i).getEmail1());
  records[i].setAttribute("phonework", response.get(i).getPhoneWork());
  records[i].setAttribute("phonemobile", response.get(i).getPhoneMobile());
}
dataSource.setCacheData(records);
dataSource.invalidateCache();


The result of all this is that I get an empty ListGrid.
The headers are shown correctly however. Since I removed listGrid.setFields() when swithing to a DataSource this means that the column headers really are coming from the DataSource correctly. But I am unable to fetch the data itself.


Anyone has a quick overview of how to create and use a clientOnly dataSource. And not using a setDataUrl() like all examples I find in the showcase do, but really filling up the datasource with data from an array or a list in the code.

Thanks

Column data go missing when drawAllMaxCells = 0.

$
0
0
Be sure your post includes:

1. v9.1p_2015-02-05/Pro Deployment (built 2015-02-05)

2. chrome Version 41.0.2272.118 m
firefox 36.0.4

3. The problem occurs when grid data is refreshed or scroll bars are used.

Following is the code used to reproduce the issue -
Code:

countryData1 = [

{
    continent:"North America",
    countryName:"United States",
    countryCode:"US",
    area:9631420,
    population:298444215,
    gdp:12360000,
    independence:new Date(1776,6,4),
    government:"federal republic",
    government_desc:2,
    capital:"Washington, DC",
    member_g8:true,
    article:"http://en.wikipedia.org/wiki/United_states",
    background:"Britain's American colonies broke with the mother country in 1776 and were recognized as the new nation of the United States of America following the Treaty of Paris in 1783. During the 19th and 20th centuries, 37 new states were added to the original 13 as the nation expanded across the North American continent and acquired a number of overseas possessions. The two most traumatic experiences in the nation's history were the Civil War (1861-65) and the Great Depression of the 1930s. Buoyed by victories in World Wars I and II and the end of the Cold War in 1991, the US remains the world's most powerful nation state. The economy is marked by steady growth, low unemployment and inflation, and rapid advances in technology."
},
{
    continent:"Asia",
    countryName:"China",
    countryCode:"CH",
    area:9596960,
    population:1313973713,
    gdp:8859000,
    government:"Communist state",
    government_desc:0,
    capital:"Beijing",
    member_g8:false,
    article:"http://en.wikipedia.org/wiki/China",
    background:"For centuries China stood as a leading civilization, outpacing the rest of the world in the arts and sciences, but in the 19th and early 20th centuries, the country was beset by civil unrest, major famines, military defeats, and foreign occupation. After World War II, the Communists under MAO Zedong established an autocratic socialist system that, while ensuring China's sovereignty, imposed strict controls over everyday life and cost the lives of tens of millions of people. After 1978, his successor DENG Xiaoping and other leaders focused on market-oriented economic development and by 2000 output had quadrupled. For much of the population, living standards have improved dramatically and the room for personal choice has expanded, yet political controls remain tight."
},
{
    continent:"Asia",
    countryName:"Japan",
    countryCode:"JA",
    area:377835,
    population:127463611,
    gdp:4018000,
    government:"constitutional monarchy with parliamentary government",
    government_desc:1,
    capital:"Tokyo",
    member_g8:true,
    article:"http://en.wikipedia.org/wiki/Japan",
    background:"In 1603, a Tokugawa shogunate (military dictatorship) ushered in a long period of isolation from foreign influence in order to secure its power. For 250 years this policy enabled Japan to enjoy stability and a flowering of its indigenous culture. Following the Treaty of Kanagawa with the US in 1854, Japan opened its ports and began to intensively modernize and industrialize. During the late 19th and early 20th centuries, Japan became a regional power that was able to defeat the forces of both China and Russia. It occupied Korea, Formosa (Taiwan), and southern Sakhalin Island. In 1931-32 Japan occupied Manchuria, and in 1937 it launched a full-scale invasion of China. Japan attacked US forces in 1941 - triggering America's entry into World War II - and soon occupied much of East and Southeast Asia. After its defeat in World War II, Japan recovered to become an economic power and a staunch ally of the US. While the emperor retains his throne as a symbol of national unity, actual power rests in networks of powerful politicians, bureaucrats, and business executives. The economy experienced a major slowdown starting in the 1990s following three decades of unprecedented growth, but Japan still remains a major economic power, both in Asia and globally. In 2005, Japan began a two-year term as a non-permanent member of the UN Security Council."
},
{
    continent:"Asia",
    countryName:"India",
    countryCode:"IN",
    area:3287590,
    population:1095351995,
    gdp:3611000,
    independence:new Date(1947,7,15),
    government:"federal republic",
    government_desc:2,
    capital:"New Delhi",
    member_g8:false,
    article:"http://en.wikipedia.org/wiki/India",
    background:"The Indus Valley civilization, one of the oldest in the world, dates back at least 5,000 years. Aryan tribes from the northwest infiltrated onto Indian lands about 1500 B.C.; their merger with the earlier Dravidian inhabitants created the classical Indian culture. Arab incursions starting in the 8th century and Turkish in the 12th were followed by those of European traders, beginning in the late 15th century. By the 19th century, Britain had assumed political control of virtually all Indian lands. Indian armed forces in the British army played a vital role in both World Wars. Nonviolent resistance to British colonialism led by Mohandas GANDHI and Jawaharlal NEHRU brought independence in 1947. The subcontinent was divided into the secular state of India and the smaller Muslim state of Pakistan. A third war between the two countries in 1971 resulted in East Pakistan becoming the separate nation of Bangladesh. Despite impressive gains in economic investment and output, India faces pressing problems such as the ongoing dispute with Pakistan over Kashmir, massive overpopulation, environmental degradation, extensive poverty, and ethnic and religious strife."
},
{
    continent:"Europe",
    countryName:"Germany",
    countryCode:"GM",
    area:357021,
    population:82422299,
    gdp:2504000,
    independence:new Date(1871,0,18),
    government:"federal republic",
    government_desc:2,
    capital:"Berlin",
    member_g8:true,
    article:"http://en.wikipedia.org/wiki/Germany",
    background:"As Europe's largest economy and second most populous nation, Germany remains a key member of the continent's economic, political, and defense organizations. European power struggles immersed Germany in two devastating World Wars in the first half of the 20th century and left the country occupied by the victorious Allied powers of the US, UK, France, and the Soviet Union in 1945. With the advent of the Cold War, two German states were formed in 1949: the western Federal Republic of Germany (FRG) and the eastern German Democratic Republic (GDR). The democratic FRG embedded itself in key Western economic and security organizations, the EC, which became the EU, and NATO, while the Communist GDR was on the front line of the Soviet-led Warsaw Pact. The decline of the USSR and the end of the Cold War allowed for German unification in 1990. Since then, Germany has expended considerable funds to bring Eastern productivity and wages up to Western standards. In January 1999, Germany and 10 other EU countries introduced a common European exchange currency, the euro."
},
{
    continent:"Europe",
    countryName:"United Kingdom",
    countryCode:"UK",
    area:244820,
    population:60609153,
    gdp:1830000,
    independence:new Date(1801,0,1),
    government:"constitutional monarchy",
    government_desc:1,
    capital:"London",
    member_g8:true,
    article:"http://en.wikipedia.org/wiki/United_kingdom",
    background:"Great Britain, the dominant industrial and maritime power of the 19th century, played a leading role in developing parliamentary democracy and in advancing literature and science. At its zenith, the British Empire stretched over one-fourth of the earth's surface. The first half of the 20th century saw the UK's strength seriously depleted in two World Wars. The second half witnessed the dismantling of the Empire and the UK rebuilding itself into a modern and prosperous European nation. As one of five permanent members of the UN Security Council, a founding member of NATO, and of the Commonwealth, the UK pursues a global approach to foreign policy; it currently is weighing the degree of its integration with continental Europe. A member of the EU, it chose to remain outside the Economic and Monetary Union for the time being. Constitutional reform is also a significant issue in the UK. The Scottish Parliament, the National Assembly for Wales, and the Northern Ireland Assembly were established in 1999, but the latter is suspended due to wrangling over the peace process."
},
{
    continent:"Europe",
    countryName:"France",
    countryCode:"FR",
    area:547030,
    population:60876136,
    gdp:1816000,
    government:"republic",
    government_desc:5,
    capital:"Paris",
    member_g8:true,
    article:"http://en.wikipedia.org/wiki/France",
    background:"Although ultimately a victor in World Wars I and II, France suffered extensive losses in its empire, wealth, manpower, and rank as a dominant nation-state. Nevertheless, France today is one of the most modern countries in the world and is a leader among European nations. Since 1958, it has constructed a presidential democracy resistant to the instabilities experienced in earlier parliamentary democracies. In recent years, its reconciliation and cooperation with Germany have proved central to the economic integration of Europe, including the introduction of a common exchange currency, the euro, in January 1999. At present, France is at the forefront of efforts to develop the EU's military capabilities to supplement progress toward an EU foreign policy."
},
{
    continent:"Europe",
    countryName:"Italy",
    countryCode:"IT",
    area:301230,
    population:58133509,
    gdp:1698000,
    independence:new Date(1861,2,17),
    government:"republic",
    government_desc:5,
    capital:"Rome",
    member_g8:true,
    article:"http://en.wikipedia.org/wiki/Italy",
    background:"Italy became a nation-state in 1861 when the regional states of the peninsula, along with Sardinia and Sicily, were united under King Victor EMMANUEL II. An era of parliamentary government came to a close in the early 1920s when Benito MUSSOLINI established a Fascist dictatorship. His disastrous alliance with Nazi Germany led to Italy's defeat in World War II. A democratic republic replaced the monarchy in 1946 and economic revival followed. Italy was a charter member of NATO and the European Economic Community (EEC). It has been at the forefront of European economic and political unification, joining the Economic and Monetary Union in 1999. Persistent problems include illegal immigration, organized crime, corruption, high unemployment, sluggish economic growth, and the low incomes and technical standards of southern Italy compared with the prosperous north."
},
{
    continent:"Asia",
    countryName:"Russia",
    countryCode:"RS",
    area:17075200,
    population:142893540,
    gdp:1589000,
    independence:new Date(1991,7,24),
    government:"federation",
    government_desc:3,
    capital:"Moscow",
    member_g8:true,
    article:"http://en.wikipedia.org/wiki/Russia",
    background:"Founded in the 12th century, the Principality of Muscovy, was able to emerge from over 200 years of Mongol domination (13th-15th centuries) and to gradually conquer and absorb surrounding principalities. In the early 17th century, a new Romanov Dynasty continued this policy of expansion across Siberia to the Pacific. Under PETER I (ruled 1682-1725), hegemony was extended to the Baltic Sea and the country was renamed the Russian Empire. During the 19th century, more territorial acquisitions were made in Europe and Asia. Repeated devastating defeats of the Russian army in World War I led to widespread rioting in the major cities of the Russian Empire and to the overthrow in 1917 of the imperial household. The Communists under Vladimir LENIN seized power soon after and formed the USSR. The brutal rule of Iosif STALIN (1928-53) strengthened communist rule and Russian dominance of the Soviet Union at a cost of tens of millions of lives. The Soviet economy and society stagnated in the following decades until General Secretary Mikhail GORBACHEV (1985-91) introduced glasnost (openness) and perestroika (restructuring) in an attempt to modernize Communism, but his initiatives inadvertently released forces that by December 1991 splintered the USSR into Russia and 14 other independent republics. Since then, Russia has struggled in its efforts to build a democratic political system and market economy to replace the strict social, political, and economic controls of the Communist period. While some progress has been made on the economic front, recent years have seen a recentralization of power under Vladimir PUTIN and the erosion of nascent democratic institutions. A determined guerrilla conflict still plagues Russia in Chechnya and threatens to destabilize the North Caucasus region."
},
{
    continent:"South America",
    countryName:"Brazil",
    countryCode:"BR",
    area:8511965,
    population:188078227,
    gdp:1556000,
    independence:new Date(1822,8,7),
    government:"federative republic",
    government_desc:3,
    capital:"Brasilia",
    member_g8:false,
    article:"http://en.wikipedia.org/wiki/Brazil",
    background:"Following three centuries under the rule of Portugal, Brazil became an independent nation in 1822 and a republic in 1889. By far the largest and most populous country in South America, Brazil overcame more than half a century of military intervention in the governance of the country when in 1985 the military regime peacefully ceded power to civilian rulers. Brazil continues to pursue industrial and agricultural growth and development of its interior. Exploiting vast natural resources and a large labor pool, it is today South America's leading economic power and a regional leader. Highly unequal income distribution remains a pressing problem."
},
{
    continent:"North America",
    countryName:"Canada",
    countryCode:"CA",
    area:9984670,
    population:33098932,
    gdp:1114000,
    independence:new Date(1867,6,1),
    government:"constitutional monarchy with parliamentary democracy and federation",
    government_desc:1,
    capital:"Ottawa",
    member_g8:true,
    article:"http://en.wikipedia.org/wiki/Canada",
    background:"A land of vast distances and rich natural resources, Canada became a self-governing dominion in 1867 while retaining ties to the British crown. Economically and technologically the nation has developed in parallel with the US, its neighbor to the south across an unfortified border. Canada's paramount political problem is meeting public demands for quality improvements in health care and education services after a decade of budget cuts. Canada also faces questions about integrity in government following revelations regarding a corruption scandal in the federal government that has helped revive the fortunes of separatists in predominantly francophone Quebec."
},
{
    continent:"North America",
    countryName:"Mexico",
    countryCode:"MX",
    area:1972550,
    population:107449525,
    gdp:1067000,
    independence:new Date(1810,8,16),
    government:"federal republic",
    government_desc:2,
    capital:"Mexico (Distrito Federal)",
    member_g8:false,
    article:"http://en.wikipedia.org/wiki/Mexico",
    background:"The site of advanced Amerindian civilizations, Mexico came under Spanish rule for three centuries before achieving independence early in the 19th century. A devaluation of the peso in late 1994 threw Mexico into economic turmoil, triggering the worst recession in over half a century. The nation continues to make an impressive recovery. Ongoing economic and social concerns include low real wages, underemployment for a large segment of the population, inequitable income distribution, and few advancement opportunities for the largely Amerindian population in the impoverished southern states. Elections held in July 2000 marked the first time since the 1910 Mexican Revolution that the opposition defeated the party in government, the Institutional Revolutionary Party (PRI). Vicente FOX of the National Action Party (PAN) was sworn in on 1 December 2000 as the first chief executive elected in free and fair elections."
},
{
    continent:"Europe",
    countryName:"Spain",
    countryCode:"SP",
    area:504782,
    population:40397842,
    gdp:1029000,
    independence:new Date(1492,0,1),
    government:"parliamentary monarchy",
    government_desc:4,
    capital:"Madrid",
    member_g8:false,
    article:"http://en.wikipedia.org/wiki/Spain",
    background:"Spain's powerful world empire of the 16th and 17th centuries ultimately yielded command of the seas to England. Subsequent failure to embrace the mercantile and industrial revolutions caused the country to fall behind Britain, France, and Germany in economic and political power. Spain remained neutral in World Wars I and II, but suffered through a devastating civil war (1936-39). A peaceful transition to democracy following the death of dictator Francisco FRANCO in 1975, and rapid economic modernization (Spain joined the EU in 1986), have given Spain one of the most dynamic economies in Europe and made it a global champion of freedom. Continuing challenges include Basque Fatherland and Liberty (ETA) terrorism and relatively high unemployment."
},
{
    continent:"Asia",
    countryName:"South Korea",
    countryCode:"KS",
    area:98480,
    population:48846823,
    gdp:965300,
    independence:new Date(1945,7,15),
    government:"republic",
    government_desc:5,
    capital:"Seoul",
    member_g8:false,
    article:"http://en.wikipedia.org/wiki/South_korea",
    background:"Korea was an independent kingdom for much of the past millennium. Following its victory in the Russo-Japanese War in 1905, Japan occupied Korea; five years later it formally annexed the entire peninsula. After World War II, a Republic of Korea (ROK) was set up in the southern half of the Korean Peninsula while a Communist-style government was installed in the north (the DPRK). During the Korean War (1950-53), US troops and UN forces fought alongside soldiers from the ROK to defend South Korea from DPRK attacks supported by China and the Soviet Union. An armistice was signed in 1953, splitting the peninsula along a demilitarized zone at about the 38th parallel. Thereafter, South Korea achieved rapid economic growth with per capita income rising to roughly 14 times the level of North Korea. In 1993, KIM Yo'ng-sam became South Korea's first civilian president following 32 years of military rule. South Korea today is a fully functioning modern democracy. In June 2000, a historic first North-South summit took place between the South's President KIM Tae-chung and the North's leader KIM Jong Il."
},
{
    continent:"Asia",
    countryName:"Indonesia",
    countryCode:"ID",
    area:1919440,
    population:245452739,
    gdp:865600,
    independence:new Date(1945,7,17),
    government:"republic",
    government_desc:5,
    capital:"Jakarta",
    member_g8:false,
    article:"http://en.wikipedia.org/wiki/Indonesia",
    background:"The Dutch began to colonize Indonesia in the early 17th century; the islands were occupied by Japan from 1942 to 1945. Indonesia declared its independence after Japan's surrender, but it required four years of intermittent negotiations, recurring hostilities, and UN mediation before the Netherlands agreed to relinquish its colony. Indonesia is the world's largest archipelagic state and home to the world's largest Muslim population. Current issues include: alleviating poverty, preventing terrorism, consolidating democracy after four decades of authoritarianism, implementing financial sector reforms, stemming corruption, and holding the military and police accountable for human rights violations. Indonesia was the nation worst hit by the December 2004 tsunami, which particularly affected Aceh province causing over 100,000 deaths and over $4 billion in damage. An additional earthquake in March 2005 created heavy destruction on the island of Nias. Reconstruction in these areas may take up to a decade. In 2005, Indonesia reached a historic peace agreement with armed separatists in Aceh, but it continues to face a low intensity separatist guerilla movement in Papua."
}

]

countryData2 = [

{
    continent:"North America",
    countryName:"United States2",
    countryCode:"US",
    area:9631420,
    population:298444215,
    gdp:12360000,
    independence:new Date(1776,6,4),
    government:"federal republic",
    government_desc:2,
    capital:"Washington, DC",
    member_g8:true,
    article:"http://en.wikipedia.org/wiki/United_states",
    background:"Britain's American colonies broke with the mother country in 1776 and were recognized as the new nation of the United States of America following the Treaty of Paris in 1783. During the 19th and 20th centuries, 37 new states were added to the original 13 as the nation expanded across the North American continent and acquired a number of overseas possessions. The two most traumatic experiences in the nation's history were the Civil War (1861-65) and the Great Depression of the 1930s. Buoyed by victories in World Wars I and II and the end of the Cold War in 1991, the US remains the world's most powerful nation state. The economy is marked by steady growth, low unemployment and inflation, and rapid advances in technology."
},
{
    continent:"Asia",
    countryName:"China2",
    countryCode:"CH",
    area:9596960,
    population:1313973713,
    gdp:8859000,
    government:"Communist state",
    government_desc:0,
    capital:"Beijing",
    member_g8:false,
    article:"http://en.wikipedia.org/wiki/China",
    background:"For centuries China stood as a leading civilization, outpacing the rest of the world in the arts and sciences, but in the 19th and early 20th centuries, the country was beset by civil unrest, major famines, military defeats, and foreign occupation. After World War II, the Communists under MAO Zedong established an autocratic socialist system that, while ensuring China's sovereignty, imposed strict controls over everyday life and cost the lives of tens of millions of people. After 1978, his successor DENG Xiaoping and other leaders focused on market-oriented economic development and by 2000 output had quadrupled. For much of the population, living standards have improved dramatically and the room for personal choice has expanded, yet political controls remain tight."
},
{
    continent:"Asia",
    countryName:"Japan2",
    countryCode:"JA",
    area:377835,
    population:127463611,
    gdp:4018000,
    government:"constitutional monarchy with parliamentary government",
    government_desc:1,
    capital:"Tokyo",
    member_g8:true,
    article:"http://en.wikipedia.org/wiki/Japan",
    background:"In 1603, a Tokugawa shogunate (military dictatorship) ushered in a long period of isolation from foreign influence in order to secure its power. For 250 years this policy enabled Japan to enjoy stability and a flowering of its indigenous culture. Following the Treaty of Kanagawa with the US in 1854, Japan opened its ports and began to intensively modernize and industrialize. During the late 19th and early 20th centuries, Japan became a regional power that was able to defeat the forces of both China and Russia. It occupied Korea, Formosa (Taiwan), and southern Sakhalin Island. In 1931-32 Japan occupied Manchuria, and in 1937 it launched a full-scale invasion of China. Japan attacked US forces in 1941 - triggering America's entry into World War II - and soon occupied much of East and Southeast Asia. After its defeat in World War II, Japan recovered to become an economic power and a staunch ally of the US. While the emperor retains his throne as a symbol of national unity, actual power rests in networks of powerful politicians, bureaucrats, and business executives. The economy experienced a major slowdown starting in the 1990s following three decades of unprecedented growth, but Japan still remains a major economic power, both in Asia and globally. In 2005, Japan began a two-year term as a non-permanent member of the UN Security Council."
},
{
    continent:"Asia",
    countryName:"India2",
    countryCode:"IN",
    area:3287590,
    population:1095351995,
    gdp:3611000,
    independence:new Date(1947,7,15),
    government:"federal republic",
    government_desc:2,
    capital:"New Delhi",
    member_g8:false,
    article:"http://en.wikipedia.org/wiki/India",
    background:"The Indus Valley civilization, one of the oldest in the world, dates back at least 5,000 years. Aryan tribes from the northwest infiltrated onto Indian lands about 1500 B.C.; their merger with the earlier Dravidian inhabitants created the classical Indian culture. Arab incursions starting in the 8th century and Turkish in the 12th were followed by those of European traders, beginning in the late 15th century. By the 19th century, Britain had assumed political control of virtually all Indian lands. Indian armed forces in the British army played a vital role in both World Wars. Nonviolent resistance to British colonialism led by Mohandas GANDHI and Jawaharlal NEHRU brought independence in 1947. The subcontinent was divided into the secular state of India and the smaller Muslim state of Pakistan. A third war between the two countries in 1971 resulted in East Pakistan becoming the separate nation of Bangladesh. Despite impressive gains in economic investment and output, India faces pressing problems such as the ongoing dispute with Pakistan over Kashmir, massive overpopulation, environmental degradation, extensive poverty, and ethnic and religious strife."
},
{
    continent:"Europe",
    countryName:"Germany2",
    countryCode:"GM",
    area:357021,
    population:82422299,
    gdp:2504000,
    independence:new Date(1871,0,18),
    government:"federal republic",
    government_desc:2,
    capital:"Berlin",
    member_g8:true,
    article:"http://en.wikipedia.org/wiki/Germany",
    background:"As Europe's largest economy and second most populous nation, Germany remains a key member of the continent's economic, political, and defense organizations. European power struggles immersed Germany in two devastating World Wars in the first half of the 20th century and left the country occupied by the victorious Allied powers of the US, UK, France, and the Soviet Union in 1945. With the advent of the Cold War, two German states were formed in 1949: the western Federal Republic of Germany (FRG) and the eastern German Democratic Republic (GDR). The democratic FRG embedded itself in key Western economic and security organizations, the EC, which became the EU, and NATO, while the Communist GDR was on the front line of the Soviet-led Warsaw Pact. The decline of the USSR and the end of the Cold War allowed for German unification in 1990. Since then, Germany has expended considerable funds to bring Eastern productivity and wages up to Western standards. In January 1999, Germany and 10 other EU countries introduced a common European exchange currency, the euro."
},
{
    continent:"Asia",
    countryName:"Russia2",
    countryCode:"RS",
    area:17075200,
    population:142893540,
    gdp:1589000,
    independence:new Date(1991,7,24),
    government:"federation",
    government_desc:3,
    capital:"Moscow",
    member_g8:true,
    article:"http://en.wikipedia.org/wiki/Russia",
    background:"Founded in the 12th century, the Principality of Muscovy, was able to emerge from over 200 years of Mongol domination (13th-15th centuries) and to gradually conquer and absorb surrounding principalities. In the early 17th century, a new Romanov Dynasty continued this policy of expansion across Siberia to the Pacific. Under PETER I (ruled 1682-1725), hegemony was extended to the Baltic Sea and the country was renamed the Russian Empire. During the 19th century, more territorial acquisitions were made in Europe and Asia. Repeated devastating defeats of the Russian army in World War I led to widespread rioting in the major cities of the Russian Empire and to the overthrow in 1917 of the imperial household. The Communists under Vladimir LENIN seized power soon after and formed the USSR. The brutal rule of Iosif STALIN (1928-53) strengthened communist rule and Russian dominance of the Soviet Union at a cost of tens of millions of lives. The Soviet economy and society stagnated in the following decades until General Secretary Mikhail GORBACHEV (1985-91) introduced glasnost (openness) and perestroika (restructuring) in an attempt to modernize Communism, but his initiatives inadvertently released forces that by December 1991 splintered the USSR into Russia and 14 other independent republics. Since then, Russia has struggled in its efforts to build a democratic political system and market economy to replace the strict social, political, and economic controls of the Communist period. While some progress has been made on the economic front, recent years have seen a recentralization of power under Vladimir PUTIN and the erosion of nascent democratic institutions. A determined guerrilla conflict still plagues Russia in Chechnya and threatens to destabilize the North Caucasus region."
},
{
    continent:"South America",
    countryName:"Brazil2",
    countryCode:"BR",
    area:8511965,
    population:188078227,
    gdp:1556000,
    independence:new Date(1822,8,7),
    government:"federative republic",
    government_desc:3,
    capital:"Brasilia",
    member_g8:false,
    article:"http://en.wikipedia.org/wiki/Brazil",
    background:"Following three centuries under the rule of Portugal, Brazil became an independent nation in 1822 and a republic in 1889. By far the largest and most populous country in South America, Brazil overcame more than half a century of military intervention in the governance of the country when in 1985 the military regime peacefully ceded power to civilian rulers. Brazil continues to pursue industrial and agricultural growth and development of its interior. Exploiting vast natural resources and a large labor pool, it is today South America's leading economic power and a regional leader. Highly unequal income distribution remains a pressing problem."
},
{
    continent:"North America",
    countryName:"Canada2",
    countryCode:"CA",
    area:9984670,
    population:33098932,
    gdp:1114000,
    independence:new Date(1867,6,1),
    government:"constitutional monarchy with parliamentary democracy and federation",
    government_desc:1,
    capital:"Ottawa",
    member_g8:true,
    article:"http://en.wikipedia.org/wiki/Canada",
    background:"A land of vast distances and rich natural resources, Canada became a self-governing dominion in 1867 while retaining ties to the British crown. Economically and technologically the nation has developed in parallel with the US, its neighbor to the south across an unfortified border. Canada's paramount political problem is meeting public demands for quality improvements in health care and education services after a decade of budget cuts. Canada also faces questions about integrity in government following revelations regarding a corruption scandal in the federal government that has helped revive the fortunes of separatists in predominantly francophone Quebec."
},
{
    continent:"North America",
    countryName:"Mexico2",
    countryCode:"MX",
    area:1972550,
    population:107449525,
    gdp:1067000,
    independence:new Date(1810,8,16),
    government:"federal republic",
    government_desc:2,
    capital:"Mexico (Distrito Federal)",
    member_g8:false,
    article:"http://en.wikipedia.org/wiki/Mexico",
    background:"The site of advanced Amerindian civilizations, Mexico came under Spanish rule for three centuries before achieving independence early in the 19th century. A devaluation of the peso in late 1994 threw Mexico into economic turmoil, triggering the worst recession in over half a century. The nation continues to make an impressive recovery. Ongoing economic and social concerns include low real wages, underemployment for a large segment of the population, inequitable income distribution, and few advancement opportunities for the largely Amerindian population in the impoverished southern states. Elections held in July 2000 marked the first time since the 1910 Mexican Revolution that the opposition defeated the party in government, the Institutional Revolutionary Party (PRI). Vicente FOX of the National Action Party (PAN) was sworn in on 1 December 2000 as the first chief executive elected in free and fair elections."
},
{
    continent:"Europe",
    countryName:"Spain2",
    countryCode:"SP",
    area:504782,
    population:40397842,
    gdp:1029000,
    independence:new Date(1492,0,1),
    government:"parliamentary monarchy",
    government_desc:4,
    capital:"Madrid",
    member_g8:false,
    article:"http://en.wikipedia.org/wiki/Spain",
    background:"Spain's powerful world empire of the 16th and 17th centuries ultimately yielded command of the seas to England. Subsequent failure to embrace the mercantile and industrial revolutions caused the country to fall behind Britain, France, and Germany in economic and political power. Spain remained neutral in World Wars I and II, but suffered through a devastating civil war (1936-39). A peaceful transition to democracy following the death of dictator Francisco FRANCO in 1975, and rapid economic modernization (Spain joined the EU in 1986), have given Spain one of the most dynamic economies in Europe and made it a global champion of freedom. Continuing challenges include Basque Fatherland and Liberty (ETA) terrorism and relatively high unemployment."
},
{
    continent:"Europe",
    countryName:"United Kingdom2",
    countryCode:"UK",
    area:244820,
    population:60609153,
    gdp:1830000,
    independence:new Date(1801,0,1),
    government:"constitutional monarchy",
    government_desc:1,
    capital:"London",
    member_g8:true,
    article:"http://en.wikipedia.org/wiki/United_kingdom",
    background:"Great Britain, the dominant industrial and maritime power of the 19th century, played a leading role in developing parliamentary democracy and in advancing literature and science. At its zenith, the British Empire stretched over one-fourth of the earth's surface. The first half of the 20th century saw the UK's strength seriously depleted in two World Wars. The second half witnessed the dismantling of the Empire and the UK rebuilding itself into a modern and prosperous European nation. As one of five permanent members of the UN Security Council, a founding member of NATO, and of the Commonwealth, the UK pursues a global approach to foreign policy; it currently is weighing the degree of its integration with continental Europe. A member of the EU, it chose to remain outside the Economic and Monetary Union for the time being. Constitutional reform is also a significant issue in the UK. The Scottish Parliament, the National Assembly for Wales, and the Northern Ireland Assembly were established in 1999, but the latter is suspended due to wrangling over the peace process."
}

]


isc.ListGrid.create({
    ID: "countryList",
    width:500, height:124, alternateRecordStyles:true,
    data: countryData1,
    drawAllMaxCells:0, // this is the parameter that triggers the display problem. when drawAllMaxCells is not set to 0, there is no problem.
    fields:[
        {name:"countryCode", title:"Flag"},
        {name:"countryName", title:"Country"},
        {name:"capital", title:"Capital"},
        {name:"continent", title:"Continent"}
    ],
    canResizeFields: true,
canExpandRecords: true,
    expansionMode: "detailField",
    detailField: "background"
})


isc.IButton.create({
    left:0, top:240, width:160,
    title:"Fetch 2",
    click:"countryList.setData(countryData2);countryList.scrollToRow(0);  countryList.markForRedraw();"
})



isc.IButton.create({
    left:340, top:240, width:160,
    title:"Fetch 1",
    click:"countryList.setData(countryData1);countryList.scrollToRow(0) ; countryList.markForRedraw();"
})

The steps to reproduce is complicated but this is the best way i think i can explain -

[1] widen a column to display the horizontal scroll bar
[2] scroll to the bottow right
[3] click on the "fetch 2" button to load new data in the same grid
[4] play with horizontal/vertical scroll bars until the grid falls into the bug

Smart Client Getting Started/Calendar Component

$
0
0
I am new to Smart Client and just downloaded it. I need to utilize calendar component. Could someone guide how I get started on it? I have following -

Server Setup - Apache/My SQL/PHP

Reading through getting started guide it looks little daunting and has lot of reference to JSP. I only know PHP. Will appreciate any guide on writing smart client app with PHP.

Smart GWT V4.0, IE11

$
0
0
In our application we are using grid to display application data. some time when we scroll through the grid area(Up down,left Right) some horizontal/vertical lines are showing at grid area.With further scrolling those line may eliminate.

is there any parmanent solution to restrict those lines to be appeared?

We are using GWT 2.3.0(using gwt-servelet.jar,gwt-dev.jar), Smart GWT 4.0 (smartgwt.jar, smartgwtpro.jar),Internet explorer 11/IE8.
it is working fine in IE8 with GWT 2.3.0 but when we are using IE11 this problem appear.

Custom validator added for DataSourceLinkField is not working

$
0
0
Hi,

I have added custom regular expression validator for link field to validate URL.

It is not validating the field on call of FilterBuilder.validate().


Code snippet:
--------------
DataSourceField dataSourceSrcField = new DataSourceLinkField(name, title);
RegExpValidator expValidator = new RegExpValidator();
expValidator.setExpression("^(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]");
expValidator.setValidateOnChange(true);
dataSourceSrcField.setValidators(expValidator);

Can anyone help with this.

Regards,
Cijo P
Viewing all 4756 articles
Browse latest View live