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

Unable for select last record in listGrid

$
0
0
GWT Version : 2.4.0
SmartGWT Version : 4.1p
SmartGWT Build Date : 29/09/2014 07:46


We have a listGrid with multiple columns. When the grid is displayed, last record in it is not selectable.

However if we scroll down (to show the full height of record in listGrid), it lets us select that record.

Please note that the Hover works fine without user having to scroll down to show full height of the record.

Please find the attached screenshot for clarity.

Is there anything we can do to fix?

Possible to Add Handler for When ListGrid column is resized?

$
0
0
I'd like to add a handler for when a listgrid column is resized and change the column header string to an abbreviated one if the column is too narrow.

It is possible to add a handler for the resized event? Also is it possible to determine if the header string is currently wrapping?

DataSourceLoader response has false content type value

$
0
0
v10.0p_2015-01-10/EVAL Deployment 2015-01-10

The DataSourceLoader servlet response header says:
Content-Type:text/html;charset=UTF-8

The Chrome developer console indicate: "Resource interpreted as Script but transferred with MIME type text/html"

In the prevoius version (smartgwt 4.1) this was correct:
Content-Type:application/json;charset=UTF-8

This change is a bug or intentional?

Drag merge records in ListGrid rather than drag reorder?

$
0
0
I'm attempting to provide a UI where the user can drag a record in a ListGrid and drop it on another record within the same ListGrid to merge it with that record.

I can almost achieve this but I'm stuck on trying to change the style of the target drop row when dragging over rows. Essentially, instead of showing a drop line (like with the reorder records support) I want to highlight the target row instead. I can then handle recordDrop to perform the merge.

Does anyone have any advice on how this could be done?

Many thanks.

DatePickerButton & DateChooser AutoChild

$
0
0
The DateChooser displayed via the DatePickerButton doesn't seem to honour the dateChooser AutoChild, even though the button is documented as "... offers alternative access to the DateChooser...".


An ImgButton that appears above the various views of the calendar and offers alternative access to a com.smartgwt.client.widgets.DateChooser to pick the current day.


Can you please propose an alternative way to configure the following so that it applies to the DateChooser displayed by the DatePickerButton?

Code:

DateChooser dateChooser = new DateChooser();
dateChooser.setEndYear(endYear);
setAutoChildProperties("dateChooser", dateChooser);

Thanks

SmartClient Version: v9.1p_2014-11-09/Pro Deployment (built 2014-11-09)

Reg: Listgrid Validation while editing

$
0
0
Hi Team,

When we are trying to update in Dynamic form we are getting all fields for validation as a Datasource operation as update and also It is updating all the fields not just the updated fields.

But When we it comes to the ListGrid, We are getting only the changed fields with the DataSource operation as update and no other fields is validating and also while updating only the changed value is updated.

Is there a chance to get all the fields like form in Grid as well in the validatiors to do the validations for all fields while editing not just the updated fields.

We are working on the below environment:

SmartClient version : Isomorphic SmartClient/SmartGWT Framework (9.1p_2014-12-25/PowerEdition Deployment 2014-12-25)

Browser : IE9

Thanks in advance.

Log WARN messages if Calendar datePickerButton clicked more than once.

$
0
0
The following warning messages appears in development mode console if Calendar datePickerButton clicked more than once.

Code:

[ERROR] [xxxxx] - 14:56:52.631:MUP9:WARN:drawing:isc_DateChooser_0_dateGrid:Attempt to draw child of an undrawn parent - ignoring
    Canvas.readyToDraw()
    ListGrid.draw(_1=>undef, _2=>undef, _3=>undef, _4=>undef)
    DateGrid.buildCalendarData(_1=>undef)
    DateGrid.setStartDate(_1=>Date(2015-01-01))
    DateGrid.refreshUI(_1=>Date(2015-01-01))
    DateChooser.updateGridData(_1=>Date(2015-01-01))
    DateChooser.updateUI(_1=>undef)
    DateChooser.setData(_1=>Date(2015-01-12))
    [o]ImgButton.click(Obj, undef)
    StatefulCanvas.handleActivate(_1=>Obj, _2=>undef)
    StatefulCanvas.handleClick(_1=>Obj, _2=>undef)
    [c]EventHandler.bubbleEvent(_1=>[ImgButton ID:isc_xxxxxCalendarxxxxx_0_datePickerButton], _2=>"click", _3=>undef, _4=>undef)
    [c]EventHandler.handleClick(_1=>[ImgButton ID:isc_xxxxxCalendarxxxxx_0_datePickerButton], _2=>undef)
    [c]EventHandler.$k5(_1=>[object MouseEvent], _2=>undef)
    [c]EventHandler.handleMouseUp(_1=>[object MouseEvent], _2=>undef)
    [c]EventHandler.dispatch(_1=>[c]EventHandler.handleMouseUp(), _2=>[object MouseEvent])
    anonymous(event=>[object MouseEvent])

SmartClient Version: v9.1p_2014-11-09/Pro Deployment (built 2014-11-09)
FF ESR 24.8.1

Regards

Bug in dragging minimized portlets

$
0
0
How to reproduce:

1. create a portlet layout with two columns
2. create 2 portlets - 1 in each column
3. minimize one portlet
4. drag it over to the other column
5. restore the minimized portlet

The restored portlet now takes up the entire height of the column, and the other portlets don't resize at all.

This is easy to reproduce in https://www.smartclient.com/#portletContentsDragging.

In the attached screenshot you can see this bug in the left hand column.

Attached Images
File Type: png Screen Shot 2015-01-13 at 1.17.58 pm.png (23.7 KB)

Grid and Checkbox selection

$
0
0
In the grid we can checkboxes appearing on the left, as shown in showcase sample in the Showcase.
we have a requriement to show the checkboxes to the right of the grid instead, could you please advise if that's possible, and any code snippet will be greatly appreciated.

Problem with insert in ListGrids

$
0
0
Hi Isomorphic

We are using SmartClient v9.1p_2014-06-11/PowerEdition

We are using a Listgrid control and we are having troubles when inserting a new record in this ListGrid using grid.startEditingNew()

When the Listgrid is empty or with a short number of records it works perfect, but when the listgrid has too many records (1000 records for example) when you press ENTER key to confirm new record, the message "Communicating with server" appears and never dissapears, the browser get blocked. The INSERT has completed in database but we have to close the browser and enter to out application from zero.

We have checked it in Firefox and in Internet explorer with same behaviour

Can you help us with this please?

How to get Context2d object from smart gwt ListGridField?

$
0
0
How can I retrieve the Context2d object from a ListGridField? In the standard GWT canvas object there is a getContext2d function that returns it but that function doesn't seem to exist on the smart gwt Canvas class.

I'm trying to use the measureText function to measure the width of a string using a certain font. If the current width of the ListGridField is too small to hold the text I intend to provide an abbreviated header to use instead.

ListGrid, TabSet and ScrollBar

$
0
0
Hi Isomorphic,

I try to create a specific user interface, but I'm being lost with the scrollbar of the listgrid.

When the UI is loaded only the listgrid is displayed, when double clicking on a record this one will be opened in a tab.
As the listgrid is not yet in a tab, I create a tabset, I attach the listgrid as first tab and the record as second tab.
When closing the last tab of the record, the tabset is removed and the listgrid is attached to the layout.

Here is a standalone code
Code:

final VLayout vLayout = new VLayout(); 
vLayout.setMembersMargin(15);
vLayout.setHeight(400);
vLayout.setWidth(600);

final ListGrid supplyItemGrid = new ListGrid();
supplyItemGrid.setID("supplyList"); 
supplyItemGrid.setAutoFetchData(true); 
ListGridRecord[] record = new ListGridRecord[100];
                for(int i = 0;i<100;i++){
                        record[i] = new ListGridRecord();
                        record[i].setAttribute("LOGIN", "name"+i);
                        record[i].setAttribute("ID", i);
                       
                }
                supplyItemGrid.setData(record);
ListGridField nameField = new ListGridField("LOGIN", 150);
ListGridField idField = new ListGridField("ID", 100);
supplyItemGrid.setFields(nameField, idField);
supplyItemGrid.setSelectionType(SelectionStyle.SINGLE);
supplyItemGrid.addCellDoubleClickHandler(new CellDoubleClickHandler() {
       
        @Override
        public void onCellDoubleClick(CellDoubleClickEvent event) {
                if(tabSet == null){
                        tabSet = new TabSet(); 
                        Tab gridTab = new Tab("Grid");
                        vLayout.removeMember(supplyItemGrid);
                        supplyItemGrid.deparent();
                        gridTab.setPane(supplyItemGrid);
                        tabSet.addTab(gridTab);
                        vLayout.addMember(tabSet);
                }
                Tab tab = new Tab(event.getRecord().getAttribute("LOGIN"));
                tab.setCanClose(true);
                tabSet.addTab(tab);
                tabSet.addCloseClickHandler(new CloseClickHandler() {
                       
                        @Override
                        public void onCloseClick(TabCloseClickEvent event) {
                                if(tabSet != null && tabSet.getTabs().length == 2){
                                        tabSet.selectTab(tabSet.getTabs()[0]);
                                        supplyItemGrid.deparent();
                                        tabSet.deparent();
                                        vLayout.removeMember(tabSet);
                                        vLayout.addMember(supplyItemGrid);
                                        tabSet = null;
                                }
                               
                        }
                });
                HLayout hLayout = new HLayout();
                hLayout.setWidth100();
                hLayout.setHeight100();
                hLayout.addMember(new Label(event.getRecord().getAttribute("LOGIN")));
                tab.setPane(hLayout);
                tabSet.selectTab(tab);
               
        }
});
vLayout.addMember(supplyItemGrid);
vLayout.draw();

Example 1 :
When selecting a record without doing any scrolling, the listgrid and the record are displayed on two tabs.
When going back to the tab with the listgrid the record on the grid is shown and selected.
When closing the record tab, the tabset is destroyed and the listgrid is displayed in mainlayout with the record selected and shown.

Example 2 : (Start from the listgrid in mainlayout)
Same example as the first one, but first scroll to the middle of the grid and select the record with name50, the listgrid and the record are displayed on two tabs.
When going back to the tab with the listgrid, you can see that the record name50 is not displayed in the grid (scroll is on top) but if you scroll down to the middle of the grid you can see that the record is selected.
Same thing if you close the tab of the record...

Can you explain me, if is it a way to force the display of the grid showing the selected record? And how to do it?

Regards
Julien

Customizing Lanes in a Timeline

$
0
0
I am trying to create a timeline very similar to the one shown in the showcase, but I would like to add a picture next to the Developer name in the leftmost column.

Is it possible to customize the content of this column in the lanes?

Keyboard Navigation in filter row of ListGrids doesn't work for DateFields

$
0
0
We have some problems with keyboard navigation in the filter row of ListGrids. If one of our columns is a date field, a DatePicker symbol is shown in the filter row. We are able to step over the DatePicker symbol with the tab key, but the other direction (shift-tab) does not work. The focus does not get to the column prior to the date column.

SmartClient Version: 10.0p_2015-01-10/PowerEdition
Browser: Firefox 26.0

DynamicForm doesn't send null value when client side validation fails and then passes

$
0
0
Hello,

It looks like there's an issue with DynamicForm not sending null value if the client side validation fails at first, but then user corrects the issue and resubmits the form. The issue was observed using SmartClient Version: v10.0p_2014-12-09/Enterprise Deployment (built 2014-12-09)
Steps to reproduce:
1. start builtinds sample application
2. Select Employees datasource on the left hand side
3. Select the second row, Tamara Kane
4. Change status field in the dynamic form in the middle of the screen from "active" to nothing
5. Change the required field Employee ID from 182 to nothing
6. hit Save button
7. Change Employee ID field to 182
8. hit Save button
9. observe that the submitted request doesn't include EmployeeStatus field
10. select any other row in the grid and then select the second row again
11. Verify that the Status has not been changed.

The same scenario works just fine when editing within ListGrid.

Update record with @EmbeddedId

$
0
0
Can't find any information about that.
How do I update DB objects with an EmbeddedId in serverType="hibernate" ?

Code:

<field name="key" primaryKey="true" canEdit="false" />
Code:

@Override
        @EmbeddedId
        public QueryMessagePersistPK getKey() {
                return key;
        }

Code:

@Embeddable
public class QueryMessagePersistPK implements Serializable {

        /**
        *
        */
        private static final long serialVersionUID = 1L;
        @Id
        private long id;
        @Id
        private long query_info_id;

        public QueryMessagePersistPK() {

        }

        public QueryMessagePersistPK(QueryInfoODB queryInfo, long messageId) {
                id = messageId;
                query_info_id = queryInfo.getId();
        }

If I try to set the key a got from the fetch I get a
Code:

java.lang.ClassCastException: Value '{id=2263993, query_info_id=75229}' of type 'class java.lang.String' can not be cast to type 'class com.evizone.rbp.model.persist.QueryMessagePersistPK'.
        at com.isomorphic.util.DataTools.castValue(DataTools.java:4525)

Where do I implement the translation?

Hide listgrid column

$
0
0
Hello,
i want to hide a column in a listgrid. I cannot use the listgrid methode hideField("columname") because this methode don't produce a hidden column in html code. I need the hidden listgrid column also in the html output.

Are there any hints? Thank you.

Wrong width when adding members to a layout

$
0
0
Hey guys, found a bug when working with layouts and adding members to them.

In detail I built a layout and initially filled it with a tree grid with a fixed width of 200. Afterwards I add a new list grid with a width of 100% via addMember(listGrid, 1) to the layout. When this happens, I also ask the new list grid for its width. And here is the issue:
Instead of answering the real width (100% - 200px), the list grid answers the total width of the layout.
This seems only to happen when asking for the width after the initialization. When asking for it afterwards (e.g. by an event e.g. the button) it is answered correctly.

Following a small example for reproduce the bug:

Code:

isc.HLayout.create({
        "ID" : "layout",
        "width" : "100%",
        "members" : [
                isc.TreeGrid.create({
                        "width" : 200
                })
        ]
}),

layout.addMember(
        isc.ListGrid.create({
                "ID" : "listGrid",
                "width" : "100%"
        }), 1),
       
isc.say("initial width of listgrid: " + listGrid.width);
isc.Button.create({
        left : 500,
        top : 280,
        "action" : function () {
                isc.say("width of listgrid: " + listGrid.width);
        },
        width : 200,
        "title" : "whats the widht of listgrid now?"
})

This issue occurred in the latest versions of Firefox, Chrome and IE as well as the latest nighly build of smartclient (Jan 13th 2015)

Best Regards

SmartGWT very slow when running from IDE

$
0
0
Hi,

We're using an old lgpl smartgwt version (3.0p) and we're trying to upgrade to a newer version of gwt. Our .gwt.xml includes an inherit for com.smartgwt.SmartGwt. Unfortunately that does not work anymore with gwt 2.7.

So I created a new test project using this GWT archetype:
Code:

mvn archetype:generate -DarchetypeGroupId=org.codehaus.mojo -DarchetypeArtifactId=gwt-maven-plugin -DarchetypeVersion=2.7.0
When I try to run it it starts within seconds.


I then downloaded the latest 5.0p version, installed it into my local maven repository and changed my .gwt.xml to use:
<inherits name="com.smartgwt.SmartGwtNoScriptNoTheme"/>

I changed my GWTTest1.html to use:
Code:

    <script type="text/javascript" type="text/javascript"> var isomorphicDir = "GWTTest1/sc/";</script>
    <script src="GWTTest1/sc/modules/ISC_Core.js"></script>
    <script src="GWTTest1/sc/modules/ISC_Foundation.js"></script>
    <script src="GWTTest1/sc/modules/ISC_Containers.js"></script>
    <script src="GWTTest1/sc/modules/ISC_Grids.js"></script>
    <script src="GWTTest1/sc/modules/ISC_Forms.js"></script>
    <script src="GWTTest1/sc/modules/ISC_RichTextEditor.js"></script>
    <script src="GWTTest1/sc/modules/ISC_Calendar.js"></script>
    <script src="GWTTest1/sc/modules/ISC_DataBinding.js"></script>

Now the project takes almost 2 minute to start from my IDE with no other changes to the project than those mentioned above. The same happens when I try to use older versions of smartgwt and with different IDE's (Eclipse 4.4.1 and IntelliJ 14.02) . Tested using IE11.

What am I doing wrong?

Send params with DELETE request

$
0
0
Be sure your post includes:

SmartClient Version v9.0_2013-07-03/LGPL Development Only

Firefox 8.0.1

I am not using the smartclient server but instead my own rest services. I wanted to add some data to the request when I call removeData() on the RestDataSource but for some reason I'm NOT seeing it passed to the server.

DSRequest req = new DSRequest();
Map<String, String> parameterMap = new HashMap<String, String>();
parameterMap.put("id", "1234");
req.setParams(parameterMap);
req.setUseSimpleHttp(Boolean.TRUE);

myDS.removeData(record, new DSCallback() {

public void execute(DSResponse response, Object rawData, DSRequest request) {
}

}, req);


My server code looks as follows:

@DELETE
@Path("deleteRecord")
@Produces(MediaType.APPLICATION_JSON)
public javax.ws.rs.core.Response deleteRecord(
@QueryParam("id") String id
) {

if (id == null) {
System.out.println("Id is null"); /// this gets printed out since id IS NULL
}
int len - req.getContentLength(); // nothing here
Map m = req.getParameterMap(); // map is empty
String q = req.getQueryString(); // id is NOT in the query string
}
Viewing all 4756 articles
Browse latest View live