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

Customizer Hover not working for Facet Chart if i am using Column type chart.

$
0
0
Hi all,

I am working on smartGWT, Now a day working on GUI. I created some chart using Facet Chart. need to show customize tool tip on data.

I am using setPointHoverCustomizer method its working fine on LINE and Area facet Chart type but its not supported Column Facet Chart.

Please if anyone know anything please reply me back.

Thank you so much.

Question: firing events on disabled Canvas

$
0
0
Hi all,

I have a question about the possibility to fire events (e.g. mouse, scroll...) on disabled Canvas.

We are using SmartClient Version: v10.0p_2015-06-23/LGPL Development Only (built 2015-06-23).

Our usecase is TabSet with Tabs. Each Tab contains quite complex content including other Tabsets, DynamicForms, ListGrids...
In some cases, we must set the entire Tab to be disabled - calling setDisabled(true) on the content Canvas.
This works perfect, but such a disabled Tab content ignores any mouse events.
We'd like to allow user to do things like:
- select and copy any text
- scroll in the disabled listGrid
This used to be possible in the very earlier versions of SGWT (3.1p).

So my question is - is there any way how to achieve such behavior?

Thanks for any response.

SGWT 5 - duplicated values in grouped columns

$
0
0
Hi

We've noticed a duplication of values in a specific scenario:

1. hide a column with summary (in this example - Population)
2. group another column (Country)

As a result, duplicated values appear for each grouped country.
However, after reversing action order - group first and then hide column - values are not duplicated.

Screenshots illustrating both results and a complete test case are included in attachments.

Important version info:

GWT: 2.6.1
SGWT: 5.0 pro (build: 2015-07-29)
Chrome Version 43.0.2357.134 (64-bit) or Firefox 39.0
Ubuntu 15.04

Attached Images
File Type: png single_group_value.png (18.3 KB)
File Type: png duplicated_values.png (20.5 KB)
Attached Files
File Type: java TestCase.java (20.8 KB)

Calling Oracle Stored Procedure or Function from SmartGWT 5.0p

$
0
0
Hi Isomorphic,

what is the best practice to have Oracle do some task and return a number as result?

Oracle Stored Procedure or Function?
Could you give an example? Here you seem to suggest function but with no example.
In the Quick Start Guide and the CustomQuerying-docs you suggest procedure.

I'd think that function is correct, but can't get it to work (from the logs I can see that the velocity expression is working).

.ds.xml:
Code:

                <operationBinding operationType="remove" operationId="removeABC" serverMethod="removeABC" requiresRole="deleteABCOwn, deleteABCSameLE">
                        <customSQL>deleteABC($values.ABC_ID)</customSQL>
                </operationBinding>

I'm using v10.0p_2015-08-16/PowerEdition Deployment.

I tried "deleteABC($values.ABC_ID)", "CALL deleteABC($values.ABC_ID)" and "EXEC deleteABC($values.ABC_ID)",

leading to different error messages, including:
  • ORA-06576: not a valid function or procedure name
  • ORA-00900: invalid SQL statement
  • Ungültiger SQL-Typ: sqlKind = UNINITIALIZED

My function is:
Code:

CREATE OR REPLACE FUNCTION deleteABC(abcId IN NUMBER) return NUMBER AS
BEGIN
--dummy
return 1000;
END;
/

Do you describe calling functions (returning different types) and stored procedures (with one or more OUT parameters) somewhere in detail?

This usecase should be very common, so most likely I just didn't find the docs for it, yet. On the other hand, there are not too many threads in the forums search.

Best regards
Blama

listgrid header text truncated in Firefox when sort number is displayed

$
0
0
Hello,

My version of isomorphic is v9.1p_2015-03-26/Pro Development Only (2015-03-26).
NOK with Firefox 39.0.
Tested OK with Chrome 44.0.2403.155.

I've created a simple ListGrid with following fields:
Code:

<fields>
  <field name="fieldName1" title="fieldName 1" headerTitle=" "  type="integer"  align="center"  width="35" icon="[SKINIMG]/FieldName1.png"/>
  <field name="fieldName2" title="Group Name test" primaryKey="true" type="text" align="left" cellalign="left" width="138"/>
  <field name="fieldName3" headerTitle=" " title="fieldName 3"  type="integer" align="center"  width="35"  icon="[SKINIMG]/fieldName3.png"/>
  <field name="fieldName4" headerTitle=" " type="integer" title="FieldNAme 4" align="center"  width="35" icon="[SKINIMG]/fieldName4.png"/>
  <field name="fieldName5" headerTitle=" " type="integer" customizedTooltip="true" title="fieldName 5" align="center"  width="35" icon="[SKINIMG]/fieldNAme5.png"/>
</fields>

When I want to apply a multiple sorting, then, in Firefox, the text of the second field is truncated to display the number of the sort.
This is not the case with Chrome and IE11 (I've attached a screen capture for Firefox and a one with Chrome to show the difference).

To solve the problem, I've added, through the debugger embedded in Firefox, a CSS property (float: left) to the DIV that contains the text "Group Name Test".
It corresponds to the line n°58063 in the file ISC_Grids.js (when the style is applied to the DIV, method getButtonHeaderTitle()).
This is a temporary hack that doesn't support RTL text support for instance.

I've seen nothing in the Bugzilla database about a possible bug from Firefox.

Attached Images
File Type: png Header_Chrome_OK.PNG (5.6 KB)
File Type: png Header_Firefox_NOK.PNG (6.1 KB)

GWT compile is not working after upgrade.

$
0
0
GWT: 2.7.0
SmartGwt: 5.0p
Eclipse: Kepler
Java: 1.6

I am getting a compile error when I do a GWT Compile in Eclipse.

java.lang.IncompatibleClassChangeError: class com.google.gwt.dev.javac.asm.CollectMethodData has interface org.objectweb.asm.MethodVisitor as super class

SmartGwt includes asm-3.1.jar

I found a post on the web that says I should update the asm jar. I was wondering if anyone else has had this problem.
What did you do to fix the problem?
What version of the asm jar should I use?

thanks,
Richard

SmartGWT Column Header and Header Content Un-Ordered

Serverside addRelatedUpdate Exception - question for variable in your java file

$
0
0
Hi Isomorphic,

I'm using a fake serverside DSResponse in order to remove data from a client side ListGrid. The request sent was a customOperation request.
I try to piggyback that DSResponse to another one like the following:

Code:

DSResponse returnResponse = new DSResponse(sourceDatasource, DSResponse.STATUS_SUCCESS);//sourceDatasource is a String

// Return a response that triggers a remove of the specific row at the client side
DSResponse piggybackResponse = new DSResponse(sourceDatasource, DSResponse.STATUS_SUCCESS);//sourceDatasource is a String
/* Search for setData in Server Showcase source (sample\showcase\SERVER!) or see
 * http://www.smartclient.com/smartgwtee/server/javadoc/com/isomorphic/datasource/DSResponse.html#setData%28java.lang.Object%29
 * What happens here is that we fake a entry-removed response.
 */
piggybackResponse.setOperationType(DataSource.OP_REMOVE);
List<Map<String, Object>> recordList = new ArrayList<Map<String, Object>>();
Map<String, Object> record = new HashMap<String, Object>();
record.put("LEAD_ID", leadId); //leadId is some Long
recordList.add(record);
piggybackResponse.setData(recordList);
piggybackResponse.setAffectedRows(1);
returnResponse.addRelatedUpdate(piggybackResponse);

return returnResponse;

I get the following error in the server log:
Code:

=== 2015-08-18 18:45:45,121 [c-14] DEBUG DataSourceDMI - Invocation threw exception
java.lang.NullPointerException
        at com.isomorphic.datasource.DSResponse.addRelatedUpdate(DSResponse.java:888)
        at com.lmscompany.lms.server.worker.V_LEAD_CURRENT.removeLead(V_LEAD_CURRENT.java:426)
        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.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:975)
        at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:416)
        at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:64)
        at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2544)
        at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:220)
        at com.lmscompany.lms.server.LMSIDACall.handleDSRequest(LMSIDACall.java:75)
        at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:185)
        at com.lmscompany.lms.server.LMSIDACall.processRequest(LMSIDACall.java:40)
        at com.isomorphic.servlet.IDACall._processRequest(IDACall.java:117)
        at com.isomorphic.servlet.IDACall.doPost(IDACall.java:76)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
        at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:156)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at com.isomorphic.servlet.CompressionFilter._doFilter(CompressionFilter.java:260)
        at com.isomorphic.servlet.BaseFilter.doFilter(BaseFilter.java:83)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:611)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:409)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1044)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

As the whole code is independent of any outer variables you should be able to reproduce easily.

Perhaps it is also enough if you could tell me what variable exactly is used in DSResponse.java:888? Perhaps I forgot some important value when faking my response.

I'm using today's v10.0p_2015-08-18/PowerEdition Deployment.

Thank you & Best regards
Blama

Server-side "Field State" parser.

$
0
0
Hi Isomorphic,

Do you have any field state parsing utilities server-side that I can use to easily parse and utilize the information provided in the field state?

It seems awfully close to JSON, however, instead of:

Code:

...{"name":"type","width":100}...
It has some double quotes omitted, like follows.

Code:

...{name:"type",width:100}...
This is causing the parser I am utilizing to throw an exception. If I add the double quotes, it appears to parse OK.

Thanks

SmartClient Version: SNAPSHOT_v10.1d_2015-08-06/Pro Deployment (built 2015-08-06)

ListGrid expressionFilter not working correctly

$
0
0
Hi Isomorphic, we are having an issue with ListGrids using the property "allowFilterExpresions: true"

bug: the filter editor criteria is cleared the first time you filter. The filter is still aplied. From then on the filter editor works normally. No messages on the developer console

SC version: "v10.0p_2015-07-27/LGPL Development Only"

browser: firefox dev edition 41.0a2 , Chrome 44.0.2403.155 m, IE 11

OS: windows 7

this is the example code:

Code:

var data_$$ = [
    {pkField: 6, fieldA: 'valA6', fieldB: 'valB6'},
    {pkField: 7, fieldA: 'valA7', fieldB: 'valB7'},
    {pkField: 8, fieldA: 'valA8', fieldB: 'valB8'},
    {pkField: 9, fieldA: 'valA9', fieldB: 'valB9'},
    {pkField: 1, fieldA: 'valA1 - to be removed', fieldB: 'valB1'},
    {pkField: 2, fieldA: 'valA2', fieldB: 'valB2'},
    {pkField: 3, fieldA: 'valA3', fieldB: 'valB3'},
    {pkField: 4, fieldA: 'valA4', fieldB: 'valB4'},
    {pkField: 5, fieldA: 'valA5', fieldB: 'valB5'},
    {pkField: 6, fieldA: 'valA6', fieldB: 'valB6'},
    {pkField: 7, fieldA: 'valA7', fieldB: 'valB7'},
    {pkField: 8, fieldA: 'valA8', fieldB: 'valB8'},
    {pkField: 9, fieldA: 'valA9', fieldB: 'valB9'},
    {pkField: 10, fieldA: 'valA10', fieldB: 'valB10'},
    {pkField: 11, fieldA: 'valA11', fieldB: 'valB11'},
    {pkField: 12, fieldA: 'valA12', fieldB: 'valB12'},
    {pkField: 13, fieldA: 'valA13', fieldB: 'valB13'},
    {pkField: 14, fieldA: 'valA14', fieldB: 'valB14'},
    {pkField: 15, fieldA: 'valA15', fieldB: 'valB15'},
    {pkField: 16, fieldA: 'valA16', fieldB: 'valB16'},
    {pkField: 17, fieldA: 'valA17', fieldB: 'valB17'},
    {pkField: 18, fieldA: 'valA18', fieldB: 'valB18'},
    {pkField: 19, fieldA: 'valA19', fieldB: 'valB19'},
    {pkField: 20, fieldA: 'valA20', fieldB: 'valB20'},
    {pkField: 21, fieldA: 'valA21', fieldB: 'valB21'},
    {pkField: 22, fieldA: 'valA22', fieldB: 'valB22'},
    {pkField: 23, fieldA: 'valA23', fieldB: 'valB23'},
    {pkField: 24, fieldA: 'valA24', fieldB: 'valB24'},
    {pkField: 25, fieldA: 'valA25', fieldB: 'valB25'},
    {pkField: 26, fieldA: 'valA26', fieldB: 'valB26'},
    {pkField: 27, fieldA: 'valA27', fieldB: 'valB27'},
    {pkField: 28, fieldA: 'valA28', fieldB: 'valB28'},
    {pkField: 29, fieldA: 'valA29', fieldB: 'valB29'},
    {pkField: 30, fieldA: 'valA30', fieldB: 'valB30'},
    {pkField: 31, fieldA: 'valA31', fieldB: 'valB31'},
    {pkField: 32, fieldA: 'valA32', fieldB: 'valB32'},
    {pkField: 33, fieldA: 'valA33', fieldB: 'valB33'},
    {pkField: 34, fieldA: 'valA34', fieldB: 'valB34'},
    {pkField: 35, fieldA: 'valA35', fieldB: 'valB35'},
    {pkField: 36, fieldA: 'valA36', fieldB: 'valB36'},
    {pkField: 37, fieldA: 'valA37', fieldB: 'valB37'},
    {pkField: 38, fieldA: 'valA38', fieldB: 'valB38'},
    {pkField: 39, fieldA: 'valA39', fieldB: 'valB39'},
    {pkField: 40, fieldA: 'valA40', fieldB: 'valB40'},
    {pkField: 41, fieldA: 'valA41', fieldB: 'valB41'},
    {pkField: 42, fieldA: 'valA42', fieldB: 'valB42'},
    {pkField: 43, fieldA: 'valA43', fieldB: 'valB43'},
    {pkField: 44, fieldA: 'valA44', fieldB: 'valB44'},
    {pkField: 45, fieldA: 'valA45', fieldB: 'valB45'},
    {pkField: 46, fieldA: 'valA46', fieldB: 'valB46'},
    {pkField: 47, fieldA: 'valA47', fieldB: 'valB47'},
    {pkField: 48, fieldA: 'valA48', fieldB: 'valB48'},
    {pkField: 49, fieldA: 'valA49', fieldB: 'valB49'},
    {pkField: 50, fieldA: 'valA50', fieldB: 'valB50'},
    {pkField: 51, fieldA: 'valA51', fieldB: 'valB51'},
    {pkField: 52, fieldA: 'valA52', fieldB: 'valB52'},
    {pkField: 53, fieldA: 'valA53', fieldB: 'valB53'},
    {pkField: 54, fieldA: 'valA54', fieldB: 'valB54'},
    {pkField: 55, fieldA: 'valA55', fieldB: 'valB55'},
    {pkField: 56, fieldA: 'valA56', fieldB: 'valB56'},
    {pkField: 57, fieldA: 'valA57', fieldB: 'valB57'},
    {pkField: 58, fieldA: 'valA58', fieldB: 'valB58'},
    {pkField: 59, fieldA: 'valA59', fieldB: 'valB59'},
    {pkField: 60, fieldA: 'valA60', fieldB: 'valB60'},
    {pkField: 61, fieldA: 'valA61', fieldB: 'valB61'},
    {pkField: 62, fieldA: 'valA62', fieldB: 'valB62'},
    {pkField: 63, fieldA: 'valA63', fieldB: 'valB63'},
    {pkField: 64, fieldA: 'valA64', fieldB: 'valB64'},
    {pkField: 65, fieldA: 'valA65', fieldB: 'valB65'},
    {pkField: 66, fieldA: 'valA66', fieldB: 'valB66'},
    {pkField: 67, fieldA: 'valA67', fieldB: 'valB67'},
    {pkField: 68, fieldA: 'valA68', fieldB: 'valB68'},
    {pkField: 69, fieldA: 'valA69', fieldB: 'valB69'},
    {pkField: 70, fieldA: 'valA70', fieldB: 'valB70'},
    {pkField: 71, fieldA: 'valA71', fieldB: 'valB71'},
    {pkField: 72, fieldA: 'valA72', fieldB: 'valB72'},
    {pkField: 73, fieldA: 'valA73', fieldB: 'valB73'},
    {pkField: 74, fieldA: 'valA74', fieldB: 'valB74'},
    {pkField: 75, fieldA: 'valA75', fieldB: 'valB75'},
    {pkField: 76, fieldA: 'valA76', fieldB: 'valB76'},
    {pkField: 77, fieldA: 'valA77', fieldB: 'valB77'},
    {pkField: 78, fieldA: 'valA78', fieldB: 'valB78'},
    {pkField: 79, fieldA: 'valA79', fieldB: 'valB79'},
    {pkField: 80, fieldA: 'valA80', fieldB: 'valB80'},
    {pkField: 81, fieldA: 'valA81', fieldB: 'valB81'},
    {pkField: 82, fieldA: 'valA82', fieldB: 'valB82'},
    {pkField: 83, fieldA: 'valA83', fieldB: 'valB83'},
    {pkField: 84, fieldA: 'valA84', fieldB: 'valB84'},
    {pkField: 85, fieldA: 'valA85', fieldB: 'valB85'},
    {pkField: 86, fieldA: 'valA86', fieldB: 'valB86'},
    {pkField: 87, fieldA: 'valA87', fieldB: 'valB87'},
    {pkField: 88, fieldA: 'valA88', fieldB: 'valB88'},
    {pkField: 89, fieldA: 'valA89', fieldB: 'valB89'},
    {pkField: 90, fieldA: 'valA90', fieldB: 'valB90'},
    {pkField: 91, fieldA: 'valA91', fieldB: 'valB91'},
    {pkField: 92, fieldA: 'valA92', fieldB: 'valB92'},
    {pkField: 93, fieldA: 'valA93', fieldB: 'valB93'},
    {pkField: 94, fieldA: 'valA94', fieldB: 'valB94'},
    {pkField: 95, fieldA: 'valA95', fieldB: 'valB95'},
    {pkField: 96, fieldA: 'valA96', fieldB: 'valB96'},
    {pkField: 97, fieldA: 'valA97', fieldB: 'valB97'},
    {pkField: 98, fieldA: 'valA98', fieldB: 'valB98'},
    {pkField: 99, fieldA: 'valA99', fieldB: 'valB99'},
    {pkField: 100, fieldA: 'valA100', fieldB: 'valB100'}
];

isc.RestDataSource.create({
    ID: "DS_$$",
    testData: data_$$,
    clientOnly: true,
    fields: [
        {name: "pkField", type: "sequence", primaryKey: true, hidden: true},
        {name: "fieldA", type: "text"},
        {name: "fieldB", type: "text"}
    ]
});

isc.ListGrid.create({
    ID: "list_$$",
    height: "100%",
    width: "100%",
    autoFetchData: true,
    dataSource: DS_$$,
    showFilterEditor: true,
    sortField: "fieldA",
  allowFilterExpressions:true,
    fields: [
        {name: "fieldA"},
        {name: "fieldB"}
    ]
});

we tried the same example with version: "v10.0p_2015-02-19/LGPL Deployment" and it worked ok

Also, probably related to this, the filterExpression feature is not working on your live demo:
http://www.smartclient.com/#expressionFilter
if you try to filter on it using a simple string value you get no response from the grid and this error on the console:
"Uncaught TypeError: Cannot read property 'length' of undefined"
the same example works fine on

http://www.smartclient.com/docs/10.0/a/system/reference/SmartClient
_Explorer.html#expressionFilter

please advice.
best regards

Bug in Timeline? setTitleField seem to have no effect.

$
0
0
Hi there, what the title says. I create a timeline like this:
Code:

GenericTimeline calendar = new GenericTimeline(ds, laneDs, MyConstants.FIELD_FULLNAME);

Date begin = new Date();
Date end = new Date();
CalendarUtil.addMonthsToDate(end, 1);
calendar.setStartDate(begin);
calendar.setEndDate(end);
calendar.setCanEditLane(false);
calendar.setShowEventDescriptions(true);
calendar.setTitleField(MyConstants.FIELD_LOCATIONNAME);
calendar.setDescriptionField("note");

The description field changes when i change "setDescriptionField", but the title seems to always be the same as the laneNameField i passed into the constructor, no matter what i set in "setTitleField".

Exception when adding event hovercustomizer to timeline

$
0
0
I think i might have found another bug. I added a simple hovercustomizer to my timeline, just to see if it works. Doesn't seem like it.
Code:

Timeline calendar = new Timeline();
calendar.setDataSource(dataSource);
calendar.setAutoFetchData(true);
...
calendar.setEventHoverHTMLCustomizer(new EventHoverHTMLCustomizer() {
            @Override
            public String getEventHoverHTML(CalendarEvent calendarEvent, EventWindow eventWindow) {
                return "BANANA!!";
            }
        });

causes exception to be thrown in the browser:
Code:

Uncaught exception: java.lang.ClassCastException
    at java.lang.Class.cast(Class.java:3047)
    at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:163)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:65)
    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:356)
    at sun.reflect.GeneratedMethodAccessor396.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.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(Thread.java:695)

[bug] DynamicForm.valuesHaveChanged() returns always true after saveData() call

$
0
0
Hi,
I've noticed that DynamicForm.valuesHaveChanged() always returns true then i call saveData().

Problem is that I have a field in datasource which is only generated by server side. `added_at` datetime.

I've declared that field in frontend DataSource as
Code:

                    {
                        name: "addedAt",
                        type: "datetime",
                        disabled: true,
                        useTextField: true,
                        shouldSaveValue: false
                    },

Problem is in DynamicForm._saveDataReply : function (request, response, data)
Code:

                var compareVal = submittedValues[i] === undef ? this._oldValues[i] : submittedValues[i];
                var field = this.getField(i);  // <- (1) HERE WE COMPARING FIELD VALUES WITH SERVER RETURNED VALUE
                // check whether the form item has changed since submission
                if (this.fieldValuesAreEqual(field, currentValues[i], compareVal)) {
                    // if not, check whether the server changed the submitted value to
                    // something else
                    if (!this.fieldValuesAreEqual(field, compareVal, data[i])) {
                        currentValues[i] = data[i];
                        hasChanges = true;
                    }

                } else {
                    // value in the form has changed since being submitted
                    rememberValues = false;  // <-- (2) HERE, REMEMBER VALUES ARE SET TO FALSE
                }

You can see from code that (1) is comparing current dynamic field value with server response, and do not check is this field is even disabled or shouldSaveValue: false;
so then server returns a response with `added_at` value, this logic acts like dynamic form `added_at` is changed and (2) logic applies, so after save success, rememberValues() is not called, and I always getting
DynamicForm.valuesHaveChanged() true. And all field aren't remembered.

Please add into (1) a bypass if field has shouldSaveValue:false or disabled:true, maybe should bypass if field do not exists on dynamicform at all.

Actually it's deeper problem, because all fields which was edited is now treated like as not persisted, and
DynamicForm.valuesHaveChanged(true) returns all edited fields which was saved.

Suggestion:
I suggest not to call rememberValues() for all fields at once, but use one by one field values to set to _oldValues[] array if it was correctly persisted.

Tested on: v10.0p_2015-07-25/LGPL Deployment
But I think all versions are affected by this.

Thanks.

ListGrid.exportData() has problems with nvarchar(max)

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

Browser is Chrome 44.0.2403.130 m

We built a button that uses ListGrid.exportData to enable the user to export data from the ListGrid GUI to an excel file.

This works mostly fine. But now I have a table in my MSSQL DB that uses nvarchar(max) for the description column of my table and I use the following datasource xml:

<DataSource ID="tempReport_isc_TimeTrackReport_0_645" serverType="sql" dataSourceVersion="1" dbName="CamCache" databaseName="CamCache" ispublic="true" schema="dbo" dbTable="tempReport_isc_TimeTrackReport_0_645" tableName="tempReport_isc_TimeTrackReport_0_645">
<fields>
…
<field name="Description" type="text" length="80000" title="Description”/>
</fields>
</DataSource>

When I load the table tha data is displayed correctly in the GUI. But when I export the data and open the excel file the description column, does not contain the displayed text but "java.io.BufferedReader@1846614b".
This also happens when I export to CSV.

When I change my DB to nvarchar(800) and the length in datasource to 800, everything works fine / is exported correctly.

So, what do I have to specify in my datasource xml that it exports the nvarchar(max) field correctly to excel?

Best Regards

Is it possible to dynamically change the orientation of a layout?

$
0
0
Hi,

I want to make a Layout that behaves like a VLayout when in portrait mode and a HLayout in landscape mode. I tried using the following code, but it has no effect:
Code:

isc.Layout.create({ID:"layout", autoDraw:false, members:[pane1, pane2]});
function oChange() {
  if (isc.Page.getOrientation() == "portrait")
    layout.orientation = "vertical";
  else if (isc.Page.getOrientation() == "landscape")
    layout.orientation = "horizontal";
  layout.reflow();
}
isc.Page.setEvent("orientationChange", oChange);

My function gets called when orientation is changed, but doesn't seem to have any effect. I have also tried calling layout.layoutChildren() and layout.redraw() to no avail.
Is it possible to achieve what I'm trying to do?

regards,
Andrew

Resize listgridfield according to title fails

$
0
0
Hi,
I have found some behaviour which shouldn't be so like state in the documentation.


Here you can see what happens using autoFitField. This method is also used if you doubeclick on the separator between the row-header.

In the documentation this the fit is happening the content or the title of the listgridfield. You can see in the gif, that the only thing which is considered is the content of the field.
Code:

int autoFitField (fieldName)

Programmatically cause a field to auto-fit horizontally to it's contents or title.
Does not establish permanent auto-fitting - use ListGrid.setAutoFitWidth() to do so.

Parameters:
    fieldName  - type: String

Is there a additional attribute, which has to be set for considering not only content of the row, but also the title of the row?

Here is the code for reproduction:
Code:

isc.ListGrid.create({
        "ID" : "theListGrid",
        "width" : "400",
        "alternateRecordStyles" : true,
        "modalEditing" : true,
        "fields" :
        [
                {
                        "name" : "long",
                        "title" : "Longer title",
                        "type" : "text",
                        "canEdit" : false
                }, {
                        "name" : "short",
                        "title" : "Shorter title",
                        "type" : "text",
                        "canEdit" : false
                }
        ],

        "data" :
        [{
                        "long" : "abc",
                        "short" : "This is a long text to show the resize behaviour",
                }, {
                        "long" : "abc",
                        "short" : "shorten",
                }
        ]
});
isc.Button.create({
        "action" : function () {
                theListGrid.autoFitField("long");
        },
        "title" : 'autofit first',
        top : 100,
        left : 0
});
isc.Button.create({
        "action" : function () {
                theListGrid.autoFitField("short");
        },
        "title" : 'autofit second',
        top : 100,
        left : 100
});

Best regards

How to overwrite interface methods

$
0
0
Not sure whether this question has been asked before, but I couldn't find it. Given this situation:

Code:

isc.defineInterface('MyInterface').addInterfaceProperties({
  myMethod: function () {
    doSomething();
  }
});

isc.defineClass('MyClass', isc.VLayout, isc.MyInterface).addProperties({
  myMethod: function () {
    this.Super('myMethod', arguments);
});

When MyClass.myMethod() is invoked, it doesn't call doSomething(). That's why I changed MyClass to:

Code:

isc.defineClass('MyClass', isc.VLayout, isc.MyInterface).addProperties({
  myMethod: function () {
    isc.MyInterface.getPrototype().myMethod.apply(this, arguments)
});

Is this the way to do it, or should working with interfaces and overwriting a method in it, be done differently?

Export png from Drawpane in firefox

$
0
0
Hi,
I'm trying to get the Drawpane with "export" to work.
We only have users with IE9 or higher so working with dataURL should work just fine.

I have build a simple example, but everytime i click the getDataURL button, there is a request to the server (which might not be needed).


This happens in Firefox (latest version) and also in latest version of chrome.
Is there some attribute missing? Like an example on the Feature-Page I have experimented with "isc.DrawPane.neverUsePNGWorkaround", but in both cases (true and false) the event to the server is called.

Code:

isc.DrawPane.neverUsePNGWorkaround = false;

var mainPane = isc.DrawPane.create({
                ID : "myDrawpane",
                autoDraw : false,
                showEdges : true,
                name : "man",
                width : 300,
                height : 100
        });
isc.DrawImage.create({
        left : 150,
        top : 30,
        width : 16,
        height : 16,
        src : "http://ilotok.de/catalog/view/theme/default/image/icon_user.png",
        keepInParentRect : true,
        drawPane : mainPane,
        useMatrixFilter : true
});

isc.DrawLabel.create({
        autoDraw : true,
        drawPane : mainPane,
        left : 150,
        top : 45,
        contents : "my name"
}, {
        fontFamily : "Arial",
        fontSize : 11
});

form = isc.VLayout.create({
                ID : "imageExportSideLayout",
                width : 250,
                membersMargin : 20,
                members : [
                        isc.IButton.create({
                                ID : "getDataURLButton",
                                title : "Get Data URL",
                                click : function () {
                                        var getDataURLRes = myDrawpane.getDataURL(function (dataURL) {
                                                        snapshotImg.setSrc(dataURL);
                                                });
                                }
                        }),
                        isc.Img.create({
                                ID : "snapshotImg",
                                border : "3px solid blue",
                                width : 300,
                                height : 100
                        })
                ]
        });

isc.HStack.create({
        width : "100%",
        id : "test",
        members : [mainPane, form]
});

Best regards

[BUG] TimeItem in ListGrid loses value

$
0
0
hi,
I'm experiencing a bug with the inline editing of a TimeItem which uses input mask.

Step to reproduce BUG:
1. Start editing any row and type a valid time value like 18:30
2. Keep the row editor open and move (by clicking or tabbing) to the next field (continent)
3. The TimeItem loses his value and also the validation seems to be pretty messed up.

I've noticed that removing "editorProperties: {useMask: true}" the bug disappear.

1.ISC Versions:
  • SNAPSHOT_v10.1d_2015-08-16/EVAL Development Only
  • v10.0p_2015-08-20/Enterprise Development Only


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

6. Snippet of code to test in this example page
Code:

isc.ListGrid.create({
    ID: "countryList",
    width:550, height:224, alternateRecordStyles:true, cellHeight:22,
    // use server-side dataSource so edits are retained across page transitions
    dataSource: countryDS,
autoSaveEdits:false,
    // display a subset of fields from the datasource
    fields:[
        {name:"countryCode", title:"Flag", width:40, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png", canEdit:false},
        {name:"countryName"},
        {name: "OUT",
            type: "time",
            timeFormatter: "toShortPadded24HourTime",
            editorType: "TimeItem",
            editorProperties: {useMask: true},
            required: true},
        {name:"continent"},
        {name:"member_g8"},
        {name:"population"},
        {name:"independence"}
    ],
    autoFetchData: true,
    canEdit: true,
    editEvent: "click"
});

Policy file generation between smartgwt 2.5p1 and 3.1

$
0
0
I have an application which I want to upgrade from smartgwt2.5p1 to 3.1. Under the (ancient) 2.5 version everything works beautifully. But when I use 3.1 (or 4.0 / 5.0) libraries, gwt complains the policy files could not be found when I running it.

Which is odd because:
* all objects are serializable
* all objects involved have an zero argument contstructor
* all fields are serializable.

(also see http://stackoverflow.com/questions/9...ationexception)

Because on this forum GWT errors are not to be discussed, my question is, why do I have issues running with smart-gwt 3.1 but not in 2.5? The GWT version is the same (2.6), codebase is the same and configuration is the same.


Update:
The issue has been fixed. Appearently one object instance was not serializable. Still wondering why smart-gwt 2.5 did not mind.
Viewing all 4756 articles
Browse latest View live