Search Results

Search found 900 results on 36 pages for 'gwt uibinder'.

Page 29/36 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • [SmartGWT] How to center a DynamicForm?

    - by user334209
    Hi there! I'm new in smartGWT and I'm getting problems designing my client. I'd like to know if there is a way to center a form. I have a TabSet in my page. I would like to make the first tab ("Welcome") similar to Google search engine, with the search box centered in the pane. The setAlign(Alignment.CENTER) method doesn't for this type of object. I get to have this at this point : link text Thanks you for helping me.

    Read the article

  • SmartGwt DateItem useTextField=true - how to make text entry field UNeditable

    - by Paul
    Since I can't figure out how to solve my problem presented here I'm thinking for the moment at a temporary solution. I have a smartgwt DateItem widget: DateItem date = new DateItem("Adate"); date.setWidth(120); date.setWrapTitle(false); date.setAttribute("useTextField", true); date.setAttribute("inputFormat", "yyyy/MM/dd"); date.setAttribute("displayFormat", "toJapanShortDate"); Because the attribute useTextField is set to true we can see the text entry field. How can I make this text entry field to be uneditable. Actually I want to have only the possibility to choose the date from calendar and not to change it manually. Resolved - the issue exposed above - thanks to @RAS user. TextItem textItem = new TextItem(); textItem.setAttribute("readOnly", true); date.setAttribute("textFieldProperties", textItem); Related link But I have now another issue: The date chooser won't show the date on the text field but Today's date. For example, enter 30/05/2009 on the text field, go to another field, then come back on click on the date chooser and the selected day will be Today's date instead on June 30th, 2009. Which is the reason for this? Can this be solved? Also let's say I let to the user to opportunity to manually modify the date - can I put some validators on it? Thank you.

    Read the article

  • How to make addValueChangeHandler act just like addChangeHandler

    - by Konoplianko
    Hi. I have a problem. I made a wrap widget that implements interface HasChangeHandlers But i just can't fit events to each other. public HandlerRegistration addChangeHandler( final ChangeHandler handler ) { HandlerRegistration registration1 = dateFrom.addValueChangeHandler( handler );// Compile error HandlerRegistration registration2 = dateTo.addValueChangeHandler( new ValueChangeHandler<Date>() { @Override public void onValueChange( ValueChangeEvent<Date> dateValueChangeEvent ) { //have to fire handler ?? } } ); return null; // what i should return here? } Thanks in advance !

    Read the article

  • AsyncListViewAdapter + SimplePager, why is inactive pager clearing the table?

    - by Jaroslav Záruba
    I'm trying to make CellTable work together with AsyncListViewAdapter<T> and SimplePager<T>. The data gets displayed, but when the pager should be 'deaf' (meaning when all existing data are displayed) it still receives clicks and, more importantly, makes the displayed data go away. Instead of my data 'loading' indicator gets displayed, and it keep loading and loading... Obviously nothing gets loaded, as it doesn't even call the onRangeChanged handler. I went through the code-snippets in this thread, but I can't see anything suspicions on what I've been doing. Is there some obvious answer to a rookie mistake? I shrinked my variable names, hopefully it won't wrap too much. protected class MyAsyncAdapter extends AsyncListViewAdapter<DTO> { @Override protected void onRangeChanged(ListView<DTO> v) { /* * doesn't even get called on [go2start/go2end] click :( */ Range r = v.getRange(); fetchData(r.getStart(), r.getLength()); } } private void addTable() { // table: CellTable<DTO> table = new CellTable<DTO>(10); table.addColumn(new Column<DTO, String>(new TextCell()) { @Override public String getValue(DTO myDto) { return myDto.getName(); } }, "Name"); // pager: SimplePager<DTO> pager = new SimplePager<DTO>(table); table.setPager(pager); adapter = new MyAsyncAdapter(); adapter.addView(table); // does not make any difference: // adapter.updateDataSize(0, false); // adapter.updateDataSize(10, true); VerticalPanel vPanel = new VerticalPanel(); vPanel.add(table); vPanel.add(pager); RootLayoutPanel.get().add(vPanel); } // success-handler of my fetching AsyncCallback @Override public void onSuccess(List<DTO> data) { // AsyncCallback<List<DTO>> has start field adapter.updateViewData(start, data.size(), data); if(data.size() < length) adapter.updateDataSize(start + data.size(), true); } Regards J. Záruba

    Read the article

  • Problem with GwtUpload on GAE

    - by weesilmania
    I'm using GwtUpload to upload images on GAE. The problem is that the images seem to get much bigger when I move them into a blob. I've noticed the same for simple text fields and in that case I've realised that some weirdo characters are being appended to the end of the field values (encoding right?). Can anyone help? public class ImageUploadServlet extends AppEngineUploadAction { /** * Maintain a list with received files and their content types */ Hashtable<String, File> receivedFiles = new Hashtable<String, File>(); Hashtable<String, String> receivedContentTypes = new Hashtable<String, String>(); private Objectify objfy; public ImageUploadServlet() { ObjectifyService.register(Thumbnail.class); objfy = ObjectifyService.begin(); System.out.println("ImageUploadServlet init"); } /** * Override executeAction to save the received files in a custom place and * delete this items from session. */ @Override public String executeAction(HttpServletRequest request, List<FileItem> sessionFiles) throws UploadActionException { Thumbnail t = new Thumbnail(); for (FileItem item : sessionFiles) { //CacheableFileItem item = (CacheableFileItem)fItem; if (false == item.isFormField()) { System.out.println("the name 1st:" + item.getFieldName()); try { // You can also specify the temporary folder InputStream imgStream = item.getInputStream(); Blob imageBlob = new Blob(IOUtils.toByteArray(imgStream)); t.setMainImage(imageBlob); System.out.println("blob: " + t.getMainImage()); } catch (Exception e) { throw new UploadActionException(e.getMessage()); } } else { System.out.println("the name 2nd:" + item.getFieldName()); String name = item.getFieldName(); String value; try { InputStream is = item.getInputStream(); StringWriter writer = new StringWriter(); IOUtils.copy(is, writer,"UTF-8"); value = writer.toString(); writer.close(); System.out.println("parm name: " + name); System.out.println("parm value: " + value + " **" + value.length()); System.out.println(item.getContentType()); if (name.equals("thumb-name")) { t.setName(value); } } catch (IOException e) { // TODO Auto-generated catch block System.out.println("Error"); e.printStackTrace(); } } removeSessionFileItems(request); } objfy.put(t); return null; } As an example the size of the image is 20kb, and the lib has some debugging that confirms that this is the case when it's uploading the file but the blob ends up being over 1 MB. Wes

    Read the article

  • CloseHandler<Window> and Window.ClosingHandler() working differently in IE

    - by stuff22
    It seems that CloseHandler and Window.ClosingHandler() are not working or are not triggering the events in the same way under IE as opposed to Firefox. Window.addWindowClosingHandler(new Window.ClosingHandler() { @Override public void onWindowClosing(ClosingEvent event) { event.setMessage(message); } Window.addCloseHandler(new CloseHandler<Window>() { @Override public void onClose(CloseEvent<Window> event) { //Window.alert("debug1"); if(recordId!=null){ DatabaseQueryServiceAsync dbQueryService = DatabaseQueryService.Util.getInstance(); dbQueryService.releaseRecordLock(recordId, new AsyncCallback<String>() { @Override public void onFailure(Throwable arg0) { } @Override public void onSuccess(String arg0) { } }); } } }); }); For example, the ClosingHandler under IE displays the message when I swap a panel within within my widget. This does not occur in Firefox. The CloseHandler doesn't seem to trigger at all when the window closes in IE, but does so in firefox. The interesting thing to point out there, is that when I put a Window.alert("debug1") message in the addCloseHandler() method it DOES run the callback below, but as soon as I remove it, the callback doesn't happen. In firefox it works and runs the callback in both situations. So, I'm basically pulling my hair out not really understanding what's going on. Any help would be greatly appreciated. Thanks.

    Read the article

  • File Hierarchy system with a web application logic question: List searching

    - by molleman
    I need to search through a list of folders that could have more folders inside it, and add a new folder depending what folder is its parent.(the path is stored as a String for eg = "root/MyCom/home/") Then i fill in a field with a new folder name and add it to the final folder(eg "home/"). Below as you can see , I can navigate to the right location and add the new folder to a current folder, My trouble is that i cannot ensure that currentFolder element is placed back in the list it came from how could i add a folder to a list of folders, that could be within a list of folders,that could be within a list of folders and endless more? YFUser user = (YFUser)getSession().getAttribute(SESSION_USER); Folder newFolder = new Folder(); newFolder.setFolderName(foldername); // this is the path string (root/MyCom/home/) split in the different folder names String folderNames[] = folderLocationString.split("/"); int folderNamesLength = folderNames.length; Folder root = user.getRoot(); Folder currentFolder = root; for(int i=0;i<=folderNamesLength; i++){ // because root is folderNames[i] String folderName = folderNames[i++]; int currentFolderSize = currentFolder.getChildren.getSize(); for(int o=1; o<= currentFolderSize ; o++){ if(currentFolder.getChildren().get(o) instanceof Folder){ if(folderName.equals(currentFolder.getChildren().get(o).getFolderName())){ currentFolder = currentFolder.getChildren().get(o); if (i == counter){ //now i am inside the correct folder and i add it to the list of folders within it //the trouble is knowing how to re add this changed folder back to the list before it currentFolder.getChildren.add(newFolder); } } } } }

    Read the article

  • why am I stuck on "Initiating update" when deploying to google

    - by michelle
    I've have not had any trouble deploying through eclipse until now. I'm guessing it might have to do with all the stuff I've added today a folder of .pdf and .tex files (in war/web-inf directory) a bit of JDO stuff and a servlet that reads the files in the directory and indexes them into the JDO Is there any way to find out what exactly is the problem? I currently get stuck at "Initiating update" and the stack trace say "ConnectionReset" Any helkp of imput will be appreciated, I really need to deploy this today, thanks! here's the deploy trace: Unable to update: java.net.SocketException: Connection reset at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at java.net.HttpURLConnection.getResponseCode(Unknown Source) at com.google.appengine.tools.admin.ServerConnection.getAuthCookie(ServerConnection.java:315) at com.google.appengine.tools.admin.ServerConnection.authenticate(ServerConnection.java:219) at com.google.appengine.tools.admin.ServerConnection.send(ServerConnection.java:145) at com.google.appengine.tools.admin.ServerConnection.post(ServerConnection.java:81) at com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:427) at com.google.appengine.tools.admin.AppVersionUpload.beginTransaction(AppVersionUpload.java:241) at com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:98) at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:56) at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:271) at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:148) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read1(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source) at sun.net.www.http.HttpClient.parseHTTP(Unknown Source) at sun.net.www.http.HttpClient.parseHTTP(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getHeaderFieldKey(Unknown Source) at com.google.appengine.tools.util.ClientCookieManager.readCookies(ClientCookieManager.java:123) at com.google.appengine.tools.admin.ServerConnection.connect(ServerConnection.java:340) at com.google.appengine.tools.admin.ServerConnection.getAuthCookie(ServerConnection.java:314) ... 11 more

    Read the article

  • CellTable + AsyncListViewAdapter<T>, stuck at 'loading' when paging

    - by Jaroslav Záruba
    Hi I'm trying to make CellTable, AsyncListViewAdapter<T> and SimplePager<T> working together. I managed to display my data, but whenever I click either "go to start" or "go to end" button I get that 'loading' indicator which stays there till the end of days. ( AsyncListViewAdapter<T>.onRangeChanged doesn't even get called this time.) As I have only single row in my data those two buttons should be (and appear to be) disabled. I went through the code-snippets in this thread, but I can't see nothing suspicions in what I've been doing. Is there some obvious answer to a rookie mistake? I shrinked my variable names, hopefully it won't wrap too much. protected class MyAsyncAdapter extends AsyncListViewAdapter<DTO> { @Override protected void onRangeChanged(ListView<DTO> v) { // doesn't get called on go2start/go2end :( Range r = v.getRange(); fetchData(r.getStart(), r.getLength()); } } private void addTable() { // table: CellTable<DTO> table = new CellTable<DTO>(10); table.addColumn(new Column<DTO, String>(new TextCell()) { @Override public String getValue(DTO namespace) { return namespace.getName(); } }, "Name"); // pager: SimplePager<DTO> pager = new SimplePager<DTO>(table); table.setPager(pager); adapter = new MyAsyncAdapter(); adapter.addView(table); // does not make any difference: // adapter.updateDataSize(0, false); // adapter.updateDataSize(10, true); VerticalPanel vPanel = new VerticalPanel(); vPanel.add(table); vPanel.add(pager); RootLayoutPanel.get().add(vPanel); } // success-handler of my fetching AsyncCallback @Override public void onSuccess(List<DTO> data) { // AsyncCallback<List<DTO>> has start field adapter.updateViewData(start, data.size(), data); if(data.size() < length) adapter.updateDataSize(start + data.size(), true); } Regards J. Záruba

    Read the article

  • gwtQuery's outerWidth(true) and IE8 not working without putting a delay

    - by Christopher
    I recently came across an odd behavior when trying to calculate the width (with margins) of an element using gwtQuery. The goal is to get the width (including padding, borders and margins) of a given element as a child of a certain parent. This parent may define specific CSS rules for some children so I clone it, add my element to this parent, call .outerWidth(true) to get the width and finally remove the clone from the parent. It works fine on Chrome, Firefox and IE 10, but randomly fails (outputs 0) on IE 8. However I noticed that if I put a "sleep" between the moment I add the element to the DOM and the moment I get the outer width, it always succeeds. I obviously don't want to keep that sleep. So my question is does anyone has any insights on how to work around this behavior or even a better way of achieving the same goal? Thank you! Here's a code snippet private Integer computeTabWidth(IsWidget tab) { GQuery $tab = $("<li></li>").append($(tab).clone()); $(containerPanel).append($tab); // IE 8 debug. sleep(100); Integer tabWidth = $tab.outerWidth(true); $tab.remove(); return tabWidth; } private void sleep(int i) { long time = new Date().getTime() + i; while (time > new Date().getTime()); }

    Read the article

  • addDoubleClickHandler to a FixedWidthGrid !!

    - by MArio
    Hello so I got a FixedWidthGrid table which is made from a pagingtable FixedWidthGrid dataTable = x.getDataTable(); I could add alot of handlers to the dataTables rows like selected or sort policies. but I cant add a double click handler ... anyway idea's ?! thank you I do have a class which I made to try to add a double click hander but it didn't work. class: public class DoubleClickTable extends FixedWidthGrid implements HasDoubleClickHandlers { public DoubleClickTable() { super(); } public HandlerRegistration addDoubleClickHandler(DoubleClickHandler handler) { return addDomHandler(handler, DoubleClickEvent.getType()); } } Thank you so much for your help.

    Read the article

  • getting IllegalAccessException when accessing a protected method from parent from inner class

    - by EnToutCas
    I got a very weird problem and a weird solution: class Parent { protected void aProtectedMethod() { doSomething(); } } class Child extends Parent { void anotherMethod() { new SomeInterface() { public void interfaceMethod() { aProtectedMethod(); } }; } } When child.anotherMethod() is run, I got IllegalAccessException at myProtectedMethod(), saying my inner class doesn't have access to the Parent class... However, if I add: protected void aProtectedMethod() { super.aProtectedMethod(); } in my Child class, everything is fine... I wonder why this is?

    Read the article

  • unable to catch org.hibernate.StaleObjectStateException while deleting record that doesn't exists in database

    - by JAB
    My application has a delete user option. Now in order to check concurrency condition I tried the following use case opened application in chrome and firefox browser. deleted user in firefox now trying to delete the same user in chrome browser I get exception org.hibernate.StaleObjectStateException .. which is right .. since I am trying to delete an object which doesn't exists. But I am not able to catch this exception try{ getHibernateTemplate().delete(userObj); } catch (StaleObjectStateException e) { e.printStackTrace(); } How do i catch this exception ??

    Read the article

  • StoreFilterField input doesn't react

    - by user1289877
    I'm trying to build grid with build in column filtering (using sencha gxt), here is my code: public Grid<Stock> createGrid() { // Columns definition ColumnConfig<Stock, String> nameCol = new ColumnConfig<Stock, String>(props.name(), 100, "Company"); // Column model definition and creation List<ColumnConfig<Stock, ?>> cl = new ArrayList<ColumnConfig<Stock, ?>>(); cl.add(nameCol); ColumnModel<Stock> cm = new ColumnModel<Stock>(cl); // Data populating ListStore<Stock> store = new ListStore<Stock>(props.key()); store.addAll(TestData.getStocks()); // Grid creation with data final Grid<Stock> grid = new Grid<Stock>(store, cm); grid.getView().setAutoExpandColumn(nameCol); grid.setBorders(false); grid.getView().setStripeRows(true); grid.getView().setColumnLines(true); // Filters definition StoreFilterField<Stock> filter = new StoreFilterField<Stock>() { @Override protected boolean doSelect(Store<Stock> store, Stock parent, Stock item, String filter) { // Window.alert(String.valueOf("a")); String name = item.getName(); name = name.toLowerCase(); if (name.startsWith(filter.toLowerCase())) { return true; } return false; } }; filter.bind(store); cm.addHeaderGroup(0, 0, new HeaderGroupConfig(filter, 1, 1)); filter.focus(); return grid; } My problem is: after I run this code, I cannot write anything to filter input, I'm using test data and classes (Stock.java and StockProperties.java) from this example: http://sencha.com/examples-dev/#ExamplePlace:filtergrid I try to put allert in doSelect method to check if this function was called, but it wasn't. Any idea will be welcome. Thanks.

    Read the article

  • Google App Engine for Businesses Source License

    - by jacksonemg
    I believe I read that if you wanted to use Google's App Engine, your application needed to be open source. With the recent announcement of App Engine for Business, does the same rule apply? I would like to host an application on this particular platform but have no interest in releasing the code initially (down the road, potentially).

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >