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

DataSource update is firing without calling it

$
0
0
Hi there,

I have a issue facing a datasource update which is called without a manual sender.

In my case i have a TreeGrid on the left and a Layout with a Listgrid on the right side. The ListGrid on the right side has a Datasource and can be edited by the user. The TreeGrid on the left is like a navigation. After editing something in the ListGrid the user will be asked if he wants to save the recent changes. The ListGrid/Datasource of the ListGrid also handles the save/update of any items in the ListGrid. This update is fired if the user hits enter or presses a button on the right side named "save" by calling the endEditing on the listgrid.

The problem starts that, the update/save event of the datasource is called without interaction on the ListGrid. If the user edits a element in the ListGrid and the editor-component of the field stays open the user can switch the menu on the left. With the event of the click on the TreeGrid, the information that there are some pending changes on the ListGrid are made is transfered to the server, so the user will get asked if he wants to save the changes. This we are displaying in an Ask-Box like "isc.ask("Do you want to save");". In the background i can see, the pending changes (the formItem is still visible), but in the console i can see, that the update of the datasource is called.

So neither the user ends the entry with enter nor does the server calls something like endEditing to the Listgrid. I have tried to reproduce this issue in a stand-alone page, but it wasn't possible.
I have generated a log from the console and can point to the line where this request of the datasource is started. Because the debug-log is quite large i couldn't upload it here so i have put it here: http://pastebin.com/AFnmhadW
The change is detected in line 6336 and after this the update begins and therefore it's redirected to the datasource update.

Could you give me any advice, why the datasource update is fired? I think without endEditing the current edit in the listgrid the update should not be fired.
i'm currently working on SmartClient_v100p_2015-01-13_Pro and this hapens in all browsers

Cannot edit filter field after setting a values map

$
0
0
v8.3_2012_11_20/LGPL Development Only (built 2012-11-20) on Firefox 26.0

After I add a values map to a ListGridField, I can no longer edit the filter field

Code:

public void provisionFilter(ListGridField field) {
    String[] filters = {"A","B","C","D"};
    field.setValueMap(filters);
    field.setCanEdit(true);
    field.setCanFilter(true);
}

I get the drop down list on the field allowing me to select a value, but I cannot edit the value in the filter textbox which I need to be able to do so users can add things like '!' to the selected filter value or build their own filter. Filters which are not given pre-defined values can be edited.


Posts with incomplete information are much more likely to be ignored.

Vertical scrollbar in calendar month view

$
0
0
Hi,

Using SGWT Power 5.0

In showcase, in a calendar, month view, when a day cell contains more time entries that can be displayed, +1 more ... is displayed for entries that can't be displayed. If one needs to edit these hidden entries, there is no link for that, so it makes those entries inaccessible. Is it possible to replace this behaviour by simply showing a vertical scrollbar on the cell when needed ?

Thanks, Ben.

this.getScreen() is unavailable.

$
0
0
Hi,
I want to load a xml file using RPCManager.loadScreen. But the problem is when I write layout.addChild(this.getScreen()); within execute method, it gives me error.
Can anyone please suggest where i am wrong, Am I missing something.
My source code is.

final Canvas layout = new Canvas();
try{
RPCManager.loadScreen("testXml", new LoadScreenCallback() {

@Override
public void execute() {
layout.addChild(this.getScreen());
}
});
}catch (Exception e) {
e.printStackTrace();
}
//layout.draw();

Tab tab= new Tab();
tab.setPane(layout);
tab.setTitle("XML LOAD");
getEntryprog().tabSet.add(tab);
tab.setCanClose(true);
getEntryprog().programTabSet.addTab(tab);
getEntryprog().programTabSet.selectTab(tab);

My ui.xml is in /webRoot/Shared/ui and code is:

<VLayout xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" ID="componentsLayout" autoDraw="true">
<members>
<DynamicForm ID="saveForm" autoDraw="false" width="300" titleWidth="100" >
<items>
<item name="cboItem" type="selectitem" defaultValue="Form" width="100"/>
<item name="txtQuantity" type="text" title="Quantity" width="100"/>
<item name="txtItem" type="text" title="Item" />
<item name="txtItem1" type="text" title="Item" />
</items>
</DynamicForm>
</members>
</VLayout>


Please help.

I am using
SmartClient Version: v8.3_2012-11-20/PowerEdition Deployment (built 2012-11-20)

Firefox 25, Chrome 39.0.2171.95 m

Jsni, html & js

$
0
0
Hello,

i got a task to make a canvas on witch it is possible to write, draw, erase etc. (something like paint).

I done it in JS and HTML

syntax like this:

<html>
<canvas>....
<input>..
<script>
.
.
.
</script>
</html>

...how can i recreate this in smart gwt application? This html and js should be called on button click in application, so adding js to gwt.xml is a bit problem if its loaded on start of application, if using JSNI where can i create that HTML canvas and get his id in JSNI method. Without using app.html.

I try to use String getInnerHTML() and return <canvas> but i cant get his id, nor id-s of input elements.
Regards, Jakov.
SmartClient Version: v10.0p_2014-10-22/Enterprise Deployment (built 2014-10-22)

Trouble with record selection when refreshing a listgrid with progressive loading

$
0
0
Hi Isomorphic,

I use the Isomorphic SmartClient/SmartGWT Framework (v9.1p_2014-07-03/PowerEdition Deployment 2014-07-03) version.

I've got a trouble with the record selection and the refresh of a listgrid wiht progressiveloading.

When you scroll down into the bottom of the listgrid and than you call the method invalidateCache(). The data are refreshed but you loose the fact that you were a the bottom of the list.

Is there a way to avoid that, and to refresh and stay at the same place that you were before refreshing.

And is there a way to keep the record selected after the refresh?

Regards
Ju

CanvasMetaBeanFactoryGenerator Bug

$
0
0
Hi, I'm using CanvasMetaFactory as described in the docs and I'm getting GWT compilation error when the CanvasMetaBeanFactoryGenerator tries to generate BeanFactory for class
[CODE]com.smartgwt.client.widgets.drawing.DrawKnob[CODE]. The offending property is 'setX()' and the CanvasMetaBeanFactoryGenerator produces the following StackTrace
Code:

[ERROR] Generator 'com.smartgwt.rebind.CanvasMetaBeanFactoryGenerator' threw an exception while rebinding 'com.smartgwt.client.bean.BeanFactory.CanvasMetaFactory'
java.lang.StringIndexOutOfBoundsException: String index out of range: 1
        at java.lang.String.charAt(String.java:658)
        at com.smartgwt.rebind.BeanMethod.recapitalize(BeanMethod.java:142)
        at com.smartgwt.rebind.BeanMethod.<init>(BeanMethod.java:161)
        at com.smartgwt.rebind.BeanClass.<init>(BeanClass.java:122)
        at com.smartgwt.rebind.CanvasMetaBeanFactoryGenerator.generate(CanvasMetaBeanFactoryGenerator.java:57)
        at com.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40)
        at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:676)
        at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
        at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:79)
        at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:276)
        at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:265)
        at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:91)
        at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleGwtCreate(UnifyAst.java:387)
        at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.handleMagicMethodCall(UnifyAst.java:465)
        at com.google.gwt.dev.jjs.impl.UnifyAst$UnifyVisitor.endVisit(UnifyAst.java:255)
        at com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:244)
        at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
        at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
        at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
        at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:117)
        at com.google.gwt.dev.jjs.ast.JExpressionStatement.traverse(JExpressionStatement.java:41)
        at com.google.gwt.dev.jjs.ast.JModVisitor$ListContextImmutable.traverse(JModVisitor.java:170)
        at com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemoveImmutable(JModVisitor.java:336)
        at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:83)
        at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
        at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
        at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:138)
        at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:134)
        at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:82)
        at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
        at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
        at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
        at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:449)
        at com.google.gwt.dev.jjs.ast.JConstructor.traverse(JConstructor.java:129)
        at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
        at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
        at com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
        at com.google.gwt.dev.jjs.impl.UnifyAst.mainLoop(UnifyAst.java:940)
        at com.google.gwt.dev.jjs.impl.UnifyAst.exec(UnifyAst.java:665)
        at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:672)
        at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:34)
        at com.google.gwt.dev.Precompile.precompile(Precompile.java:271)
        at com.google.gwt.dev.Precompile.precompile(Precompile.java:223)
        at com.google.gwt.dev.Precompile.precompile(Precompile.java:139)
        at com.google.gwt.dev.Compiler.run(Compiler.java:167)
        at com.google.gwt.dev.codeserver.Recompiler.compile(Recompiler.java:115)
        at com.google.gwt.dev.codeserver.ModuleState.<init>(ModuleState.java:58)
        at com.google.gwt.dev.codeserver.CodeServer.makeModules(CodeServer.java:120)
        at com.google.gwt.dev.codeserver.CodeServer.start(CodeServer.java:95)
        at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:71)
        at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:49)


I'm using the CanvasMetaFactory as described in the docs:
Code:

final String className = configureWidget(wrappedWidgetConfig);
GWT.create(BeanFactory.CanvasMetaFactory.class);
wrappedWidget = (Canvas) BeanFactory.newInstance(className, wrappedWidgetConfig);

I'using the latest nightly build SmartGwt LGPL 5.0p downloaded today (15/01/15). My GWT version is 2.6.0.

FilterBuilder with Custom (Reflection) FormItem and ValidOperators Bug

$
0
0
Hi there, i'm trying to use a FilterBuilder with supplied FilterItem datasource. The datasource defines the fields that should be filtered. The field definitions use custom FormItems as editor types.

Code:

final DataSourceField net_UserDomainField = DSFieldFactory.makeField(FieldType.TEXT, PROP_NET_USERDOMAIN,
                                false, false, true);
net_UserDomainField.setValidOperators(OperatorId.EQUALS, OperatorId.REGEXP, OperatorId.IS_NULL, OperatorId.NOT_EQUAL, OperatorId.NOT_NULL);
//net_UserDomainField.setReadOnlyEditorType(UserDomainFormItem.class);
net_UserDomainField.setEditorType(UserDomainFormItem.class);
addField(net_UserDomainField);

When the FilterBuilder is created, an error is thrown. After some debugging I found that the validOperators-Property is causing problems in the bean factory. In fact, the framework tries to create an OperatorId from its string representation ('isNull' in this case) and fails because there is no matching constant defined (it is actually called 'IS_NULL').
Code:

IS_NULL("isNull")
Code:

Thu Jan 15 16:40:32 GMT+100 2015 CustomLogger
SEVERE: Exception occurred: Could not set property de.inneo.gt.conf.client.smartcore.editor.formitem.UserDomainFormItem.validOperators given value of type [Ljava.lang.Object;
SuperDevModeLogger.java:71 Exception occurred:
SuperDevModeLogger.java:75 java.lang.IllegalArgumentException: Could not set property de.inneo.gt.conf.client.smartcore.editor.formitem.UserDomainFormItem.validOperators given value of type [Ljava.lang.Object;
  at createStackTrace
  at fillInStackTrace_2
  at fillInStackTrace_0
  at fillInStackTrace
  at Throwable_2
  at Exception_2
  at RuntimeException_2
  at IllegalArgumentException_2
  at $setProperty_1
  at $doSetProperty
  at $doSetProperty
  at $doSetProperty
  at $doSetProperties
  at setProperties
  at $applyFactoryProperties_1
  at $applyFactoryProperties_0
  at applyFactoryProperties_0
  at $newInstance_1
  at $newInstance_0
  at newInstance_0
  at apply_0
  at entry0
  at newInstance
  at isc.SGWTFactory.addProperties.create
  at isc.DynamicForm.addMethods.createItem
  at isc.Class.addClassMethods.invokeSuper
  at isc.SearchForm.addMethods.createItem
  at isc.DynamicForm.addMethods._addItems
  at isc.DynamicForm.addMethods.setItems
  at isc.DynamicForm.addMethods.initWidget
  at isc.Canvas.addMethods.init
  at isc.Class.addMethods.completeCreation
  at isc.Class.addClassMethods.create
  at isc.FilterBuilder.addClassMethods.getDefaultEditorType
  at isc.FilterBuilder.addProperties.getEditorType
  at isc.FilterClause.addMethods.getEditorType
  at isc.FilterClause.addMethods.buildValueItemList
  at isc.FilterClause.addMethods.setupClause
  at isc.FilterClause.addMethods.initWidget
  at isc.Canvas.addMethods.init
  at isc.Class.addMethods.createAutoChild
  at isc.FilterBuilder.addProperties.addNewClause
  at isc.FilterBuilder.addProperties._setCriteria
  at isc.FilterBuilder.addProperties._createForm
  at isc.FilterBuilder.addProperties.rebuild
  at isc.FilterBuilder.addProperties.initWidget
  at isc.Canvas.addMethods.init
  at isc.Class.addMethods.completeCreation
  at isc.Class.addClassMethods.create
  at create_145
  at $getOrCreateJsObj_0
  at getOrCreateJsObj_5
  at $setCanvas
  at onInit_17
  at <anonymous>
  at apply_0
  at entry0
  at onInit
  at isc.FormItem.addMethods.init
  at isc.Class.addClassMethods.invokeSuper
  at isc.Class.addClassMethods.Super
  at isc.CanvasItem.addMethods.init
  at isc.Class.addMethods.completeCreation
  at isc.DynamicForm.addMethods.createItem
  at isc.DynamicForm.addMethods._addItems
  at isc.DynamicForm.addMethods.setItems
  at isc.DynamicForm.addMethods.initWidget
  at isc.Canvas.addMethods.init
  at isc.Class.addMethods.completeCreation
  at isc.Class.addClassMethods.create
  at create_143
  at $getOrCreateJsObj_0
  at getOrCreateJsObj_5
  at $addMember
  at addMember_5
  at $addMember_5
  at FilterEditorFormContainer_0
  at FilterItemPage_0
  at LibItemPropertiesContainer$4_0
  at $createPropertiesPage
  at createCardforKey_1
  at $activateCard_0
  at $fireContainerFetch_1
  at onSelectionChanged_6
  at onSelectionChanged_1
  at $dispatch_36
  at dispatch_38
  at dispatch
  at dispatchEvent_0
  at $doFire
  at $fireEvent_0
  at $fireEvent
  at $fireEvent_1
  at fireEvent_2
  at <anonymous>
  at apply_0
  at entry0
  at selectionChanged
  at isc.TileGrid.addProperties.selectionChange
  at isc.Selection.addMethods.setSelected
  at isc.Selection.addMethods.selectList
  at isc.Canvas.addProperties.selectRecords
  at isc.Canvas.addProperties.selectRecord
  at $selectRecord
  at $selectIndex
  at $selectFirst
  at $selectIndexFromConfig
  at $selectItemFromConfig
  at onDataArrived_1
  at $dispatch_32
  at dispatch_34
  at dispatch
  at dispatchEvent_0
  at $doFire
  at $fireEvent_0
  at $fireEvent
  at $fireEvent_1
  at fireEvent_2
  at <anonymous>
  at apply_0
  at entry0
  at dataArrived
  at eval
  at thunk
  at observation
Caused by: java.lang.IllegalArgumentException: Enum constant undefined: isNull
  at createStackTrace
  at fillInStackTrace_2
  at fillInStackTrace_0
  at fillInStackTrace
  at Throwable_1
  at Exception_1
  at RuntimeException_1
  at IllegalArgumentException_1
  at valueOf
  at valueOf_53
  at invokeValueOf
  at valueOf_0
  at $convertFrom_8
  at convertFrom_15
  at $convertFrom_16
  at convertFrom_24
  at convertFrom_0
  at $setProperty_0
  at $setProperty_1
  at $doSetProperty
  at $doSetProperty
  at $doSetProperty
  at $doSetProperties
  at setProperties
  at $applyFactoryProperties_1
  at $applyFactoryProperties_0
  at applyFactoryProperties_0
  at $newInstance_1
  at $newInstance_0
  at newInstance_0
  at apply_0
  at entry0
  at newInstance
  at isc.SGWTFactory.addProperties.create
  at isc.DynamicForm.addMethods.createItem
  at isc.Class.addClassMethods.invokeSuper
  at isc.SearchForm.addMethods.createItem
  at isc.DynamicForm.addMethods._addItems
  at isc.DynamicForm.addMethods.setItems
  at isc.DynamicForm.addMethods.initWidget
  at isc.Canvas.addMethods.init
  at isc.Class.addMethods.completeCreation
  at isc.Class.addClassMethods.create
  at isc.FilterBuilder.addClassMethods.getDefaultEditorType
  at isc.FilterBuilder.addProperties.getEditorType
  at isc.FilterClause.addMethods.getEditorType
  at isc.FilterClause.addMethods.buildValueItemList
  at isc.FilterClause.addMethods.setupClause
  at isc.FilterClause.addMethods.initWidget
  at isc.Canvas.addMethods.init
  at isc.Class.addMethods.createAutoChild
  at isc.FilterBuilder.addProperties.addNewClause
  at isc.FilterBuilder.addProperties._setCriteria
  at isc.FilterBuilder.addProperties._createForm
  at isc.FilterBuilder.addProperties.rebuild
  at isc.FilterBuilder.addProperties.initWidget
  at isc.Canvas.addMethods.init
  at isc.Class.addMethods.completeCreation
  at isc.Class.addClassMethods.create
  at create_145
  at $getOrCreateJsObj_0
  at getOrCreateJsObj_5
  at $setCanvas
  at onInit_17
  at <anonymous>
  at apply_0
  at entry0
  at onInit
  at isc.FormItem.addMethods.init
  at isc.Class.addClassMethods.invokeSuper
  at isc.Class.addClassMethods.Super
  at isc.CanvasItem.addMethods.init
  at isc.Class.addMethods.completeCreation
  at isc.DynamicForm.addMethods.createItem
  at isc.DynamicForm.addMethods._addItems
  at isc.DynamicForm.addMethods.setItems
  at isc.DynamicForm.addMethods.initWidget
  at isc.Canvas.addMethods.init
  at isc.Class.addMethods.completeCreation
  at isc.Class.addClassMethods.create
  at create_143
  at $getOrCreateJsObj_0
  at getOrCreateJsObj_5
  at $addMember
  at addMember_5
  at $addMember_5
  at FilterEditorFormContainer_0
  at FilterItemPage_0
  at LibItemPropertiesContainer$4_0
  at $createPropertiesPage
  at createCardforKey_1
  at $activateCard_0
  at $fireContainerFetch_1
  at onSelectionChanged_6
  at onSelectionChanged_1
  at $dispatch_36
  at dispatch_38
  at dispatch
  at dispatchEvent_0
  at $doFire
  at $fireEvent_0
  at $fireEvent
  at $fireEvent_1
  at fireEvent_2
  at <anonymous>
  at apply_0
  at entry0
  at selectionChanged
  at isc.TileGrid.addProperties.selectionChange
  at isc.Selection.addMethods.setSelected
  at isc.Selection.addMethods.selectList
  at isc.Canvas.addProperties.selectRecords
  at isc.Canvas.addProperties.selectRecord
  at $selectRecord
  at $selectIndex
  at $selectFirst
  at $selectIndexFromConfig
  at $selectItemFromConfig
  at onDataArrived_1
  at $dispatch_32
  at dispatch_34
  at dispatch
  at dispatchEvent_0
  at $doFire
  at $fireEvent_0

SmartGWT version 5.0p (15/1/15). GWT 2.6. Tested in Chrome with SuperDevMode.

Cheers

Child ListGrid

$
0
0
Using SmartClient 10.0 js doing and my own backend.

Working with two RestDataSource that are connected Parent-Child.

Open up a record and using a DynamicForm for Parents Information
Using contactFormTelecom.fetchRelatedData(record,Contact) to populate the Child ListGrid as there are many child records that can be connected to parent.


When I entered a new record on the child ListGrid it is not connected to the Parent, or in other words it does not send the Parents Id when adding a new record.
I need the Parents Id in order to connect a new child record to the parent on the save.


Is there a different way to connect up the grid than using fetchRelatedData?
Is there a way to specify on a ListGrid that New records have a specific Field set by default.


The dream is to have the option on a ListGrid to set it as a child by specifying a parent record.
That way all fetch or add commands will by default send the parents records key.

After upgrade to SmartGWT 5.0 (and use maven) could not locate Compression module

$
0
0
We were using SmartGWT 3.1. Recently we upgrade to use 5.0. In the same upgrade we switch to use maven. However, now we got this error message when deploying the war file with tomcat6 (okay to test in Eclipse).

Code:

SEVERE: Exception starting filter CompressionFilter
javax.servlet.ServletException: Compression module not found - CompressionFilter unavailable.
        at com.isomorphic.servlet.CompressionFilter.init(CompressionFilter.java:161)
        at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
        at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
        at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
        at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4076)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4730)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)

In our pom.xml, we include only these two dependencies

Code:

                <smartgwt.version>5.0-p20141218</smartgwt.version>
                ...
                <dependency>
                    <groupId>com.isomorphic.smartgwt.power</groupId>
                    <artifactId>smartgwt-power</artifactId>
                        <version>${smartgwt.version}</version>
                </dependency>
                <dependency>
                    <groupId>com.isomorphic.smartgwt.power</groupId>
                    <artifactId>smartgwt-skins</artifactId>
                        <version>${smartgwt.version}</version>
                </dependency>
                <dependency>

The server was a tomcat6 (6.0.24 -- Release 80.el6. This was packaged from RedHat Enterprise Linux)

DateRangeItem question or most likely enhancement

$
0
0
Hi Isomorphic,

I'm under current 4.1p and am using a DateRangeItem with two indented rows showing
"From: INPUT-BOX PICKER"
"To: INPUT-BOX PICKER"

Basically like the DateRangeItem from this showcase sample, but not with relative dates.

As the two rows itself are not that wide and my whole form is, I was looking for a way to arrange the fields next to each other like "FROM TO" instead of above each other. I did not succeed, though. Is is supported? If not, it might be a good and easy enhancement.

I made a mockup for this and attached it.

Best regards,
Blama

Attached Images
File Type: png DateRangeMockup.png (7.7 KB)

Embedding SmartClient into existing app

$
0
0
Hello SmartClient community,

I've been evaluating your product for the last 3 days and I have to say that I'm very impressed with the work you have done, I'm feeling confident of the possibility of building powerful apps in no time thanks to your architecture.

I'm using the SmartClient 10 and after messing around for a while I couldn't found a way to append a widget for example a layout, to organize all my widgets in, to an existing DOM ID (a styled div container) that wasn't a SmartClientObject on my current app.

On the SmartClient FAQ I found this relevant question: How do I make a SmartClient widget fill a basic HTML container or GWT container? ( http://forums.smartclient.com/showthread.php?t=8159#aContainer )

So if I understand correctly, what I'm trying to do may not be possible or at least is not the right, am I wrong?

Thanks in advance

Batch update from client files

$
0
0
We are currently using:-
BuildDate Wed Mar 05 15:52:00 IST 2014
Version 4.1p
SCVersionNumber v9.1p_2014-03-05


I have to update bookmark table(record contains around 500 rows ) from client side file. Currently i have implemented like this
Code:

RPCManager.startQueue();

                        for (Record record : records) {
                            record.setAttribute("BOOKMARK_ID", bmId);                           
                            DataSource.get("wm_bookmark_data").addData(record, new DSCallback() {

                                @Override
                                public void execute(DSResponse dsResponse, Object data, DSRequest dsRequest) {
                                  // some code
                                }
                            }, dsReq);
                        }

                        RPCManager.sendQueue();

As i understood from this is that RPCManager queued all data(500 records) in one request and then sent this request to DB to fetch data creating a separate connection to DB for each record . (500 new connections ) .

Is there a way of updating these rows in a batch ,a single add call for all records so it creates a single connection to DB ?

Getting blank page

$
0
0
Smartclient version: 8.2 , 10.0
Browser: Mozilla, IE

I have a use case for downloading a file from a list grid.Its working fine in happy path but i am getting blank page if there is an exception occurred.

var my_url = FGUtils.appendUniqueCsrfTokenToURL("./DownloadMailboxMessage.do", true) + "&messageId=" + record.messageId;
var prompt_msg = "Message Name" + "</B>&nbsp;&nbsp;&nbsp;" + record.messageName + "<BR><BR><B>" + "Message Path" + ":</B>&nbsp;" + record.mailboxPath + "</B>";
isc.confirm(prompt_msg,
function(value) {
if (value) {
var downloadMessageForm = isc.DynamicForm.create({
autoDraw:true,
action: my_url,
method: "POST"
});

downloadMessageForm.submitForm();

downloadFileResults_ListGrid.setData([]);
downloadFileResults_ListGrid.fetchData();
}
});
};

while calling submitForm() i am getting blank page if any exception occured.

Module structure in application

$
0
0
Hi, all.
Is there way to load js files in asynchronous manner? I want implement module structure in my application.
I know that there is FileLoader.loadJSFiles method. But I don't know how use it properly.
For example I have init.js
Code:

isc.FileLoader.loadJSFiles([ 'js/AAA.js' ], function() {
        console.info('create AAA')
        AAA.create();
});

and two component classes: AAA and BBB. Coponent AAA depends on component BBB.
AAA.js
Code:

isc.FileLoader.loadJSFiles([ 'js/BBB.js' ]);

console.info('define AAA');
isc.defineClass('AAA', 'HLayout').addProperties({
        initWidget : function() {

                console.info('create BBB');
                this.addMembers([ BBB.create() ])
        }
});

BBB.js
Code:

console.info('define BBB');
isc.defineClass('BBB', 'HLayout').addProperties({

});

Now, when I run this mini application I see following console output and error:
Code:

define AAA
create AAA
create BBB
ReferenceError: BBB is not defined
define BBB

I know why the error occur and I understand how it works.
But I don't know how avoid this error and implement asynchronous loading properly.

Alignment of RadioGroupItem

$
0
0
Hi Isomorphic,

We are using GWT 2.5.1 and Smart Gwt-4.1p (29th Oct 2014)

We have an issue related to Alignment of RadioGroupItem.

In the following example we have created One TextItem and One RadioGroupItem both are added to Single DynamicForm.
We need to display the window like "Screen 2". But at present the window is displayed like "Screen 1".

Please refer the attached Screenshot for "Screen 1" and "Screen 2".
please refer the attached sample program.

By setting setColSpan(250) for RadiGroupItem we are able to align properly. But our project is supporting Internationalization,
So the Form alignment is looking different from one language to Another Language.

Is there any other property in smartGwt to look same alignment in all the Languages.


Please let us know if you have any solution.

Thanks in advance.

Attached Images
File Type: png Alignment_of_RadioGroupItem.png (72.8 KB)
Attached Files
File Type: java TestsmartGwtProject.java (788 Bytes)
File Type: java DynaForm.java (2.3 KB)

Enhancement: MouseWheel support in TabSet

$
0
0
Hi Isomorphic,

I just opened many samples in the showcase and noticed that the TabSet does not support left/right scrolling with the mouse. I'm used to Firefox, which supports this. IMO it is a good feature, but it seems to be different in every browser-UI.
  1. Firefox 26 native tab: Minimum Tab width, soft scrolling with mouse-wheel or with mouse-pointer via arrow click. Additional "Select Tab" dropdown.
  2. IE 11 native tab: Minimum Tab width, hard scrolling one-by-one via arrow click with the mouse only.
  3. Chrome 39: No minimum Tab width. Every tab clickable.
I like the FF way the best and SmartGWT is doing it exactly like this - only the mousewheel-scrolling, which I'm using a lot in Firefox, is missing.

I'm using that many SmartGWT Tabs in the showcase only, so this has no priority for me, but I thought you might wanted to know anyway.

Best regards,
Blama

self.redraw is not a function -- error after upgrading to SmartGWT 5.0

$
0
0
We have a running code that worked before with SmartGWT 3.1, but then stopped to working after we upgrade to 5.0 (we are using 5.0-p20141218)

The error message was this

Code:

Uncaught exception escaped: com.google.gwt.core.client.JavaScriptException
(TypeError) @com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)([JavaScript object(527), JavaScript object(239), JavaScript object(532)]): self.redraw is not a function
See the GWT exception log for details.
Register a GWT.setUncaughtExceptionHandler(..) for custom uncaught exception handling.

The offending code is this line (I show a few more line as the context), which I couldn't see anything wrong

Code:

selectItemStackingOption.setValueMap(stackingValueMap);
selectItemStackingOption.setValue((String)null);
selectItemStackingOption.setDefaultToFirstOption(true);
selectItemStackingOption.redraw();  // <--- offending line
renderingParams.setDefaultChartStackingOption();

In my Eclipse debugger, I could see that the SelectItem seems to be a valid one (the lines preceding the offending line also worked). I am attaching a screenshot showing the content of this SelectItem

Details info:

SmartClient Version: v10.0p_2014-12-18/PowerEdition Deployment (built 2014-12-18)

Browser: Firefox 26.0

Stacktrace as shown in the console of Eclipse

Code:

17:15:38.064 [ERROR] [nara] 17:15:38.065:WARN:TabBar:isc_TabSet_0_tabBar:ignoring bad or negative width: -142 [enable 'sizing' log for stack trace]

com.smartgwt.client.core.JsObject$SGWT_WARN: 17:15:38.065:WARN:TabBar:isc_TabSet_0_tabBar:ignoring bad or negative width: -142 [enable 'sizing' log for stack trace]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:304)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
    at com.smartgwt.client.widgets.BaseWidget.setProperty(BaseWidget.java)
    at com.smartgwt.client.widgets.BaseWidget.setAttribute(BaseWidget.java:975)
    at com.smartgwt.client.widgets.Canvas.setHeight(Canvas.java:9255)
    at com.alcatel_lucent.aware.nara.client.rendering.AnaBaseLayout.createLayoutMiddle(AnaBaseLayout.java:265)
    at com.alcatel_lucent.aware.nara.client.rendering.AnaBaseLayout.createLayoutAll(AnaBaseLayout.java:370)
    at com.alcatel_lucent.aware.nara.client.rendering.AnaBaseLayout.cb_InitLayout(AnaBaseLayout.java:210)
    at com.alcatel_lucent.aware.nara.client.rendering.AnalyzeMain$1.onSuccess(AnalyzeMain.java:97)
    at com.alcatel_lucent.aware.nara.client.rendering.AnalyzeMain$1.onSuccess(AnalyzeMain.java:1)
    at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:232)
    at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:259)
    at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:412)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
    at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:347)
    at sun.reflect.GeneratedMethodAccessor145.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
    at java.lang.Thread.run(Unknown Source)

Bug Report: TreeGrid edit in dataFetchMode: "paged"

$
0
0
Hi,

problem occurs for TreeGrids with dataFetchMode set to 'paged'.

After the data is updated, the TreeGrid gets scrambled for all rows below the edited one.

Smart Client: v100p_2015-01-10_LGPL
Browser Chrome: 39.0.2171.95 (64-bit)

It is easy to reproduce in your own sample:

http://www.smartclient.com/docs/10.0/a/system/reference/SmartClient_Explorer.html#pagingForChildren

Steps to reproduce:

1. Add 2 lines of cade to the sample in "pagingForChildren.js" tab:
Code:

    canEdit:true,
    autoSaveEdits:true,

2. Push "Try it"
3. Double click and edit any record
4. Press Enter
5. After row is saved the TreeGrid gets scrambled.

I was able to verify that the problem is with the underlying ResultTree object rather than TreeGrid itself.
myTreeGrid.data.getRange(start,end) returns empty array after data has been updated.

Please let me know in case of any questions.

Best Regards,
Adam Kaczmarek

Reg:Listgrid Validation

$
0
0
Hi Team,

In the previous builds of 9.1 before august 2014, While editing in the ListGrid, It use to validate all the fields which has serverCustom with the operation as "validate". This was happening by calling condition method in the validator class.Condition method use to call for all the mentioned fields with DSoperation as "Validate" once and for the changed fields again with the Operation type as "Update".

But now condition method in the validator class is called only for the changed fields with DS Opeartion as "Update".

Could you please let me know when is the condition method called for List Grid While editing and also while adding a new record.

But in the form condition method is called for all fields which has serverCustom class with operation as "add" while inserting and "update" while Updating a record.

We are working on the below environment:
SmartClient version : Isomorphic SmartClient/SmartGWT Framework (10.0p_2014-12-23/PowerEdition Deployment 2014-12-23)

Browser : IE9

Thanks in advance.
Viewing all 4756 articles
Browse latest View live