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

Tree view record loading issue

$
0
0
hi,

i am having the issue in loading the record in to the tree view.
i used "treeViewComponent.getDataSource().addData(record);" method to adding the record to the tree view.

i am using more number of tree view in my application, except one tree view remaining all views are not loading. please suggest some idea to resolve this issue.

IE11 : text goes outside the window dialog

$
0
0
SmartClient Version: v9.1p_2015-03-26/Pro Development Only (built 2015-03-26)

browser(s) and version(s) involved
IE 11.0.9600.17691
Update Versions: 11.0.17 (KB3032359)
Product ID:00150-20000-00003-AA459


Please try the following code for the Internet Explorer -

Code:

myDynamicForm = isc.DynamicForm.create({
            itemLayout:"absolute",
            fields: [
                {name:"setting", type:"radioGroup", wrap: false, showTitle: false, valueMap : ['Selection value one not too long', 'Selection Value very very very very very long']}
            ]
        });

myDialog = isc.Window.create({
    autoSize:true,
    isModal:true,
    title: "My Window",
    items: [ myDynamicForm ]
});

myDialog.show();

You can see that the text overflows in case of IE. the issue is not seen for other browsers.

Integer converted to Long in server side

$
0
0
SmartClient Version: v10.0p_2015-06-10/PowerEdition Deployment (built 2015-06-10)

Browser Version : IE 11.0.9600.17843

I am passing "Integer" in the criteria object from Client and in the DMI class while getting its converted to Long.

Client Code:
Criteria lCriteria = new Criteria();
lCriteria.addCriteria("testId", 25);
lGrid.fetchData(lCriteria);

Server code (DMI class - fetch()):

public DSResponse fetch(DSRequest dsRequest) throws Exception {
Integer testId = (Integer) dsRequest.getCriteriaValue("testId");

The below line of code is throwing class cast exception Long cannot cast to Integer.

Please suggest I am doing anything wrong or issue in the Smartgwt with my current build?

Focus First Field from SmartGWT 4 showcase is not working

$
0
0
Hi,

http://www.smartclient.com/smartgwt/showcase/#form_category_focus_first works fine, with SmartGWT 5. However, the same demo is not working with the v9.0p_2015-08-12/LGPL showcase. The cursor is on the first field, but the text is not selected. Also, this is happening only if the sample is opened from the showcase tree. After that, if you refresh the page the text is selected as expected

GWT 2.4
Browser: Chrome 44.0.2403.155 m & Firefox ESR 24.8.1

unit testing a custom server side DataSource

$
0
0
I’m writing a custom DataSource and would like to unit test it in a stand-alone Java application (TestNg).

I tried making a call directly to executeFetch. The executeFetch fetch executes code that has no external dependency.

I get this stack trace:

Code:

Problem loading builtinTypes.xml
Exception when loading from __USE_CONTAINER__/Orchestrate/sc/system/schema/builtinTypes.xml:
java.io.IOException: Configured for containerIO, but servletContext not available!  You need to install the Init servlet
        at com.isomorphic.io.ISCFile.<init>(ISCFile.java:177)
        at com.isomorphic.xml.XML.getXMLDocument(XML.java:286)
        at com.isomorphic.xml.XML.toDSRecords(XML.java:294)
        at com.isomorphic.xml.XML.toDSRecords(XML.java:298)
        at com.isomorphic.xml.XML.toDSRecords(XML.java:303)
        at com.isomorphic.datasource.DataSource.<clinit>(DataSource.java:990)
        at com.cedarcone.Orchestrate.test.classifier2.ReceipeDataSourceTest.testReceipeDataSource(ReceipeDataSourceTest.java:29)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
        at org.testng.internal.Invoker.invokeMethod(Invoker.java:659)
        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:845)
        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1153)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
        at org.testng.TestRunner.privateRun(TestRunner.java:771)
        at org.testng.TestRunner.run(TestRunner.java:621)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:352)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:347)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305)
        at org.testng.SuiteRunner.run(SuiteRunner.java:254)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1199)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1124)
        at org.testng.TestNG.run(TestNG.java:1032)
        at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
        at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
        at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

Is there a way to set up an environment for stand-alone unit testing of a server side DataSource?

support for laptop with touch screen?

$
0
0
Hello,

Just tested the "feature explorer" on my brand new dell laptop with touch screen... and touch scrolling doesn't work, that's specially annoying for listgrid/treegrid! Any plan to fix this?

Tested with Chrome 44 et MS Edge (Windows 10)

Cheers

SmartGWT- Why does it not work?

$
0
0
Hey!

I started to try Smart GWT development, but I don't can run it. I am using eclipse 4.4 with GWT 2.6 and SmartGWT 4.0. I followed several tutorials, which should show how to setup a SmartGWT project.
My problem is that my widgets, which I add in onModuleLoad are not displayed in the browser, just the default HTML-sheet.
I tried a lot, but I don't get it.

My code:

onModuleLoad
Code:


        public void onModuleLoad() {
               
               
        final IButton button = new IButton("Hello");
       
        button.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() {
                       
                        @Override
                        public void onClick(com.smartgwt.client.widgets.events.ClickEvent event) {
                                // TODO Auto-generated method stub
                                SC.say("Hello ");
                        }
                });
       
        VLayout vl= new VLayout();
        vl.setSize("100%", "100%");
        vl.addMember(button);
       
       
        RootPanel.get().add(vl);

GWT.XML
Code:


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.6.0//EN"
  "http://google-web-toolkit.googlecode.com/svn/tags/2.6.0/distro-source/core/src/gwt-module.dtd">
<module rename-to='test'>
                        -->
<inherits name='com.google.gwt.user.User'/>

<inherits name="com.smartgwt.SmartGwt"/>

<source path='client'/>
<source path='shared'/>


</module>

My HTML-File

Code:


<!doctype html>


<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">

    <link type="text/css" rel="stylesheet" href="Test.css">

    <title>Web Application Starter Project</title>
   
   
    <script>var isomorphicDir="test/sc/";</script>
<script type="text/javascript" language="test/test.nocache.js"></script>
</head>

    <script type="text/javascript" language="javascript" src="test/test.nocache.js"></script>
  </head>

  <body>

    <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
   
    <noscript>
      <div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
        Your web browser must have JavaScript enabled
        in order for this application to display correctly.
      </div>
    </noscript>

    <h1>Web Application Starter Project</h1>

    <table align="center">
      <tr>
        <td colspan="2" style="font-weight:bold;">Please enter your name:</td>       
      </tr>
      <tr>
        <td id="nameFieldContainer"></td>
        <td id="sendButtonContainer"></td>
      </tr>
      <tr>
        <td colspan="2" style="color:red;" id="errorLabelContainer"></td>
      </tr>
    </table>
  </body>
</html>

WEB-XML

Code:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
              http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
        version="2.5"
        xmlns="http://java.sun.com/xml/ns/javaee">

  <!-- Servlets -->
  <servlet>
    <servlet-name>greetServlet</servlet-name>
    <servlet-class>test.test.server.GreetingServiceImpl</servlet-class>
  </servlet>
 
  <servlet-mapping>
    <servlet-name>greetServlet</servlet-name>
    <url-pattern>/test/greet</url-pattern>
  </servlet-mapping>
 
  <!-- Default page to serve -->
  <welcome-file-list>
    <welcome-file>Test.html</welcome-file>
  </welcome-file-list>

</web-app>

Maybe one of you can find my problem, because I really don't know, what the problem is.
Please, please help me!


Peter

CSV Export & column titles

$
0
0
Hello,

Is it by design that the datasource CSV export does not export the datasource column titles, but instead the field names?

The Excel exports on the other hand exports the column titles as expected.

This can also be seen in the showcase example here: http://www.smartclient.com/smartgwtee/showcase/#excel_export

Sub Menu not working properly in iOS

$
0
0
Hello,

When viewing the showcase example for the adaptive UI feature of Menus with iOS: http://www.smartclient.com/smartgwt/showcase/#menus_ms_new

You'll notice strange behaviour when selecting the sub menu "Recent documents".

It does not navigate correctly to the recent documents menu, instead it slides in a blank screen with only the "Done" option, making it impossible to select a sub menu item.

I tested with iOS 8.4.1 on an iPhone 6

Hot key not work on submenu

$
0
0
Hi,

We observe an issue that the hot key doesn't work on sub menus if we remove some menu prior to the menu with the hot key.

This issue can be reproduce on SmartClient_v83p_2015-05-05_PowerEdition with IE9 and FF12.

Please check the following standalone:

Steps to reproduce:

1. Click the top-level menu to show submenus.
2. Press Shift+Z, the hotkey works and warn message 'one' is shown.
3. Press Shift+M, the hotkey doesn't work and warn message 'Four' is not shown.
4. If we comment the last line of the code, hotkey "Shift+M" works fine.

Thanks,
Robin

Code:

isc.MenuButton.create({ID:"MenuItem3",title:"Testing Menu",labelVar:"Testing Menu",menu:isc.Menu.create({ID:"MenuItem3$menu",data:
[{title:"SayZero",click:"isc.warn('Four')"},
{keys:{keyName:"Z",shiftKey:true,ctrlKey:false,altKey:false},title:"SayOne",click: "isc.warn('One')"},
{title:"SayTwo",click:"isc.warn('Two')"},
{title:"SayThree",click:"isc.warn('Three')"},
{keys:{keyName:"M",shiftKey:true,ctrlKey:false,altKey:false},title:"SayFour",click:"isc.warn('Four')"},
]})})

MenuItem3.menu.removeData(MenuItem3.menu.data[2]);

customize addEventButton on Calendar

$
0
0
Hi,
I'm trying to customize the "addEventButton" of a calendar component.
What i'd like to achieve is to use a different button which handle a custom form to insert events.
The new button is rendered under the "backButton" without any icon and the calendar is still using his own default addEventButton...(you can see it in the attached image).

Is this a bug or am i doing something wrong ?


1. ISC Version : SNAPSHOT_v10.1d_2015-08-14/EVAL Development Only (example page)

2. Browser/OS: Chrome 44.0.2403.155 m (64-bit) on Windows Pro 8.1

6. Code to test in this example page
Code:

isc.Calendar.create({
    ID: "eventCalendar",
    data: eventData,
    addEventButton:isc.ImgButton.create({
        ID: "someButtonId",
        icon:"icons/Y.png",
        width:16,
        height:16,
        click: function(){
            alert();
        }
    })
});


Attached Images
File Type: png Capture.PNG (3.5 KB)

Splitpane with HtmlPane Resize Problem

$
0
0
SmartGWT Pro 5 rom 14. August 2015
Browsers: all

We have Splitpane:
- navi pane: contains a list (not important for this case)
- line pane contains Html pane
- detail pane contains simple label (not important for this case)

The problem ist that we can make the list pane bigger and bigger and we see the website (html) in int.

But we cannot make the list pane smaller again.

It also happens with SmartGwt 4.1 Pro.

Thx for your ideas

hibernate datasource relation

$
0
0
hi im new in smartgwt,im using Isomorphic SmartClient/SmartGWT Framework (v10.0p_2015-08-14/Pro Deployment 2015-08-14)

im trying relation in datasource but it won't works
i don't know what i did wrong can someone explain how to to this

account class:
public class Account implements Serializable {

protected long accoundID;
protected String accountUsername;
protected String accountPassword;
protected AccountDetails accountDetails;
//constructer
//getter,setter
}

accountDetails class:
public class AccountDetails implements Serializable {

protected long accountID;
protected String accountEmail;
protected String accountRegisteredDate;
protected Account account;
//constructer
//getter,setter
}

hibernate xml mapping for account class:
<hibernate-mapping>
<class name="jpac.main.server.serializable.Account" table="account" >
<id name="accountID" type="long">
<generator class="native"/>
</id>

<property name="accountUsername" type="string" />
<property name="accountPassword" type="string" />

<one-to-one name="accountDetails"
class="jpac.main.server.serializable.AccountDetails"
cascade="save-update">
</one-to-one>

</class>
</hibernate-mapping>

hibernate mapping for accountDetails class :
<hibernate-mapping>
<class name="jpac.main.server.serializable.AccountDetails" table="accountdetails" >
<id name="accountID" type="long">
<generator class="foreign">
<param name="property">account</param>
</generator>
</id>

<property name="accountEmail" type="string" />
<property name="accountRegisteredDate" type="date" />

<one-to-one name="account"
class="jpac.main.server.serializable.Account"
constrained="true">
</one-to-one>

</class>
</hibernate-mapping>


datasource for account:
<DataSource
ID="account"
serverType="hibernate"
tableName="account"
beanClassName="jpac.main.server.serializable.Account"
>
<fields>
<field name="accoundID" hidden="true" primaryKey="true" />
<field name="accountUsername" type="text" />
<field name="accountPassword" type="text" />
<field name="accountDetails" hidden="true" multiple="false"
type="accountDetails"
foreignKey="accountDetails.accountID"
/>
</fields>
</DataSource>

datsource for accountdetail:
<DataSource
ID="accountDetails"
serverType="hibernate"
tableName="accountDetails"
beanClassName="jpac.main.server.serializable.AccountDetails"
>
<fields>
<field name="accoundID" hidden="true" primaryKey="true" />
<field name="accountEmail" type="text" />
<field name="accountRegisteredDate" type="date" />
<field name="account" hidden="true" multiple="flase"
type="account"
foreignKey="account.accountID"
/>
</fields>
</DataSource>

console say:


.....
=== 2015-08-15 17:09:56,564 [65-0] WARN BasicDataSource - Related data source 'account' does not contain related field 'accountID' for field 'account'. Treating as simple field.
=== 2015-08-15 17:09:56,679 [65-0] ERROR DataSourceLoader - Exception while attempting to load a DataSource
org.hibernate.MappingException: An association from the table accountdetails refers to an unmapped class: jpac.main.server.serializable.Account
.....

....

=== 2015-08-15 17:09:56,681 [65-0] ERROR DataSourceLoader - BaseServlet Global Exception
javax.servlet.ServletException: DataSource 'account' failed to load due to an exception on the server:
An association from the table accountdetails refers to an unmapped class: jpac.main.server.serializable.Account
See the server-side log for additional details.
at com.isomorphic.servlet.DataSourceLoader.processRequest(DataSourceLoader.java:268)
.....

Attached Files
File Type: java Account.java (987 Bytes)
File Type: xml Account.hbm.xml (673 Bytes)
File Type: java AccountDetails.java (966 Bytes)
File Type: xml AccountDetails.hbm.xml (736 Bytes)
File Type: xml account.ds.xml (529 Bytes)

Form button not function on nightly build 2015-08-14

$
0
0
With following code, I found the first three buttons are not function. What's wrong. Thanks!
Code:

<html>
<head>
    <title></title> 
    <SCRIPT>var isomorphicDir = "../../isomorphic/"; var isc_useDefaultViewport = false;</SCRIPT>
    <SCRIPT SRC="../../isomorphic/system/modules/ISC_Core.js?isc_version=v10.0p_2015-08-14.js"></SCRIPT>
    <SCRIPT SRC="../../isomorphic/system/modules/ISC_Foundation.js?isc_version=v10.0p_2015-08-14.js"></SCRIPT>
    <SCRIPT SRC="../../isomorphic/system/modules/ISC_Containers.js?isc_version=v10.0p_2015-08-14.js"></SCRIPT>
    <SCRIPT SRC="../../isomorphic/system/modules/ISC_Grids.js?isc_version=v10.0p_2015-08-14.js"></SCRIPT>
    <SCRIPT SRC="../../isomorphic/system/modules/ISC_Forms.js?isc_version=v10.0p_2015-08-14.js"></SCRIPT>
    <SCRIPT SRC="../../isomorphic/system/modules/ISC_DataBinding.js?isc_version=v10.0p_2015-08-14.js"></SCRIPT>
    <SCRIPT SRC="../../isomorphic/skins/Graphite/load_skin.js?isc_version=v10.0p_2015-08-14.js"></SCRIPT>
</head>
<body id="xxx">
<script type="text/javascript">

 isc.VLayout.create({ ID:"v", width: "100%", height: "100%", members: [], border: "1px solid white", padding: "0px", margin: "10px", membersMargin: 5 });
 isc.DynamicForm.create({
        ID:"f", width: "500", height: 400, itemLayout: "absolute", fields: [
        { top: 58, left: 155, width: 150, name: "btnA", type: "button", title: "a", click: function(){ alert("a");} },
        { top: 58, left: 310, width: 90, name: "btnB", type: "button", title: "b", click: function(){ alert("b");} },
        { top: 58, left: 405, width: 90, name: "btnC", type: "button", title: "c", click: function(){ alert("c");} },
        { top: 58, left: 500, width: 150, name: "btnD", type: "button", title: "d", click: function(){ alert("d");} }
      ]
    });
 
 v.addMembers([f]);

</script>
</body>
</html>

Deploy to GAE problem

$
0
0
Isomorphic SmartClient/SmartGWT Framework (v10.0p_2015-08-14/Pro Deployment 2015-08-14)

i following this guide
https://isomorphic.atlassian.net/wiki/display/Main/Google+App+Engine

Compiling module jpac.main.MainEntry
Compiling 5 permutations
Compiling permutation 0...
Compiling permutation 1...
Compiling permutation 2...
Compiling permutation 3...
Compiling permutation 4...
Compile of permutations succeeded
Linking into C:\Users\Admin\workspace\MainEntry\war\mainentry
Link succeeded
Compilation succeeded -- 51.748s

------------ Deploying frontend ------------

Preparing to deploy:
Created staging directory at: 'C:\Users\ADMINI~1\AppData\Local\Temp\appcfg8754787957882650754.tmp'
Scanning for jsp files.
Compiling jsp files.
com.google.appengine.tools.admin.JspCompilationException: Failed to compile the generated JSP java files.
Aug 16, 2015 4:30:42 PM org.apache.jasper.JspC processFile
INFO: Built File: \mainentry\tools\adminConsole.jsp
Aug 16, 2015 4:30:42 PM org.apache.jasper.JspC processFile
INFO: Built File: \mainentry\tools\adminConsoleOperations.jsp
Aug 16, 2015 4:30:43 PM org.apache.jasper.JspC processFile
INFO: Built File: \mainentry\tools\batchDSGeneratorOperations.jsp
Aug 16, 2015 4:30:43 PM org.apache.jasper.JspC processFile
INFO: Built File: \mainentry\tools\bmmlImporter.jsp
Aug 16, 2015 4:30:43 PM org.apache.jasper.JspC processFile
INFO: Built File: \mainentry\tools\bmmlImporterOperations.jsp
Aug 16, 2015 4:30:43 PM org.apache.jasper.JspC processFile
INFO: Built File: \mainentry\tools\classBrowser.jsp
Aug 16, 2015 4:30:43 PM org.apache.jasper.JspC processFile
INFO: Built File: \mainentry\tools\configViewer.jsp
Aug 16, 2015 4:30:43 PM org.apache.jasper.JspC processFile
INFO: Built File: \mainentry\tools\datasourceImporter.jsp
Aug 16, 2015 4:30:43 PM org.apache.jasper.JspC processFile
INFO: Built File: \mainentry\tools\developerConsoleOperations.jsp
Aug 16, 2015 4:30:43 PM org.apache.jasper.JspC processFile
INFO: Built File: \mainentry\tools\dsBrowser.jsp
Aug 16, 2015 4:30:43 PM org.apache.jasper.JspC processFile
INFO: Built File: \mainentry\tools\serverLogViewer.jsp
Aug 16, 2015 4:30:43 PM org.apache.jasper.JspC processFile
INFO: Built File: \mainentry\tools\sqlBrowser.jsp
Aug 16, 2015 4:30:43 PM org.apache.jasper.JspC processFile
INFO: Built File: \mainentry\tools\visualBuilder\index.jsp
Aug 16, 2015 4:30:43 PM org.apache.jasper.JspC processFile
INFO: Built File: \mainentry\tools\visualBuilder\smartMockups.jsp
Aug 16, 2015 4:30:43 PM org.apache.jasper.JspC processFile
INFO: Built File: \mainentry\tools\visualBuilder\vbOperations.jsp
Aug 16, 2015 4:30:43 PM org.apache.jasper.JspC processFile
INFO: Built File: \mainentry\tools\visualBuilder\view.jsp


any help ?

Attached Files
File Type: xml appengine-web.xml (1.4 KB)
File Type: xml web.xml (6.5 KB)

TextItem.setSelectOnClick(Boolean selectOnClick) is not working on SmartGWT 5

$
0
0
Hi,

The following code worked on SmartGWT 4 (build 2013-07-07 LGPL), but on SmartGWT 5 (build 2015-08-13) setSelectOnClick doesn't seem to have any effect on text items.

Code:

package com.smartgwt.sample.showcase.client.forms;

import com.smartgwt.client.util.SC;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.ButtonItem;
import com.smartgwt.client.widgets.form.fields.TextItem;
import com.smartgwt.client.widgets.form.fields.events.ClickEvent;
import com.smartgwt.client.widgets.form.fields.events.ClickHandler;
import com.smartgwt.sample.showcase.client.PanelFactory;
import com.smartgwt.sample.showcase.client.ShowcasePanel;

public class FormFocusFirstSample extends ShowcasePanel {
    private static final String DESCRIPTION = "<p>Setting the focus / cursor on the first field of a form is common requirement. Doing this in Smart GWT is as simple as setting <code>form.setAutoFocus(true)</code>.</p>" +
            "<p>This sample also has <code>setSelectOnFocus(true)</code> on the first field.</p>";

    public static class Factory implements PanelFactory {
        private String id;

        public ShowcasePanel create() {
            FormFocusFirstSample panel = new FormFocusFirstSample();
            id = panel.getID();
            return panel;
        }

        public String getID() {
            return id;
        }

        public String getDescription() {
            return DESCRIPTION;
        }
    }

    public Canvas getViewPanel() {

        final DynamicForm form = new DynamicForm();
        form.setAutoFocus(true);
        form.setNumCols(3);
        form.setWidth(300);

        TextItem firstName = new TextItem("fName");
        firstName.setTitle("First Name");
        firstName.setSelectOnFocus(true);
        firstName.setSelectOnClick(true); //Doesn't work anymore on SmartGWT 5
        firstName.setWrapTitle(false);
        firstName.setDefaultValue("[First Name]");

        TextItem lastName = new TextItem("lName");
        lastName.setTitle("Last Name");
        lastName.setDefaultValue("[Last Name]");
        lastName.setWrapTitle(false);

        ButtonItem button = new ButtonItem("hello", "Hello");
        button.setStartRow(false);
        button.setWidth(80);
        button.setIcon("icons/16/message.png");
        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                SC.say("Hello " + form.getValueAsString("fName") + " " + form.getValueAsString("lName"));
            }
        });

        form.setFields(firstName, lastName, button);

        return form;
    }

    public String getIntro() {
        return DESCRIPTION;
    }
}

Recommended gwt version for SmartGWT 5?

$
0
0
Hi,

For our app we currently use gwt 2.4 & smartgwt 4, but we do want to update to smartgwt 5. The issue is what gwt version to use? From our tests all newer versions (2.5/2.6/2.7) seem to be slower than 2.4 (especially 2.5).

Difference between ListGridField and DataSourceField

$
0
0
SmartClient Version: v10.0p_2015-06-10/PowerEdition Deployment (built 2015-06-10)

Browser Version : IE 11.0.9600.17843

What is the main difference between ListGridField and DataSourceField where I want to use the DataSource only for ListGrid. Because I knew if I use DS Field I cant change the no of fields dynamically in DataSource, but creating the ListGridField with same name in ds.xml will solve the problem, ie display only those fields in the ListGrid. So please help me to understand the difference between ListGridField and DataSourceField.

bug: grid.transferSelectedData doesn't call recordDropHandler

$
0
0
Hello

It's not possible to implement solution from this thread http://forums.smartclient.com/showthread.php?t=24237 because listGrid.transferSelectedData doesn't call recordDropHandler.

SmartClient Version: v10.0p_2015-06-28/LGPL Development Only (built 2015-06-28)

IE11

Attached Files
File Type: java Test.java (5.1 KB)

Server Side | Velocity Param | WhereClause Bug

$
0
0
1. Version: smartGWT Power Edition 4.1-p20150224
2. all Browsers
3. Problem definition: Bug in WhereClause of Server side

The velocity Variables are not set Correctly in whereClause:

The velocity Variable are set as String in the whereClause. They are not converted tho the correct time format or to the correct local time.


a. The whereClause is this

<whereClause>
<![CDATA[
ARC_ALARM.VARIABLE_NAME = ARC_ALARM_VAR.VARIABLENAME
AND (
ARC_ALARM.TSBEGIN
BETWEEN $advancedCriteria.TSFROM AND $advancedCriteria.TSTO
OR
ARC_ALARM.TSEND
BETWEEN
$advancedCriteria.TSFROM AND $advancedCriteria.TSTO
OR (ARC_ALARM.TSBEGIN < $advancedCriteria.TSFROM AND ARC_ALARM.TSEND > $advancedCriteria.TSTO ))
AND ARC_ALARM.ACTIVE=0
AND ($defaultWhereClause)
]]>
</whereClause>

b. it send following Query to the database and Cause Sql Error due to wrong date Format:

WHERE
(
ARC_ALARM.VARIABLE_NAME = ARC_ALARM_VAR.VARIABLENAME
AND (
ARC_ALARM.TSBEGIN
BETWEEN '2015-08-06T10:59:00.000' AND '2015-08-11T10:59:14.574'
OR
ARC_ALARM.TSEND
BETWEEN
'2015-08-06T10:59:00.000' AND '2015-08-11T10:59:14.574'
OR (ARC_ALARM.TSBEGIN > '2015-08-06T10:59:00.000' AND ARC_ALARM.TSEND < '2015-08-11T10:59:14.574')
)
AND ARC_ALARM.ACTIVE=0
)
AND (((ARC_ALARM_VAR.MESSAGEGROUP = 'FM' AND ARC_ALARM_VAR.MESSAGEGROUP IS NOT NULL)))


c. The Date should be normaly like this and its work every where else in the Query but not in the WhereClause
TO_DATE('2015-08-06 12:59:00', 'YYYY-MM-DD HH24:MI:SS')

d. on the client side work everythings correct. I need the part in Server side to create PDF Report using "Jsasper Report"

f. here is the Datasource


<DataSource
ID="alarm_top_ten_range"
serverType="sql"
tableName="ARC_ALARM"
qualifyColumnNames="false">
<!-- requiresAuthentication="true" -->
<fields>
<field name="CNT" type="integer" customSelectExpression="count(*)" />
<field name="SUM" type="text" customSelectExpression="regexp_substr(numtodsinterval(sum((sysdate + (TSEND - TSBEGIN)) - sysdate),'day'), '\d{3} \d{2}:\d{2}:\d{2}\')" />
<field name="AVG" type="text" customSelectExpression="regexp_substr(numtodsinterval(avg(($currentDate + (TSEND - TSBEGIN)) - $currentDate),'day'), '\d{3} \d{2}:\d{2}:\d{2}\')" />
<field name="MIN" type="text" customSelectExpression="regexp_substr(numtodsinterval(min(($currentDate + (TSEND - TSBEGIN)) - $currentDate),'day'), '\d{3} \d{2}:\d{2}:\d{2}\')" />
<field name="MAX" type="text" customSelectExpression="regexp_substr(numtodsinterval(max(($currentDate + (TSEND - TSBEGIN)) - $currentDate),'day'), '\d{3} \d{2}:\d{2}:\d{2}\')" />
<field name="TEXT" type="text" tableName="DIC_TRANSLATIONS_MT" customSelectExpression="REPLACE(DIC_TRANSLATIONS_MT.TEXT,'%f1',P1)" nativeName="TEXT"/>
<field name="MESSAGETYPE" type="text" tableName="ARC_ALARM_VAR" />
<field name="ISWARNING" type="integer" tableName="ARC_ALARM_VAR" />
<field name="MESSAGEGROUP" type="text" tableName="ARC_ALARM_VAR" />
<field name="PAD" type="text" tableName="ARC_ALARM_VAR" />
<field name="PADNAME" type="text" tableName="DIC_TRANSLATIONS_PAD" nativeName="DIC_TRANSLATIONS_PAD.TEXT" />
<field name="ESTOPAREA" type="text" tableName="ARC_ALARM_VAR" />
<field name="PANELAREA" type="text" tableName="ARC_ALARM_VAR" />
<field name="CONSOLEAREA" type="text" tableName="ARC_ALARM_VAR" />
<field name="FUNCTIONGROUP" type="text" tableName="ARC_ALARM_VAR" />
<field name="FUNCTIONGROUPDESCRIPTION" type="text" tableName="DIC_TRANSLATIONS_FGD" nativeName="DIC_TRANSLATIONS_FGD.TEXT"/>
<field name="DEVICE" type="text" tableName="ARC_ALARM_VAR" />
<field name="DEVICEDESCRIPTION" type="text" tableName="DIC_TRANSLATIONS_DD" nativeName="DIC_TRANSLATIONS_DD.TEXT"/>
<field name="VARIABLE_NAME" type="text" tableName="ARC_ALARM"/>
<field name="ADDRESS" type="text" tableName="ARC_ALARM_VAR" />
<field name="INTERVALBEGIN_ID" type="integer" customSelectExpression="min(INTERVALBEGIN_ID)"/>
<field name="INTERVALEND_ID" type="integer" customSelectExpression="max(INTERVALEND_ID)"/>
<field name="TSFIRSTBEGIN" type="datetime" customSelectExpression="min(TSBEGIN)" />
<field name="TSLASTEND" type="datetime" customSelectExpression="max(TSEND)" />
<field name="TSFROM" type="datetime" customSQL="true" />
<field name="TSTO" type="datetime" customSQL="true" />
</fields>

<operationBindings>
<operationBinding operationType="fetch">
<tableClause>
ARC_ALARM, ARC_ALARM_VAR
LEFT JOIN (SELECT * FROM DIC_TRANSLATIONS WHERE DIC_TRANSLATIONS.LANGUAGE = ($session.locale.language)) DIC_TRANSLATIONS_MT
ON (ARC_ALARM_VAR.MESSAGETEXT_GROUPID = DIC_TRANSLATIONS_MT.GROUPID AND ARC_ALARM_VAR.MESSAGETEXT = DIC_TRANSLATIONS_MT.TEXTID)
LEFT JOIN (SELECT * FROM DIC_TRANSLATIONS WHERE DIC_TRANSLATIONS.LANGUAGE = ($session.locale.language)) DIC_TRANSLATIONS_FGD
ON (ARC_ALARM_VAR.FGDESCRIPTION_GROUPID = DIC_TRANSLATIONS_FGD.GROUPID AND ARC_ALARM_VAR.FUNCTIONGROUPDESCRIPTION = DIC_TRANSLATIONS_FGD.TEXTID)
LEFT JOIN (SELECT * FROM DIC_TRANSLATIONS WHERE DIC_TRANSLATIONS.LANGUAGE = ($session.locale.language)) DIC_TRANSLATIONS_PAD
ON (ARC_ALARM_VAR.PADNAME_GROUPID = DIC_TRANSLATIONS_PAD.GROUPID AND ARC_ALARM_VAR.PADNAME = DIC_TRANSLATIONS_PAD.TEXTID)
LEFT JOIN (SELECT * FROM DIC_TRANSLATIONS WHERE DIC_TRANSLATIONS.LANGUAGE = ($session.locale.language)) DIC_TRANSLATIONS_DD
ON (ARC_ALARM_VAR.DEVICEDESCRIPTIONGROUPID = DIC_TRANSLATIONS_DD.GROUPID AND ARC_ALARM_VAR.DEVICEDESCRIPTION = DIC_TRANSLATIONS_DD.TEXTID)
</tableClause>
<whereClause>
<![CDATA[
ARC_ALARM.VARIABLE_NAME = ARC_ALARM_VAR.VARIABLENAME AND (ARC_ALARM.TSBEGIN BETWEEN $advancedCriteria.TSFROM AND $advancedCriteria.TSTO OR ARC_ALARM.TSEND BETWEEN $advancedCriteria.TSFROM AND $advancedCriteria.TSTO OR (ARC_ALARM.TSBEGIN < $advancedCriteria.TSFROM AND ARC_ALARM.TSEND > $advancedCriteria.TSTO )) AND ARC_ALARM.ACTIVE=0 AND ($defaultWhereClause)
]]>
</whereClause>
<groupClause>
REPLACE(DIC_TRANSLATIONS_MT.TEXT,'%f1',P1), MESSAGETEXT, MESSAGETYPE, ISWARNING, MESSAGEGROUP, PAD, DIC_TRANSLATIONS_PAD.TEXT, ESTOPAREA, PANELAREA, CONSOLEAREA, FUNCTIONGROUP, DIC_TRANSLATIONS_FGD.TEXT, DEVICE, DIC_TRANSLATIONS_DD.TEXT, ARC_ALARM.VARIABLE_NAME, ADDRESS
</groupClause>
</operationBinding>
</operationBindings>
</DataSource>

6. here the sql send to databse causing Oracle Error due to wrong Date Format

SELECT count(*) AS CNT, regexp_substr(numtodsinterval(sum((sysdate + (TSEND - TSBEGIN)) - sysdate),'day'), '\d{3} \d{2}:\d{2}:\d{2}\') AS SUM, regexp_substr(numtodsinterval(avg((TO_DATE('2015-08-11 12:59:30','YYYY-MM-DD HH24:MI:SS') + (TSEND - TSBEGIN)) - TO_DATE('2015-08-11 12:59:30','YYYY-MM-DD HH24:MI:SS')),'day'), '\d{3} \d{2}:\d{2}:\d{2}\') AS AVG, regexp_substr(numtodsinterval(min((TO_DATE('2015-08-11 12:59:30','YYYY-MM-DD HH24:MI:SS') + (TSEND - TSBEGIN)) - TO_DATE('2015-08-11 12:59:30','YYYY-MM-DD HH24:MI:SS')),'day'), '\d{3} \d{2}:\d{2}:\d{2}\') AS MIN, regexp_substr(numtodsinterval(max((TO_DATE('2015-08-11 12:59:30','YYYY-MM-DD HH24:MI:SS') + (TSEND - TSBEGIN)) - TO_DATE('2015-08-11 12:59:30','YYYY-MM-DD HH24:MI:SS')),'day'), '\d{3} \d{2}:\d{2}:\d{2}\') AS MAX, REPLACE(DIC_TRANSLATIONS_MT.TEXT,'%f1',P1) AS TEXT, MESSAGETYPE, , DIC_TRANSLATIONS_FGD.TEXT AS FUNCTIONGROUPDESCRIPTION, DEVICE, DIC_TRANSLATIONS_DD.TEXT AS DEVICEDESCRIPTION, VARIABLE_NAME, ADDRESS, min(INTERVALBEGIN_ID) AS INTERVALBEGIN_ID, max(INTERVALEND_ID) AS INTERVALEND_ID, min(TSBEGIN) AS TSFIRSTBEGIN, max(TSEND) AS TSLASTEND FROM
ARC_ALARM, ARC_ALARM_VAR
LEFT JOIN (SELECT * FROM DIC_TRANSLATIONS WHERE DIC_TRANSLATIONS.LANGUAGE = ('de')) DIC_TRANSLATIONS_MT
ON (ARC_ALARM_VAR.MESSAGETEXT_GROUPID = DIC_TRANSLATIONS_MT.GROUPID AND ARC_ALARM_VAR.MESSAGETEXT = DIC_TRANSLATIONS_MT.TEXTID)
LEFT JOIN (SELECT * FROM DIC_TRANSLATIONS WHERE DIC_TRANSLATIONS.LANGUAGE = ('de')) DIC_TRANSLATIONS_FGD
ON (ARC_ALARM_VAR.FGDESCRIPTION_GROUPID = DIC_TRANSLATIONS_FGD.GROUPID AND ARC_ALARM_VAR.FUNCTIONGROUPDESCRIPTION = DIC_TRANSLATIONS_FGD.TEXTID)
LEFT JOIN (SELECT * FROM DIC_TRANSLATIONS WHERE DIC_TRANSLATIONS.LANGUAGE = ('de')) DIC_TRANSLATIONS_PAD
ON (ARC_ALARM_VAR.PADNAME_GROUPID = DIC_TRANSLATIONS_PAD.GROUPID AND ARC_ALARM_VAR.PADNAME = DIC_TRANSLATIONS_PAD.TEXTID)
LEFT JOIN (SELECT * FROM DIC_TRANSLATIONS WHERE DIC_TRANSLATIONS.LANGUAGE = ('de')) DIC_TRANSLATIONS_DD
ON (ARC_ALARM_VAR.DEVICEDESCRIPTIONGROUPID = DIC_TRANSLATIONS_DD.GROUPID AND ARC_ALARM_VAR.DEVICEDESCRIPTION = DIC_TRANSLATIONS_DD.TEXTID)
WHERE
(
ARC_ALARM.VARIABLE_NAME = ARC_ALARM_VAR.VARIABLENAME
AND (
ARC_ALARM.TSBEGIN
BETWEEN '2015-08-06T10:59:00.000' AND '2015-08-11T10:59:14.574'
OR
ARC_ALARM.TSEND
BETWEEN
'2015-08-06T10:59:00.000' AND '2015-08-11T10:59:14.574'
OR (ARC_ALARM.TSBEGIN > '2015-08-06T10:59:00.000' AND ARC_ALARM.TSEND < '2015-08-11T10:59:14.574')
)
AND ARC_ALARM.ACTIVE=0
)
AND (((ARC_ALARM_VAR.MESSAGEGROUP = 'FM' AND ARC_ALARM_VAR.MESSAGEGROUP IS NOT NULL)))
Viewing all 4756 articles
Browse latest View live