January 10, 2014, 7:34 am
Hello.
I'm using SmartClient_v90p_2014-01-09.
Visually menu item in isc.Menu component is separated on icon area and title area.
I'd like to use font icons, and they are just text with specified font via css. So how can I place such icons in icon area of menu item?
I mean font icons like http://icomoon.io/
↧
January 10, 2014, 7:37 am
SmartClient Version: v8.3_2012-11-20/LGPL Development Only (built 2012-11-20)
FF 25.0
I am trying to display a list of 100+ objects in a VLayout and sorting them on-the-fly afterwards.
I have tried both setMembers() and reorderMember() on VLayout, but the performance is very poor (> 5sec).
The only reordering method that seems to be fast is setReverseOrder() followed by reflow(), but that of course only works for reverting the order, not for sorting.
Is there some faster way of sorting layout members ?
Kind Regards,
Jan
↧
↧
January 10, 2014, 8:02 am
we are using Version v9.0p_2013-08-05 smart client
I have a ListGrid which has many columns and one of the column has only check box in order to select and do delete action.
After clicking Auto Fit All Columns in the context menu, the check box column hides totally.
We have done following setings on checkbox Field for our Application requirements
checkboxField.showDefaultContextMenu = false;
checkboxField.showTitle = false;
checkboxField.canGroupBy = false;
checkboxField.canDragResize = false;
checkboxField.canReorder = false;
checkboxField.canHide = false;
_dsObject.getField(checkboxField.name).canHilite = false;
_gridObject.setAutoFitWidth(checkboxField.name, false);
Pls explain, how to make it visible after doing Auto Fit All Columns.
Hope you would understand our support contract by seeing the user id.
↧
January 10, 2014, 8:22 am
Using record.toMap() on a grouped map (or a tree) can crash the browser due to infinite recursion. After performing some operation it seems that the record itself contains a reference to the Tree and when calling record.toMap it starts going infinitely.
After the stackoverflow the browser also doesn't recover.
This was tested on the latest 4.0 nightly, with Firefox 26.0 on GWT 2.5.1.
If you want I can provide a similar example with a TreeGrid.
Code:
package com.genohm.slims.client.gui;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.GWT.UncaughtExceptionHandler;
import com.google.gwt.user.client.Timer;
import com.smartgwt.client.core.Function;
import com.smartgwt.client.data.DataSource;
import com.smartgwt.client.data.Record;
import com.smartgwt.client.widgets.grid.ListGrid;
import com.smartgwt.client.widgets.grid.events.DataArrivedEvent;
import com.smartgwt.client.widgets.grid.events.DataArrivedHandler;
public class TestGroupGrid implements EntryPoint {
private Record selectThis;
@Override
public void onModuleLoad() {
DataSource.load("Unit", new Function() { //Load datasource (we use dynamic datasources)
@Override
public void execute() {
DataSource ds = DataSource.get("Unit");
final ListGrid listGrid = new ListGrid();
listGrid.setGroupByField("unit_abbreviation");
listGrid.setDataSource(ds);
listGrid.setAutoFetchData(true);
listGrid.addDataArrivedHandler(new DataArrivedHandler() {
@Override
public void onDataArrived(DataArrivedEvent event) {
listGrid.getGroupTree();
if (selectThis != null) {
//reselect the record we need to select
listGrid.selectRecord(listGrid.getRecordIndex(selectThis));
//This will destroy everything!
System.err.println(selectThis.toMap());
} else {
//select the first record (skip the group row)
listGrid.selectRecord(1);
}
}
});
//trigger a refresh
new Timer() {
@Override
public void run() {
//keep the selected record after refresh
selectThis = listGrid.getSelectedRecord();
listGrid.invalidateCache();
listGrid.fetchData();
}
}.schedule(2000);
listGrid.draw();
}
}, false);
GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
@Override
public void onUncaughtException(Throwable e) {
e.printStackTrace();
}
});
}
}
A safer print of selectThis:
Code:
key: unit_type value: SCALAR
key: unit_fk_dimension value: 1
key: unit_pk value: 1
key: unit_createdOn value: Fri Dec 20 2013 12:18:03 GMT+0100 (CET)
key: unit_abbreviation value:
key: groupParentId value: null
key: _groupTree_isc_ListGrid_0 value: [object Object] <= I think this causes the record to refer to itself ultimately, causing infinite recursion for record.toMap()
key: $42c value: isc_ListGrid_0_groupTree_isc_OID_0
key: _autoAssignedName value: true
key: name value: 0_1
key: _cachedLength_isc_ListGrid_0_groupTree_isc_OID_0 value: 1
key: isFolder value: null
key: _selection_3 value: false
The exception: (trimmed)
Code:
java.lang.StackOverflowError
at com.google.gwt.dev.util.log.AbstractTreeLogger.causedBySpecialError(AbstractTreeLogger.java:330)
at com.google.gwt.dev.util.log.AbstractTreeLogger.log(AbstractTreeLogger.java:205)
at com.google.gwt.core.ext.TreeLogger.log(TreeLogger.java:281)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:143)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
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:242)
at sun.reflect.GeneratedMethodAccessor107.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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:571)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
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:242)
at sun.reflect.GeneratedMethodAccessor107.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
....
↧
January 10, 2014, 8:25 am
I'm using window.footer.setPrompt("prompt text") to display a tooltip when hovering on the window footer.
Is there a way that I can make the hover pop up box stay focused so that I can copy the text in the pop up box. Currently, the pop up box will be automatically disappeared when the mouse cursor goes out of the window footer area.
Thanks
↧
↧
January 10, 2014, 1:13 pm
Hello guys:
I already wrote you about this issue.
http://forums.smartclient.com/showthread.php?t=28630
and you solved but I update my phonegap to 3.2.0 from 2.9.0 and the issue is happening again on Android and IOS7.
Could you please take a look on this??
Thanks
↧
January 11, 2014, 2:00 am
How to integrate google maps v3 in smartgwt that would not use a simple gwt-panel(SimplePanel)?
↧
January 11, 2014, 2:21 am
How to integrate google maps v3 in smartgwt that would not use a simple gwt-panel(SimplePanel)?
I would be very grateful for any help.
↧
January 11, 2014, 4:40 pm
I updated my SmartGWT 4.1 library the most recent build. I discovered that autosizing for ButtonItem no longer works.
Here is the code that demonstrates this:
Code:
DynamicForm form = new DynamicForm();
form.setNumCols(1);
form.setWidth("140");
ButtonItem button1 = new ButtonItem();
button1.setTitle("This is Button 1");
ButtonItem button2 = new ButtonItem();
button2.setTitle("Button 2");
form.setItems(button1, button2);
form.setCellBorder(1);
form.draw();
Ive tried various versions of the SmartGWT 4.1 libraries and have found that this bug was introduced with 4.1-d20131124.
ButtonItem autosize works with 4.1-d20131117.
The libraries for the dates 4.1-d20131118 through 4.1-d20131123 dont exist so I couldnt test these.
Ive attached the capture screenshot that shows the difference between 4.1-d20131117 (works correctly) and 4.1-d20131124 (works incorrectly).
↧
↧
January 11, 2014, 8:32 pm
Hi, all
I'm newbie in OpenBravo and Smartclient , so I'm sorry if I posted obvious question.
I have created a custom MDI view in Openbravo ERP. Added some input field for filtering product's name in Smarclient's listgrid which contains Orders. I have created a Order datasource and bind it to the Smartclient grid. What I want to achieve is to filter a Order list in the grid by product name which is added in the input text field. I tried with several approaches but without success.
So I came to question is it possible to add join table in AdvancedCriteria in the grid's fetchData function?
Here is a snippet of my code:
Code:
isc.ELB_MainView.addProperties({
form: null,
grid: null,
initWidget: function () {
this.grid = isc.OBGrid.create({
setDataSource: function (ds, fields) {
var selectedFields = [],
fs = OB.Constants.FIELDSEPARATOR,
ident = OB.Constants.IDENTIFIER,
fieldNames = ['documentNo', 'documentStatus', 'orderDate', 'accountingDate', 'businessPartner'+fs+ident, 'currency'+fs+ident],
i, j;
for(i = 0; i < fieldNames.length; i++) {
for(j in ds.fields) {
if(ds.fields.hasOwnProperty(j) && j === fieldNames[i]) {
selectedFields.push(ds.fields[j]);
}
}
}
this.Super('setDataSource', [ds, selectedFields]);
this.fetchData();
}
});
this.form = isc.DynamicForm.create({
fields: [{name : "productName",
title: "Product Name",
type : "text",
width: '100%',
change: function(form, item, value, oldValue){
form.main.grid.invalidateCache();
form.main.grid.fetchData({
_constructor: 'AdvancedCriteria',
operator: 'and',
criteria: {
'fieldName': 'orderLineList.product.name',
'operator': 'equals',
'value': value
}
});
this.Super('change', arguments);
}}],
main: this
});
OB.Datasource.get('Order', this.grid, null, true);
this.addMember(this.form);
this.addMember(this.grid);
this.Super("initWidget", arguments);
}
});
Tnx in advance.
MB
↧
January 12, 2014, 12:51 am
Hi there
Please help - I'm using SmartClient Power Edition version 9.0. I also subscribed to support.
I'm struggling to get relogin working.
I have a NON SmartClient HTML login page - login.jsp.
I also have a filter that will redirect the user to the login page when the session timedout.
I did include the loginRequiredMarker.html text in my login.jsp page.
So, when the session has timed out within my SmartClient app, the user does NOT gets redirected to the login.jsp, but instead a NEW window is opened for login.jsp.
All I want is to redirect the existing browser session to the login.jsp. I'm OK if the transaction is lost. Let me just get this basic one in place.
According to your help I get a clue to do this:
http://www.smartclient.com/docs/9.0/a/b/c/go.html#group..relogin
But, where do I put this code:
window.location.replace(LOGIN_PAGE);
Please help. I really tried to see if there's been other discussions about this.
↧
January 12, 2014, 4:42 am
When fetching the data in a listgrid I got this warning:
=== 2014-01-12 13:37:14,843 [l0-4] WARN DSRequest - [builtinApplication.schueler_fetch] getSortBy() called on dsRequest containing multiple sortBy fields, returning first in list.
But the listGrid is sorting correctly, in the SQL an "order by field1, field2, field3" is being executed.
So why this warning?
Using smartgwt power 4.0 2013-11-27
↧
January 12, 2014, 5:42 am
Why is the SC.ask window ignoring the given button titles? In an old version of smartgwt this code was working, and now not.
The button titles should be "yes" and "no". But I always see "OK", and "Cancel".
Code:
public class TestingModule implements EntryPoint {
public void onModuleLoad() {
IButton clickMe = new IButton("Click me");
clickMe.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
SC.ask("title", "really?", null, getConfirmDialogProperties());
}
});
clickMe.draw();
}
private static Dialog getConfirmDialogProperties()
{
Dialog dialog = new Dialog();
Button okButton = Dialog.OK;
okButton.setTitle( "yes" );
Button cancelButton = Dialog.CANCEL;
cancelButton.setTitle( "no" );
dialog.setButtons( okButton, cancelButton );
return dialog;
}
}
Using smartgwt 4.0 power 2013-11-27.
↧
↧
January 12, 2014, 3:38 pm
Smart GWT 4.1
Following philosophy regarding :
http://forums.smartclient.com/showthread.php?t=29095, I tried to change the labelColumnWidth property of TimelineView.
Though ListGrid is not expecting to have an entry point adressing such need, I tried below code with no luck:
Code:
ListGrid timelineView = new ListGrid();
timelineView.setProperty("labelColumnWidth", 150);
this.setAutoChildProperties("timelineView", timelineView);
Also, I tried to go through JNSI with below code, without much success:
Code:
$wnd.isc.TimelineView.changeDefaults("labelColumnWidth", 150);
but it had no effect.
75px width is very narrow and having a way to override it sounds reasonnable to me, doesn't it ?
↧
January 13, 2014, 1:19 am
I had an application running on SmartGWT 2.5. After the update to 4, SelectItem that should show multiple values started to behave strange.
Mentioned SelectItem is placed in DynamicForm, and form is populated by calling "form.editRecord(record);"
In case that only one value is stored in "organizationType" field (example "RN"), item shows correctly selected value. But if multiple values are stored (example "RN,NA") no values are selected. Calling "organisationType.getValueAsString()" shows correct values both times.
Editing the data works fine, the only problem is that multiple values are not visible upon populating the form (see attachment).
SelectItem config:
Code:
organisationType = new SelectItem("organisationType");
organisationType.setMultiple(true);
organisationType.setMultipleAppearance(MultipleAppearance.GRID);
organisationType.setWidth(425);
organisationType.setHeight(210);
organisationType.setMultipleValueSeparator(",");
organisationType.setValueMap(organisationTypesList);
↧
January 13, 2014, 5:31 am
Hi,
I have created a multiple select drop down using the
Code:
SelectItem selectMultiple = new SelectItem();
selectMultiple.setWidth("*");
selectMultiple.setMultiple(true);
linked it to a datasource
Code:
DataSourceTextField multipleType = new DataSourceTextField(
"multipleType", "Multiple(s)");
multipleType.setMultiple(true);
multipleType.setEditorProperties(selectMultiple);
setFields(multipleType);
The issue I want to disable some of the check boxes / values in the drop down
Is there any API to do it directly.
Regards
ME
↧
January 13, 2014, 7:12 am
I am looking for guidance on the best approach for passing extra properties from the client to the server through the DSRequest. I don't want to pass them through criteria because the properties don't exist in the data source, and am concerned with using http parameters as I am not sure how queuing would affect them.
The immediate problems I am trying to solve are:
- pass extra query properties that are used in conjunction criteria to fetch data but not on fields defined in the data source.
- implement a paging style fetch where I can pass page size, count and page to select.
I am using: v8.3p_2013-05-07/Pro Deployment (built 2013-05-07)
↧
↧
January 13, 2014, 8:14 am
Hi,
I'm trying to evaluate how DrawPane works and with this very simple example (using SmartGWT 4.0p, dated 2013-12-14, on IE10, dev mode):
Code:
public class DrawTest extends DrawPane {
public DrawTest() {
this.setHeight(400);
this.setWidth(800);
this.setShowEdges(true);
this.setEdgeSize(4);
this.setBackgroundColor("papayawhip");
this.setOverflow(Overflow.HIDDEN);
this.setCursor(Cursor.AUTO);
this.init();
}
protected void init() {
final DrawRect drawRect = new DrawRect();
drawRect.setDrawPane(this);
drawRect.setLeft(10);
drawRect.setTop(10);
drawRect.setWidth(150);
drawRect.setHeight(100);
drawRect.setFillColor("blue");
drawRect.showKnobs(KnobType.RESIZE);
}
}
The problem is that as soon as I start resizing the rectangle using the knob (S-E), I start getting a lot (hundreds) of warnings like those ones:
Code:
[ERROR] [application] - 17:06:31.493:TMR9:WARN:DrawKnob:isc_DrawRect_0_resizeKnob:left specified as fractional coordinate:4.5. Rounded to:5
[ERROR] [application] - 17:06:31.495:TMR9:WARN:DrawKnob:isc_DrawRect_0_resizeKnob:top specified as fractional coordinate:4.5. Rounded to:5
[ERROR] [application] - 17:06:31.497:TMR9:WARN:DrawKnob:isc_DrawRect_0_resizeKnob_isc_OID_0:left specified as fractional coordinate:153.5. Rounded to:154
[ERROR] [application] - 17:06:31.499:TMR9:WARN:DrawKnob:isc_DrawRect_0_resizeKnob_isc_OID_0:top specified as fractional coordinate:4.5. Rounded to:5
[ERROR] [application] - 17:06:31.500:TMR9:WARN:DrawKnob:isc_DrawRect_0_resizeKnob_isc_OID_1:left specified as fractional coordinate:4.5. Rounded to:5
[ERROR] [application] - 17:06:31.501:TMR9:WARN:DrawKnob:isc_DrawRect_0_resizeKnob_isc_OID_1:top specified as fractional coordinate:106.5. Rounded to:107
[ERROR] [application] - 17:06:31.503:TMR9:WARN:DrawKnob:isc_DrawRect_0_resizeKnob_isc_OID_2:left specified as fractional coordinate:153.5. Rounded to:154
[ERROR] [application] - 17:06:31.503:TMR9:WARN:DrawKnob:isc_DrawRect_0_resizeKnob_isc_OID_2:top specified as fractional coordinate:106.5. Rounded to:107
If I resize a little bit more, it becomes completely overwhelmed by warnings and it becomes unstable (and unusable, slowed down dramatically).
Is there something wrong is the small given example ?
Best regards,
Thomas
↧
January 13, 2014, 8:21 am
Smart GWT 4.1d, january 12th 2014 build
Chrome MacOSX
Win7 IE11, Chrome
I have a simple TextItem in a DynamicForm.
I can type text in it and hit enter (that triggers a search in my app).
Now if I want to erase this text to submit another query, nothing happens (like frozen). Erase, backspace and arrow keys are not functional, like letters keys, etc.
But : I can use mouse to select all characters and then if I type new letters, previous ones are erased and net letters are typed in.
I have this behavior on Chrome and IE, but not with Firefox, with firefox everything is fine !
Everything was fine with SmartGWT 4.0. But I had to upgrade to support IE11.
Any hint ?
Thank you
↧
January 13, 2014, 8:28 am
Hi all,
I have a ListGrid with:
g.setShowFilterEditor(true);
g.setAllowFilterExpressions(true);
Unfortunately, when I call a fetch(...) on the grid, the values within the filter-editor are removed.
Is there a possibility, to keep the values of the filter-editor as they are, also when I call a fetch(...) ?
Thanks a lot in advance
I have SmartClient Version: v8.2p_2013-10-12/PowerEdition Deployment
↧