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

Looking for SmartGWT developer in the Chicagoland Area (Bolingbrook, IL)

$
0
0
My company is looking for a SmartGWT developer in the Chicagoland area (Bolingbrook, IL), initially for part-time/contract work (1099 nights/weekends and/or more), to possibly turn into full-time if everything works out. Communication with REST-service back-end, drag/drop user-configurable forms, and SmartGWT styling are a PLUS! Anybody interested please email me at RobertHana@LStreetC.com or comment/reply to this posting.

By default check all in selcetItem with "MultipleAppearance.PICKLIST"

$
0
0
Hi,
I'm using smartgwt version 2.5.Pro with GWT 2.5.1

I use a multiple select item and set its multipleAppearance to PICKLIST and set its value map to a LinkedHashMap.

What i want is, when loading the form, getting all values checked by default.

I tried setDefaultValues() but it just fill the input text with values and doesn't check them on the drop down list !!

Send all data (not only changed) during update request from ListGrid

$
0
0
Currently I'm trying to customize SmartGWT's DataSource to work with custom REST services. And I hit into problem with sending update requests when some changes have been made in the ListGrid. By default only changed rows are sent in update request (as described here http://www.smartclient.com/smartgwt/javadoc/com/smartgwt/client/docs/Editing.html). And I want to change this behavior to send all data from the row not just edited. I've already spent a lot of time figuring out how to do this but still can't find a solution. Could you please give me any advice how to change this OOTB behavior?

I have a problem with tree grid

$
0
0
When i start to select the nodes from the tree with up and down arrow from keyboard, the javascript clicks on those items, the hover selection is blue and it needs to yellow to select the item but not to click on it. How can i make the selector not to click on those nodes? I want to make this binding only from javascript in bodyKeyPress function.

Thanks !

SOLVED: by adding the this.selection.deselect(record); in rowClick function ;

canEditCell and startEditingNew with initialValues

$
0
0
Hi,
my goal is to disable some of the cells in the newly created row using using ListGrid.startEditingNew(Map) method. I am overriding canEditCell(int, int) method. The decision on which cells should be disabled for editing is based on the combination of the field and some of the initial values.

I am able to access record using getEditedRecord but this record only reflects values changed by the user during editing. Is there please any nice way how to access initial values passed originally to the startEditingNew method at this point?

Thank you for any hint

Best

Lukas

ListGrid select 500+ records

$
0
0
When trying to select more than 500 records I get the informtion that i should work on a smaller batch of data. (The same as in the hover information on the Select all checkbox). Can i change the value or even turn it off? Allow to select any number I want to?

Support for NuoDB database

$
0
0
Hi, my wish is simple - support NuoDB database (has jdbc driver), with limited functionality.

ListGrid and database triggers

$
0
0
I am developing an application that uses a custom datasource that connects to an SQL database. The table I am using has a trigger that changes a few values on update and insert.

I would like the listgrid to show the actual data in the table based on the primary keys, of course, rather than show the row as entered by the user.

To be specific, one column is a 'last_updated' field which is automatically set by the database trigger rather than by the user.

Is there a best practices way of handling this issue?

Can I return the actual row from the database in the DSResponse object returned after a successful insert or update? I can get the primary keys and programmatically execute a fetch after each insert or update, but I am not sure this is the best plan.

I am using SmartGWT version 4.0.

Smartclient ListGrid checkbox column autofit problem

$
0
0
While enabling a previously not shown boolean column for the first time from the right click context menu, the newly appeared checkbox column will expand the entire width of the table to the right instead of shrinking the existing columns left of the new one.
This can be reproduced using the showcase demo of "DataBinding/ListGrid fields":
1. Adding a new field called "member_g8" after "countryName"
2. Click "Try It"
3. Hide "G8" through context menu "Columns"
4. Enable it again and note the horizontal scroll bar appears.
5. Repeat 3. and 4. note the outcome is different and autofit is performed.

Code:

isc.ListGrid.create({
    ID: "countryList",
    width:500, height:224, alternateRecordStyles:true,
    fields:[
        {name:"countryCode", title:"Code"},
        {name:"countryName", title:"Country"},
        {name:"member_g8", title:"G8", type:"boolean"},
        {name:"population", title:"Population", type:"integer"},
        {name:"gdp", title:"GDP", type:"float"}
    ],
    data: countryData
})


Attached Images
File Type: jpg CaptureFirstTime.JPG (61.2 KB)
File Type: jpg CaptureSecondTime.JPG (56.0 KB)

Prevent selection when icon clicked

$
0
0
Does anyone know how to prevent selection when a ListGridField of type icon is clicked?

We have an edit button column on our ListGrid and the ListGrid is set to open a view on selection. Currently what is happening is the edit view gets opened, then the display view gets opened on top of the edit view. We are trying to prevent the display view from opening.

I tried canceling the CellClickEvent, but the 2 events appear to work separate of each other.

Thanks,
Pat

fileitem upload download question

$
0
0
smartgwt client pro version 4.1
Firefox 26.0
Java 1.7 for building


I have file open and file save as menu items. For the file open item, I want to prompt the user with a file open dialog from the users machine. Once, the user selects, the file, I will parse the file on the server side and send a Java bean to the client.

For the file save item, I want to send a Java object from the client to the server. Prompt the user for a file name and save the object on the client's machine.

The fileupload canvas item is not exactly what I am looking for. I am able to use the RemoteServiceServlet for the file save as operation and send the object to be saved from the client to the server. However, the saving operation does not display a File save as dialog.

@Override
public Boolean saveModel(Model model) throws IllegalArgumentException {
String xmlStr = writeModel(model).toString();
if (null == xmlStr) {
return false;
}

try {
HttpServletResponse response = getThreadLocalResponse();
response.setContentType("text/plain");
response.setHeader("Content-Disposition", "attachment;filename=\"model.xml\"");

InputStream is = new ByteArrayInputStream(xmlStr.getBytes("UTF-8"));

ServletOutputStream os = response.getOutputStream();
byte[] bufferData = new byte[1024];
int read = 0;
while ((read = is.read(bufferData)) != -1) {
os.write(bufferData, 0, read);
}
os.flush();
os.close();
is.close();
}
catch (IOException e) {
return false;
}

return true;
}

Connetion diagram

$
0
0
I want to create a connection diagram.
I has some device and connection information.
Like deviceA is conncted to deviceB.

number connection is many to many.



OS :- window 7
bowser :- chrome
smartclient version :- 8.3

Group label styling

$
0
0
I would like to change the background colour of the label that is on a group border ( a dynamic form with .setIsGroup(true) )

I have changed the code in load_skins.js, as follows, to set the border colour, and want the label background to match, which is currently black text on white.
Code:

isc.Canvas.addProperties({ groupBorderCSS: "1px solid #165fa7"  });

Browser: Internet Explorer 11
SmartClient Version: v9.0p_2013-10-17/PowerEdition Deployment (built 2013-10-17

Strange return of ListGrid.isExpanded

$
0
0
Hello,

I am using SmartClient/SmartGWT Framework (SNAPSHOT_v9.1d_2013-12-30/Pro Deployment 2013-12-30).

The method
java.lang.Boolean isExpanded(ListGridRecord record)
does not return Boolean(false) but NULL if the record is not expanded.

Just a remark since according to the doc I did not expect this return value.
Andreas

Sorting ListGridField Dropbox not case-insensitive

$
0
0
Hello,
I am trying to sort a dropbox for a ListGridField in alphabetical order. The code below sorts by the ascii value, which makes all lower case letters come after uppercase letters. Is there anyway to make the sort case-insensitive?
Example sort:
What I'm getting now: ("AJ", "Ab", "Be", "Gi", "Zh", "bo")
What I need: ("Ab", "AJ", "Be", "bo", "Gi", "Zh")

Code:

DataSource aDS = DataSource.get("aDatasource");
SortSpecifier[] sortSpecifiers = {new SortSpecifier("name", SortDirection.ASCENDING)};
DSRequest dsr = new DSRequest();
dsr.setSortBy(sortSpecifiers);

ListGridField user= new ListGridField("user", "Created by");
user.setOptionDataSource(aDS);
user.setOptionFilterContext(dsr);
user.setValueField("userName");
user.setDisplayField("name");

SmartClient Version: v8.3p_2013-04-15/Enterprise Deployment (built 2013-04-15)
Firefox 20.0.1

controlling zoom in android tablet

$
0
0
android 4.1.1
Chrome browser
smartclient 9.0d 12-13-2013

I have a page that uses a treegrid. It works fine on and iPad, but not in Android. In Android, it pops up a small window with a zoomed in view of the area I tried to interact with (by clicking a checkbox or some other control in the tree). I'm able to click a checkbox but when I do the zoomed in view pops up anyway and I'm unable to interact with it.

I looked at the samples on the Android device and they didn't pop up a zoomed in view. I added the code below to my page but it didn't change the behavior so I'm wondering what else I might need to do to get the page to work in Android.

Code:

        // In iPad set the initial zoom level to 1.0 and disable scaling.
        // In iPhone, set to large enough to view the app as a whole (but allow the user to scale so
        // they can zoom in and make text readable!).
        if (isc.Browser.isMobileWebkit) {
            isc.Canvas.addProperties({
                scrollbarConstructor: "NativeScrollbar"
            });


            if (isc.Browser.isHandset) {
                isc.Page.updateViewport(null, 700, null, true);
            } else {
                isc.Page.updateViewport(1.0, null, null, true);
            }
        }

RibbonBar scrolling

$
0
0
Hello!

If my RibbonBar has a lot of RibbonGroup and their quantity is too much to fit visible browser area, is it possible to keep RibbonBar in visible area and scroll or hide in some other way elements not fitted in visible area?

Thank you

(TypeError) : this.getClass(...).applyStretchResizePolicy is not a function

$
0
0
Hi,
I have been working on GWT application that uses SmartGWT extensively. The SmartGWT application I am using is: SmartClientVersion: v9.0p_2013-07-12.
In this phase, I am looking forward to embed this application inside Salesforce.com Canvas. Canvas is a mechanism that allows embedding web applications within Salesforce.com environment. I was able to do this successfully on Chrome. The next browser is FF 22.0. It looks like the whole code runs successfully, but when it is drawing the app, it is finding the error on the subject. The full Stack trace is below.
Any idea why this may be happening or someone was able to integrate a SmartGWT application inside Salesforce.com Canvas using Firefox (by the way, I tried with several FF versions and it happens in all) ?
Thanks !

Eduardo.

StackTraceCreator.java].[com_google_gwt_core_client_impl_StackTraceCreator$ CollectorEmulated_$fillInStackTrace__Lcom_google_g wt_core_client_impl_StackTraceCreator$CollectorEmu lated_2Ljava_lang_Throwable_2V]: (174)
[StackTraceCreator.java].[com_google_gwt_core_client_JavaScriptException_Jav aScriptException__Ljava_lang_Object_2V]: (508)
[Exceptions.java].[com_google_gwt_lang_Exceptions_caught__Ljava_lang_ Object_2Ljava_lang_Object_2]: (29)
[BaseWidget.java].[com_smartgwt_client_widgets_BaseWidget_$draw__Lcom _smartgwt_client_widgets_BaseWidget_2V]: (240)
[ApplicationFacade.java].[com_q_desktop_client_ApplicationFacade_$setCurrent Display__Lcom_q_desktop_client_ApplicationFacade_2 Lcom_smartgwt_client_widgets_Canvas_2V]: (496)
[LoadOrganizationSuccessfulEvent.java].[com_q_desktop_client_events_object_login_LoadOrgan izationSuccessfulEvent_run__Ljava_lang_Object_2V]: (33)
[DesktopScreenMediatorEvent.java].[com_q_desktop_client_events_DesktopScreenMediatorE vent_$triggerEvent__Lcom_q_desktop_client_events_D esktopScreenMediatorEvent_2Lorg_puremvc_java_multi core_interfaces_INotification_2V]: (40)
[DesktopScreenMediator.java].[com_q_desktop_client_view_DesktopScreenMediator_ha ndleNotification__Lorg_puremvc_java_multicore_inte rfaces_INotification_2V]: (71)
[View.java].[org_puremvc_java_multicore_core_view_View$1_onNoti fication__Lorg_puremvc_java_multicore_interfaces_I Notification_2V]: (196)
[View.java].[org_puremvc_java_multicore_core_view_View_$notifyO bservers__Lorg_puremvc_java_multicore_core_view_Vi ew_2Lorg_puremvc_java_multicore_interfaces_INotifi cation_2V]: (127)
[Facade.java].[org_puremvc_java_multicore_patterns_facade_Facade_ $notifyObservers__Lorg_puremvc_java_multicore_patt erns_facade_Facade_2Lorg_puremvc_java_multicore_in terfaces_INotification_2V]: (361)
[Notifier.java].[org_puremvc_java_multicore_patterns_observer_Notif ier_$sendNotification__Lorg_puremvc_java_multicore _patterns_observer_Notifier_2Ljava_lang_String_2Lj ava_lang_Object_2Ljava_lang_String_2V]: (70)
[LoadOrganizationCommand.java].[com_q_desktop_client_controller_LoadOrganizationCo mmand$1_onEvent__Lorg_restlet_gwt_data_Request_2Lo rg_restlet_gwt_data_Response_2V]: (106)
[HttpClientConverter.java].[org_restlet_gwt_engine_http_HttpClientConverter$1_ $onEvent__Lorg_restlet_gwt_engine_http_HttpClientC onverter$1_2Lorg_restlet_gwt_data_Request_2Lorg_re stlet_gwt_data_Response_2V]: (381)
[Request.java].[com_google_gwt_http_client_Request_$fireOnResponse Received__Lcom_google_gwt_http_client_Request_2Lco m_google_gwt_http_client_RequestCallback_2V]: (258)
[RequestBuilder.java].[com_google_gwt_http_client_RequestBuilder$1_onRead yStateChange__Lcom_google_gwt_xhr_client_XMLHttpRe quest_2V]: (412)
[XMLHttpRequest.java].[anonymous]: (351)
[Impl.java].[com_google_gwt_core_client_impl_Impl_apply__Ljava_ lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_ 2Ljava_lang_Object_2]: (189)
[Impl.java].[com_google_gwt_core_client_impl_Impl_entry0__Ljava _lang_Object_2Ljava_lang_Object_2Ljava_lang_Object _2Ljava_lang_Object_2]: (243)
[Impl.java].[anonymous]: (70)

valuesManager not in sync with forms

$
0
0
ValuesManager is awesome. It has saved me from writing code to go foraging for form item values. I think I had a configuration working a while ago. And, then had no reason to check if for some time. Now, I find that form item values changed on member forms are not picked up.

The situation is that the user is allowed to change 'print options' on member forms under a window before hitting a button to print. The button click event calls a macro that generates a PDF file just fine. The window has a valuesManager. If I don't make any changes, then I get the valuesManager values I get out are just fine. Any changes made to the underlying forms, however, are ignored. In my test I change a 'MeetingDetails' checkbox.

I know the change is registered because I have an itemChange event fire that shows it goes from 'true' to 'false'.

In all the diagnostics and results, it is clear the value being used for MeetingDetails is still 'true'.

I tried ValuesManager.synchronizeMembers() even though I understood that it only update the member form values. Not the other way around, like I need.

I note that the datapath on the member form is 'Agenda/Options'. This works for pulling the values out in the structure needed. But, it may mess up the synchronization

Here is the window.
Code:

isc.Window.create({
    ID:"MeetingWindow",
    autoDraw:false,
    overflow:"hidden",
    isModal:true,
    visibility:"hidden",
    title:"Meeting Window",
    showMinimizeButton:false,
    showMaximizeButton:true,
    showStatusBar:false,
    showResizer:false,
    items:[
        MeetingForm,
        MeetingBottomHalf
    ],
    showModalMask:true,
    modalMaskOpacity:10,
    width:"100%",
    height:665,
    top:84,
    canDragReposition:false,
    canDragResize:false,
    valuesManager:isc.ValuesManager.create({
        ID:"meetingTypeVM"
    }),
    showShadow:false
})

And, the form in question.
Code:

isc.DynamicForm.create({
    ID:"AgendaOptionsForm",
    autoDraw:false,
    numCols:5,
    overflow:"visible",
    fields:[
        {
            dataPath:"MeetingDetails",
            name:"MeetingDetails",
            title:"Meeting Details",
            disabled:false,
            _constructor:"CheckboxItem"
        },
        {
            dataPath:"IncludeParticipants",
            name:"IncludeParticipants",
            title:"Include Participants",
            disabled:false,
            _constructor:"CheckboxItem"
        },
        {
            dataPath:"TopicDetails",
            name:"TopicDetails",
            title:"Topic Details",
            disabled:false,
            _constructor:"CheckboxItem"
        },
        {
            dataPath:"TopicIssues",
            name:"TopicIssues",
            title:"Topic Issues",
            disabled:false,
            _constructor:"CheckboxItem"
        },
        {
            dataPath:"IssueDetails",
            name:"IssueDetails",
            title:"Issue Details",
            disabled:false,
            _constructor:"CheckboxItem"
        },
        {
            dataPath:"IssueTasks",
            name:"IssueTasks",
            title:"Issue Tasks",
            disabled:false,
            _constructor:"CheckboxItem"
        },
        {
            dataPath:"TaskDetails",
            name:"TaskDetails",
            title:"Task Details",
            disabled:false,
            _constructor:"CheckboxItem"
        },
        {
            dataPath:"CompletedTasks",
            name:"CompletedTasks",
            title:"Completed Tasks",
            disabled:false,
            _constructor:"CheckboxItem"
        }
    ],
    width:"100%",
    height:100,
    extraSpace:10,
    dataPath:"Agenda/Options",
    itemChange:"AgendaOptionsForm_itemChange(item, newValue, oldValue, MeetingForm)"
})

So, I am trying to understand this morning why the two structures depicted below do not behave the same (i.e. Agenda vs. Minutes). It may have to do with the meaning of dataPath:"/". I can load and retrieve data into Minutes. setValues cannot find the fields under Agenda.
Code:

Window:MeetingWindow
+---DynamicForm: MeetingForm
+---DynamicForm: MeetingBottomHalf
    +---HLayout: MeetingContentOptions
        +---TabSet: MeetingContentTabs
            +---VLayout: AgendaOptionsLayout          (dataPath:"Agenda")
            |  +---DynamicForm: AgendaOptionsForm        (dataPath:"Options")
            |  +---TabSet: AgendaOptionsTabs
            |      +---DynamicForm: AgendaOptionsTopicForm  (dataPath:"Topic")
            |      +---DynamicForm: AgendaOptionsIssueForm  (dataPath:"Issue")
            |      +---DynamicForm: AgendaOptionsTaskForm    (dataPath:"Task")
            |      +---DynamicForm: AgendaOptionsSpecialForm (dataPath:"Special")
            |
            +---VLayout: MinutesOptionsLayout
                +---DynamicForm: MinutesOptionsForm        (dataPath:"Minutes/Options")
                +---TabSet: MinutesOptionsTabs
                    +---DynamicForm: MinutesOptionsTopicForm  (dataPath:"Minutes/Topic")
                    +---DynamicForm: MinutesOptionsIssueForm  (dataPath:"Minutes/Issue")
                    +---DynamicForm: MinutesOptionsTaskForm    (dataPath:"Minutes/Task")
                    +---DynamicForm: MinutesOptionsSpecialForm (dataPath:"Minutes/Special")

The data being loaded into the VM:
Quote:

AgendaPrintOptions:
'{"Options": { "MeetingDetails": true, "TopicDetails": true, "IncludeParticipants": true, "TopicIssues": true, "IssueTasks": true, "CompletedTasks": false, "IssueDetails": true, "TaskDetails": true }, "Topic": { "Leader": true, "TopicTime": true, "SessionType": true, "ExpectedResults": true, "SearchEnabled": false, "ImpactFilter": false, "CategoryFilter": false, "IssueTypeFilter": false, }, "Issue": { "DueDate": true, "IssueType": true, "IssueStatus": true, "Category": true, "IssueDesc": true, "Impact": true, "Owner": true, "Originator": false, "Private": true, "Resolution": false, "ClosedDate": true, "OrigDueDate": false, "ModifiedDate": false, "CreatedDate": true, "IssueLog": true, "IssueLogCount": 3, "IssueLogUnit": "Entries", "IssueLogOrder": "Reverse" }, "Task": { "DueDate": true, "StartDate": true, "TaskStatus": true, "TaskDesc": false, "Owner": true, "CompletedDate": true, "OrigDueDate": false, "ModifiedDate": false, "CreatedDate": false, "TaskLog": false, "TaskLogCount": 3, "TaskLogUnit": "Entries", "TaskLogOrder": "Reverse" }, "Special": { "IssueLikelihood": false, "IssueImpactDesc": false, "SpecificDetails": false } }',
MinutesPrintOptions
'{"Options": { "MeetingDetails": true, "TopicDetails": true, "IncludeParticipants": true, "TopicIssues": true, "IssueTasks": true, "CompletedTasks": false, "IssueDetails": true, "TaskDetails": true }, "Topic": { "Leader": true, "TopicTime": true, "SessionType": true, "ExpectedResults": true, "SearchEnabled": false, "ImpactFilter": false, "CategoryFilter": false, "IssueTypeFilter": false, }, "Issue": { "DueDate": true, "IssueType": true, "IssueStatus": true, "Category": true, "IssueDesc": true, "Impact": true, "Owner": true, "Originator": false, "Private": true, "Resolution": false, "ClosedDate": true, "OrigDueDate": false, "ModifiedDate": false, "CreatedDate": true, "IssueLog": true, "IssueLogCount": 3, "IssueLogUnit": "Entries", "IssueLogOrder": "Reverse" }, "Task": { "DueDate": true, "StartDate": true, "TaskStatus": true, "TaskDesc": false, "Owner": true, "CompletedDate": true, "OrigDueDate": false, "ModifiedDate": false, "CreatedDate": false, "TaskLog": false, "TaskLogCount": 3, "TaskLogUnit": "Entries", "TaskLogOrder": "Reverse" }, "Special": { "IssueLikelihood": false, "IssueImpactDesc": false, "SpecificDetails": false } }');
I wonder if it related to another problem for which I have a workaround. The values I get out for each VM member form have an 'Agenda' object tacked onto the end. The workaround is a test for it and then a simple deletion.

I am not sure how I broke it, if it ever worked. Any help would be appreciated.

I may be overthinking this. The 'Agena' dataPath scheme was intended to get around my real problem which was to get the DynamicForm field changes to propogate to the valuseManager for access using getValues. My theory was that the nested 'a/b' datapaths were the source. And, that removing them with an equivalent scheme would be the fix.

Thanks. And, I hope you are having a Happy New Year.

Rick

P.S. I am running SmartClient_v8.2p_2013-11-07/EVAL Development Only on Mozilla Firefox 20.0 with Firebug
using Windows 7 Premium 64 bit.

Not able to get Daterange on listgrid filter editor

$
0
0
Hi,

I am struggling to display listgrid filter editor with date range. In my older smartgwt version 2.2 on list grid Date/DateTime fields it was showing data range editor but after upgrading to smartgwt 4.0d (build from daily build 01/01/2014) it is showing date picker instead of date range popup. I gone through lot of posts and came across the information, if i set DataSource setWillHandleAdvancedCriteria to true it will show date range popup but i am not able to find this method at all in DataSource class, am i missing something...? How to get the date range filter popup for listgrid date/datetime column filters..? Any help is highly appreciated.

Thanks a lot in advance
Viewing all 4756 articles
Browse latest View live