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

Maximize size of Zoomable DrawPane inside Canvas without flickering

$
0
0
SmartGwt Pro 4.1
FireFox 25.0.1


If screen is maximized after browser, opens, canvas (colored red) is visible behind drawpane (blue).

In method, initDrawPane, if width and height are set to 100 instead of canvas viewport size, page opens up with flickering. Maybe due to zoomSliderValueChangeHandler updating itself to make panel bigger.

Code:

import com.google.gwt.core.client.EntryPoint;

import com.smartgwt.client.types.Overflow;
import com.smartgwt.client.types.VisibilityMode;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.ImgButton;
import com.smartgwt.client.widgets.Slider;
import com.smartgwt.client.widgets.drawing.DrawPane;
import com.smartgwt.client.widgets.events.ValueChangedEvent;
import com.smartgwt.client.widgets.events.ValueChangedHandler;
import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.SectionStack;
import com.smartgwt.client.widgets.layout.SectionStackSection;
import com.smartgwt.client.widgets.layout.VLayout;
import com.smartgwt.client.widgets.menu.Menu;
import com.smartgwt.client.widgets.menu.MenuBar;
import com.smartgwt.client.widgets.menu.MenuItem;
import com.smartgwt.client.widgets.tab.TabSet;


public class Test1 implements EntryPoint { 
   
    private static int MENU_HEIGHT = 18;
    private static int MENU_SHADOW_DEPTH = 10;

    private static int PALETTE_HEIGHT = 18;
   
    private VLayout layout;
    private MenuItem newItem, openItem, saveAs;
    private ImgButton  createLinksButton;
    private VLayout infoPanel;
    private Canvas drawCanvas;
    private DrawPane drawPane;
    private HLayout zoomSliderPanel;
    private Slider zoomSlider;
    private SectionStack sectionStack;
    private SectionStackSection componentsSection;
    private TabSet componentTabSet;

   
    public void onModuleLoad() {
        doLayout();
    }
   
    public void doLayout() {
        HLayout menuContainer = new HLayout();
        menuContainer.setHeight(MENU_HEIGHT);
        menuContainer.setWidth100();
        MenuBar menuBar = new MenuBar();
        menuBar.setBackgroundColor("pink");
        menuBar.setWidth100();
        menuContainer.addMember(menuBar);

        Menu fileMenu = new Menu();
        fileMenu.setTitle("File");
        fileMenu.setShowShadow(true);
        fileMenu.setShadowDepth(MENU_SHADOW_DEPTH);
        fileMenu.setWidth(100);
        newItem = new MenuItem("New");
       
        newItem.addClickHandler(new com.smartgwt.client.widgets.menu.events.ClickHandler() {
            public void onClick(com.smartgwt.client.widgets.menu.events.MenuItemClickEvent p1) {                               
            }
        });
       
       
        openItem = new MenuItem("Open");
        saveAs = new MenuItem("Save As");
        fileMenu.setItems(newItem, openItem, saveAs);
        Menu[] menus = new Menu[1];
        menus[0] = fileMenu;
        menuBar.addMenus(menus, 0);       

        HLayout paletteContainer = new HLayout(5);
        paletteContainer.setBackgroundColor("black");
        paletteContainer.setHeight(PALETTE_HEIGHT);
        paletteContainer.setWidth100();
       

        //        // The rest of the information takes up the remaining place
        infoPanel = new VLayout();
        infoPanel.setBackgroundColor("Yellow");
        infoPanel.setWidth100();
        infoPanel.setHeight("*");


        // 70% for the remaining height for drawing and detail
        HLayout drawDetailPanel = new HLayout();
        drawDetailPanel.setShowResizeBar(true);
        drawDetailPanel.setWidth100();
        drawDetailPanel.setHeight("70%");
        drawCanvas = new Canvas();
        drawCanvas.setShowResizeBar(true);
        drawCanvas.setBackgroundColor("red");
        drawCanvas.setWidth("70%");
        drawCanvas.setHeight100();
        drawCanvas.setOverflow(Overflow.AUTO);
       

       


        Canvas compDetail = new Canvas();
        compDetail.setWidth("30%");
        compDetail.setHeight100();
        compDetail.setBackgroundColor("green");
        drawDetailPanel.addMember(drawCanvas);
        drawDetailPanel.addMember(compDetail);

       
        // Zoom slider panel
        zoomSliderPanel = new HLayout();
        zoomSliderPanel.setBackgroundColor("grey");
        zoomSliderPanel.setWidth100();
        zoomSliderPanel.setHeight(20);
       
       
        componentsSection = new SectionStackSection();
        componentsSection.setTitle("Components Section");
        componentsSection.setExpanded(true);

        sectionStack = new SectionStack();
        sectionStack.setWidth100();
        sectionStack.setHeight("*");
        sectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
        sectionStack.setAnimateSections(true);
        sectionStack.setOverflow(Overflow.AUTO);
        sectionStack.setSections(componentsSection);
        //


        //
        infoPanel.addMember(drawDetailPanel);
        infoPanel.addMember(zoomSliderPanel);
        infoPanel.addMember(sectionStack);

        layout = new VLayout();
        layout.setWidth100();
        layout.setHeight100();
        layout.addMember(menuContainer);
        layout.addMember(paletteContainer);
        layout.addMember(infoPanel);
        layout.draw();
       
        initPanelsForNewModel();
       
       
       
       
       




    }
   
    public void initPanelsForNewModel() {
        initDrawPane();

       
       
        // Zoom handler
        ValueChangedHandler zoomSliderValueChangeHandler = new ValueChangedHandler() { 
            @Override 
            public void onValueChanged(ValueChangedEvent event) {

               
                int canvasWidth = drawCanvas.getWidth();
                int canvasHeight = drawCanvas.getHeight();
               
                Slider sliderItem = (Slider) event.getSource();
                // When we zoom, make the panel bigger - That way we can see everything. 
                double value = sliderItem.getValueAsDouble();
                if (1.0d < value) {
                    drawPane.resizeTo(new Double(value  * canvasWidth).intValue(), new Double(value * canvasHeight).intValue());
                }
                drawPane.zoom(sliderItem.getValueAsDouble()); 
            } 
        };
        if (null == zoomSlider) {
            zoomSlider = new Slider(); 
            zoomSlider.setMinValue(.10d); 
            zoomSlider.setMaxValue(3.0d); 
            zoomSlider.setNumValues(300); 
            zoomSlider.setWidth(500);
    //            zoomSlider.setHeight(20);
            zoomSlider.setValue(1.0d); 
            zoomSlider.setRoundValues(false); 
            zoomSlider.setRoundPrecision(2); 
            zoomSlider.setTitle("Zoom Shapes"); 
            zoomSlider.setVertical(false); 
            zoomSlider.addValueChangedHandler(zoomSliderValueChangeHandler);
            zoomSliderPanel.addMember(zoomSlider);
            zoomSlider.draw();
        }
       

        componentsSection.addItem(componentTabSet);
       
        // Draw with newly added grids.
        //sectionStack.draw();
    //        sectionStack.draw();
    //        infoPanel.draw();

        componentsSection.setExpanded(true);       
    }

    private void initDrawPane() {
        if (null == drawPane) {
            drawPane = new DrawPane();

            drawPane.setBackgroundColor("blue");
            drawPane.setCanDrag(true); // Enables draw items inside drawPane to drag
            drawPane.setCanAcceptDrop(true);
            drawPane.setShowEdges(true);
            drawPane.setEdgeSize(4);


            //            drawPane.setWidth100();
            //            drawPane.setHeight100();
            drawPane.setWidth(drawCanvas.getViewportWidth());
            drawPane.setHeight(drawCanvas.getViewportHeight());

            drawCanvas.addChild(drawPane);

        } else {
            drawPane.clear();
        }
        drawPane.redraw();
    }
}


Hovers on grids with expansion grids sometimes apply to parent record

$
0
0
Using SmartClient Pro 9.0 - 12/5/2013 nightly build
Testing in Firefox 25.0.1

I've got a case where I have a grid, and that grid has an expansion grid that you can open up under each row of the main grid. Both the main grid, and the expansion grid, I need to show detail when the user hovers over a certain thing. This has been working fine until now, but I notice now that randomly, hovering over one of the child rows actually invokes the hover event for the parent row. It will act as if the user hovered over the field that is in that same horizontal position in the parent row, but vertically, the mouse is actually in one of the child rows.

It is very intermittent, and there are no JavaScript errors in the console. Depending on what screen I'm working with, it happens anywhere from 10% of the time, to 50% of the time. The attached screenshot illustrates this while hovering over a child record cell, but it also sometimes happens while hovering over the expansion grid's header cells.

I'll attach a reproducible test case momentarily.

Attached Images
File Type: jpg grid_screenshot.jpg (35.4 KB)

Cross-site scripting and http status 403 error

$
0
0
We are currently using DynamicDSGenerator to create dynamic data sources.

Somehow, the requests to get data sources get blocked by a software called SiteMinder that our customers have.

The error message when we got:

"Due to the presence of characters known to be used in Cross Site Scripting attacks, access is forbidden. This web site does not allow Urls which might include embedded HTML tags."

We inspected the call and found the request looks like this:

/portal/sc/DataSourceLoader?dataSource=SearchResults_1.1&isc_ rpc=1&isc_v=v8.3p_2013-02-14&isc_xhr=1&isc_tnum=4&_transaction=%3Ctransactio n%20xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F200 0%2F10%2FXMLSchema-instance%22%20xsi%3Atype%3D%22xsd%3AObject%22%3E%3 CtransactionNum%20xsi%3Atype%3D%22xsd%3Along%22%3E 4%3C%2FtransactionNum%3E%3Coperations%20xsi%3Atype %3D%22xsd%3AList%22%3E%3Celem%3E__ISC_NULL__%3C%2F elem%3E%3C%2Foperations%3E%3C%2Ftransaction%3E&pro tocolVersion=1.0 HTTP/1.1

After URL decoding the URL, it looks like this:

/portal/sc/DataSourceLoader?dataSource=SearchResults_1.1&isc_ rpc=1&isc_v=v8.3p_2013-02-14&isc_xhr=1&isc_tnum=4&_transaction=<transaction xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:type="xsd:Object"><transactionNum xsi:type="xsd:long">4</transactionNum><operations xsi:type="xsd:List"><elem>__ISC_NULL__</elem></operations></transaction>&protocolVersion=1.0

My question is whether it's possible to not have HTML embedded in the URL since some security software may block that kind of request.

using treegrid, horizontal scroll appears whenever vertical scroll is needed

$
0
0
v91d_10-08-13
Chrome and IE 9

When the screen is shrunk vertically and the vertical scroll bar appears, the horizontal bar also appears, even if its not needed. I've attached a standalone sample that replicates the behavior. I'm hoping there's a way to get only the scroll bar that's needed to appear.

Attached Files
File Type: html treesample.html (19.3 KB)

Drag operation does not work

$
0
0
SmartGWT pro version 4.1.d
Firefox 25.0.1

Click handler fires and move by moves everything in group. However, Left clicking on DrawRect and dragging does not work.

public void onModuleLoad() {
new DrawPane(){{
setWidth(640);
setHeight(480);
setCanDrag(true);
setBackgroundColor("#D9E4F6");
addDrawItem(new DrawGroup(){{
setTop(0);
setLeft(0);
setWidth(32);
setHeight(32);
setDrawItems(new DrawRect(){{
setHeight(32);
setWidth(32);
}}, new DrawLabel(){{
setTop(10);
setContents("Foo Bar");
}});
addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
SC.say("yahoo!");
}
});
setCanDrag(true);
moveBy(40,40);
}}, true);
}}.draw();
}

How to always show opener in TreeGrid

$
0
0
I'm trying to build a dynamic tree with TreeGrid. I use setData(Tree) on the TreeGrid, and then call add(TreeNode, parentPath) on the Tree to populate the nodes.

When a node is first added to the Tree, I have setIsFolder(true), so when the node is displayed there is an opener (+) shown in front of the node folder icon, even there are no children nodes added under it, which is expected, since I will add children in the TreeGrid's FolderOpenedHandler.

Now in the TreeGrid's FolderClosedHandler, I need to remove all the children nodes under the node to be closed. The node is closed, it's still displayed as a folder, but the opener disappears. And the folder can still be opened with double click. I guess it's because all its children have been removed, but I want it to be the same as when it's first added - an opener is shown just because isFolder is true even no children exist.

I tried to even remove the node itself and add it again with isFolder as true, but still no opener displayed.

Loading a DataSource twice

$
0
0
Hello,

I tried to load a DS twice for two DynamicForms with different permissions (which were set by Declarative Security).
The permissions of the fields are depending on the database record status. In the first status some fields are visible on the first form, in the second status some fields are disable on the second form (it is what I want to do).

In the .ds.xml file the addGlobalId is set to "false". So there is no collision. But I cannot achieve the two different DS separately on the two forms because the IDs are same. I always get the last loaded DS.

Questions:
- Are there two datasource objects on the client if I set the addGlobalId parameter to "false" in the ds.xml file?
- How can I get the datasources without using Id on the client?

Thank you

setOverflow(Overflow.HIDDEN) and text-align:center

$
0
0
In SmartGWT 4.0p (Chrome 31), when using a Button, setOverflow(Overflow.HIDDEN) sets the inline CSS as:

style="overflow:hidden;text-overflow:ellipsis;text-align:left"

for example. This overrides what you have set for setAlign(). If you want your button's text to be centered, there appears to be no way to do that if you want overflow hidden. Is there a way to do this? In 3.1p you could still have the button's text centered while using setOverflow(Overflow.HIDDEN).

Thanks

HiddenItem not included in form POST (Mobile SmartGWT)

$
0
0
I am using Mobile Smart GWT (2013-12-04 build) and when I use HiddenItems within a form they are never included in the POST sent to the server. TextItem and other FormItem elements are sent in the message but no matter what I do the HiddenItem items are not sent to the server. I looked at the raw message and they are missing.

I am submitting the form with a POST and using Multipart (as part of a file upload).

Thank you

issue with simple criteria with latest nightly build

$
0
0
I've just downloaded the 12/09 and 12/10 nightly builds of 4.1d and I'm seeing odd behavior in my application. Did something change with the way Criteria objects are handled? My application issues a request with a Criteria:
Code:

                final DataSource usersDS = DataSource.get("Users");
                usersDS.fetchData(new Criteria("Userid", user),null);

which gets passed to the server with the _constructor:AdvancedCriteria tag
Code:

{
    "actionURL":"http://beer-irv-dev01:32144/beer/sc/IDACall",
    "showPrompt":true,
    "transport":"xmlHttpRequest",
    "promptStyle":"cursor",
    "bypassCache":true,
    "data":{
        "criteria":{
            "Userid":"riiff",
            "_constructor":"AdvancedCriteria"
        },
        "operationConfig":{
            "dataSource":"Users",
            "repo":null,
            "operationType":"fetch"
        },
        "appID":"builtinApplication",
        "operation":"Users_fetch",
        "oldValues":{
            "Userid":"riiff",
            "_constructor":"AdvancedCriteria"
        }
    }
}

And is then ignored on the server - notice the WHERE 1=1 below:
Code:

=== 2013-12-10 10:32:14,854 [l0-3] DEBUG RPCManager - Request #1 (DSRequest) payload: {
    criteria:{
        Userid:"riiff",
        _constructor:"AdvancedCriteria"
    },
    operationConfig:{
        dataSource:"Users",
        operationType:"fetch"
    },
    appID:"builtinApplication",
    operation:"Users_fetch",
    oldValues:{
        Userid:"riiff",
        _constructor:"AdvancedCriteria"
    }
}
=== 2013-12-10 10:32:14,854 [l0-3] INFO  IDACall - Performing 1 operation(s)
=== 2013-12-10 10:32:14,854 [l0-3] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
=== 2013-12-10 10:32:14,855 [l0-3] DEBUG DeclarativeSecurity - DataSource Users is not in the pre-checked list, processing...
=== 2013-12-10 10:32:14,855 [l0-3] DEBUG AppBase - [builtinApplication.Users_fetch] No userTypes defined, allowing anyone access to all operations for this application
=== 2013-12-10 10:32:14,856 [l0-3] DEBUG AppBase - [builtinApplication.Users_fetch] No public zero-argument method named '_Users_fetch' found, performing generic datasource operation
=== 2013-12-10 10:32:14,856 [l0-3] INFO  SQLDataSource - [builtinApplication.Users_fetch] Performing fetch operation with
        criteria: {Userid:"riiff",_constructor:"AdvancedCriteria"}        values: {Userid:"riiff",_constructor:"AdvancedCriteria"}
=== 2013-12-10 10:32:14,857 [l0-3] INFO  SQLDataSource - [builtinApplication.Users_fetch] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
=== 2013-12-10 10:32:14,857 [l0-3] INFO  SQLDataSource - [builtinApplication.Users_fetch] 1372: Executing SQL query on 'BEER': SELECT Users.AccountStatus, Users.Bus_Unit_Code, Users.Department, Users.Dept_No, Users.Email, Users.Extension, Users.FullName, Users.LOB_Abbr, Users.Location, Users.PK_Users_Userid, Users.Phone, Users.SuperUser, Users.Userid FROM Users WHERE '1'='1'
=== 2013-12-10 10:32:14,858 [l0-3] DEBUG PoolableSQLConnectionFactory - [builtinApplication.Users_fetch] DriverManager fetching connection for BEER via jdbc url jdbc:sqlserver://db-beer.broadcom.com:1433;DatabaseName=BEER;User=SmartGWT_UI;Password=Kepler12
=== 2013-12-10 10:32:14,858 [l0-3] DEBUG PoolableSQLConnectionFactory - [builtinApplication.Users_fetch] Passing JDBC URL only to getConnection
=== 2013-12-10 10:32:14,872 [l0-3] DEBUG PoolableSQLConnectionFactory - [builtinApplication.Users_fetch] makeObject() created an unpooled Connection '563330712'
=== 2013-12-10 10:32:14,873 [l0-3] DEBUG SQLConnectionManager - [builtinApplication.Users_fetch] Borrowed connection '563330712'
=== 2013-12-10 10:32:14,883 [l0-3] DEBUG SQLTransaction - [builtinApplication.Users_fetch] Started new BEER transaction "563330712"
=== 2013-12-10 10:32:14,884 [l0-3] DEBUG SQLDriver - [builtinApplication.Users_fetch] About to execute SQL query in 'BEER' using connection '563330712'
=== 2013-12-10 10:32:14,884 [l0-3] INFO  SQLDriver - [builtinApplication.Users_fetch] Executing SQL query on 'BEER': SELECT Users.AccountStatus, Users.Bus_Unit_Code, Users.Department, Users.Dept_No, Users.Email, Users.Extension, Users.FullName, Users.LOB_Abbr, Users.Location, Users.PK_Users_Userid, Users.Phone, Users.SuperUser, Users.Userid FROM Users WHERE '1'='1'

I did not see this behavior with the 11/26 build.

ListGrid -- endEditing callback

$
0
0
Hi,

As listGrid.endEditing() is an Asynchronous call, We are unable to do some business logic after completion of endEditing().

So, Is there any possibility to have a callback after completion of endEditing() in ListGrid.

Please give us an idea to achieve the above.

We are working on the below environment:

Version:Isomorphic SmartClient/SmartGWT Framework (v9.0p_2013-10-26/PowerEdition Deployment 2013-10-26)

Browser: Internet Explorer 8

Server: WebSphere 7.0

Database : DB2

OS : Z/OS

Thanks in Advance.

Syntax question: Which grid rows are expanded?

$
0
0
SmartClient 9.0:

In a ListGrid where canExpandRecords = true, is there a quick way to gather an array of all records that are currently expanded?

At the moment, I'm trying to loop through listgrid.data(), and checking listGrid.isExpanded(record), but the performance is pretty poor.

It seems like there ought to be a listGrid.getExpanded() function, but I'm not seeing anything like that in the documentation.

Thanks!

DrawItem grouping and ungrouping breaks DrawItem.canDrag

$
0
0
Code:

        @Override
        public void onModuleLoad() {
                final DrawPane pane = new DrawPane();
                final DrawOval circle = new DrawOval();
                circle.setTop(200);
                circle.setLeft(200);
                circle.setRadius(4);
                circle.setCanDrag(true);
                pane.addDrawItem(circle,  true);
                pane.setCanDrag(true);
                pane.setWidth100();
                pane.setHeight("*");
                new VLayout(){{
                        setWidth100();
                        setHeight100();
                        addMember(pane);
                        addMember(new HLayout(4){{
                                setPadding(4);
                                setAutoHeight();
                                final DrawGroup group = new DrawGroup();
                                group.setDrawItems(new DrawItem[]{circle});
                                addMember(new Button("Group"){{
                                        addClickHandler(new ClickHandler() {
                                                @Override
                                                public void onClick(ClickEvent event) {
                                                        pane.addDrawItem(group, true);
                                                }
                                        });
                                }});
                                addMember(new Button("Ungroup"){{
                                        addClickHandler(new ClickHandler() {
                                                @Override
                                                public void onClick(ClickEvent event) {
                                                        group.erase();
                                                }
                                        });
                                }});
                        }});
                }}.draw();                       
        }

Circle is drag-able initially. Click on the group button, still drag-able. Click on the ungroup button, no longer drag-able.

SGWT: 4.0p
FF: 25.0.1

Can we use 'Selenium' with smartgwt 4.0 ?

$
0
0
v9.0_2013-11-24/AllModules Deployment (built 2013-11-24)

FireFox, Crome, IE

We are using smartgwt 4.0 for our project. We want to use "Selenium" for test automation.

Is that possible to use "Selenium" with smartgwt4 ?

If we can use, what are the practices that we should follow. And also let us know, if there are any features which are not properly working.

Class Cast Exception when using dsresponse.setData()

$
0
0
I have attached ds.xml file and java file SmartGWT.java which is called on module load and LoginDMI.In which I am Writing own code for fetching.
When I do response.getData() in SmartGwt.java then i get this stack trace.

13:54:04.830 [ERROR] [smartgwt] Uncaught exception escaped

java.lang.ClassCastException: java.lang.String cannot be cast to com.google.gwt.core.client.JavaScriptObject
at com.smartgwt.client.util.JSOHelper.getAttributeAsJ avaScriptObject(JSOHelper.java)
at com.smartgwt.client.core.DataClass.getAttributeAsJ avaScriptObject(DataClass.java:236)
at com.smartgwt.client.data.DSResponse.getData(DSResp onse.java:260)
at com.wipro.SmartGWTProject.client.SmartGWT$1$1.exec ute(SmartGWT.java:122)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(Meth odAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(Met hodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invok e(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reac tToMessagesWhileWaitingForReturn(BrowserChannelSer ver.java:337)
at com.google.gwt.dev.shell.BrowserChannelServer.invo keJavascript(BrowserChannelServer.java:218)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke (ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative( ModuleSpace.java:561)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeO bject(ModuleSpace.java:269)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNati veObject(JavaScriptHost.java:91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.ja va)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.j ava:213)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(Meth odAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(Met hodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invok e(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reac tToMessages(BrowserChannelServer.java:292)
at com.google.gwt.dev.shell.BrowserChannelServer.proc essConnection(BrowserChannelServer.java:546)
at com.google.gwt.dev.shell.BrowserChannelServer.run( BrowserChannelServer.java:363)
at java.lang.Thread.run(Thread.java:662)


Please help me administrator.I want to return data from DMI.but whenever I do getData() i get class cast exception.I am not understanding why is this happening

Attached Files
File Type: java SmartGWT.java (5.0 KB)
File Type: java LoginDMI.java (421 Bytes)
File Type: xml SmartGWT.gwt.xml (813 Bytes)
File Type: xml login.ds.xml (657 Bytes)

Initially Filter Condition-2 Is Disabled

$
0
0
Hi,

I created one filter builder, which contains three columns (other than top level logical operators) such as Filed Names, Operators, and Value String.
When I am opening filter window at first time, Condition-2(Operator Column) is disabled.

How can we keep it always enabled.
Please find the screenshot for reference.

Smart-GWT Version :3.1p.


Thanking you

Attached Images
File Type: png FilterConditionDisableImg.png (19.8 KB)

Preventing the backspace key from navigating back

$
0
0
SmartClient v9.0 Power edition: 2013-10-18
IE.8

How can I prevent the backspace key from navigating back?

Thancks in advance,

ui.xml and ToolstripSeparator

$
0
0
Hello,

I use screen.ui.xml files.
ToolstripSeparator not like it expected.

This is a part of ui.xml file
Code:


<ToolStrip ID="toolStrip" layoutMargin="0" layoutLeftMargin="5" layoutRightMargin="5"
                membersMargin="5" >
                <members>
                        <ToolStripButton ID="fetchButton" icon="pack2/reload.png" title="Refresh"/>
                        <ToolStripSeparator />
<ToolStripButton ID="deleteButton" icon="pack3/32.32/document_delete.png" title="Delete"/>
                       
</members>
</ToolStrip>

When this screen is show in my application the separator seems wrong.

Could you give me a working example of ToolstripSeparator in ui.xml?

Using visualbuilder, the code is like:
Code:


<ToolStripSeparator ID="ToolStripSeparator0" autoDraw="false">
    <title>ToolStripSeparator0</title>
</ToolStripSeparator>


<ToolStripButton ID="ToolStripButton0" autoDraw="false">
    <title>ToolStripButton0</title>
</ToolStripButton>


<ToolStrip ID="ToolStrip0" autoDraw="false">
    <members><Canvas ref="ToolStripMenuButton0"/><Canvas ref="ToolStripSeparator0"/><Canvas ref="ToolStripButton0"/>
    </members>
    <visibilityMode>multiple</visibilityMode>
</ToolStrip>

But i prefer the first one as the style of ui.xml files.

ui.xml and ToolstripMenuButton

$
0
0
Hello,

I would like to use ToolstripMenuButton in ui.xml.

My ui.xml is this:
Code:

<ToolStripMenuButton ID="btn_other_options" title="Other options" >
        <MenuItemButton ID="revertButton" icon="silk/table_row_delete.png" title="Revert changes"/>
        <MenuItemButton ID="restoreButton" icon="silk/arrow_undo.png" title="Restore data"/>
        <MenuItemButton ID="exportExcel2003Button" icon="extensions/xls.png" title="Export Excel 2003"/>
        <MenuItemButton ID="exportExcel2007Button" icon="extensions/xlsx.png" title="Export Excel 2007"/>
        <MenuItemButton ID="viewsButton" icon="silk/application_view_tile.png" title="Views"/>
        <MenuItemButton ID="filtersButton" icon="silk/timeline_marker.png" title="Filters"/>
</ToolStripMenuButton>

But it is not working.
I tried as many options as i could.
With "items", "menu", "menu=id..", etc.

In Visual Builder not possible to add any child to a ToolStripMenuButton.

It is supported in ui.xml?

Could you give me some sample of creating a ToolStripMenuButton with menu in ui.xml?

thank you in advance,
Szabi

Dynamically changing Smart GWT log level

$
0
0
I am trying to change the Smart GWT log level dynmically but to no avail. If the user changes the Loggging level in my form, on the server side I am doing the following:

Logger smartGwtLogger = Logger.getLogger("com.isomorphic");
if (smartGwtLogger != null) {
Level currentLogLevel = smartGwtLogger.getLevel();
if (!currentLogLevel.equals(newLevel)) {
smartGwtLogger.setLevel(newLevel);
}
}

The code gets executed OK but Smart GWT continues to log at whatever level was set in the log4j.isc.config.xml.

Am I doing something wrong? The above approach works fine for our logging.
Viewing all 4756 articles
Browse latest View live