GWT Listbox dropdown not working - gwt

I am unable to get the dropdown feature working for ListBox in Chrome and IE. When I click on the listbox, nothing happens. If I set the number of visible items to 2 or more, then the items display, but are not selectable. Everything works fine in Firefox. Is there a workaround or an alternative?
I am using UIBinder to create the listbox
<g:ListBox ui:field="areaList" />
#UiField
ListBox areaList;
areaList.addItem("Area1");
areaList.addItem("Area2");
The html is:
&ltselect class="gwt-ListBox">
&ltoption value="Area1">Area1&lt/option>
&ltoption value="Area2">Area2&lt/option>
&lt/select>
The problem seems to be that onmousedown events trigger the display of a dropdown for chrome and IE.
&ltbody onmousedown="return false;" >

GWT ListBox is just a HTML select, which is very basic functionality and should work without any problem with all browsers. This would suggest that the problem isn't with the ListBox but with something else. But since your question doesn't include any futher details it's impossible to tell what's wrong. So can you add the code your using to create and fill the ListBox and tell if the ListBox select contains any values at all in the browsers it's not working in.

Related

Get HTML Source of temporary drag & drop element

I have this page I can only access in the browser. There is a HTML element that only exists during drag&drop, and I want to get / analyze its HTML code in the Inspector / Firebug.. but as soon as I stop dragging, the element is removed.
Is there any way of getting the generated HTML element without wading through the JS source that builds it?
EDIT: got it, using the ctrl+S shortcut in chrome to save the page while holding mouseDown with the dragged-element did the trick.
Firebug html inspection shows the HTML of the page real time, so it does show changes caused by interaction. The trick is probably to scroll the inspection panel to the section of the HTML where your drag element appears. That way you would be able to see it while you drag.

Smartgwt form's item

I am developing a website using both Smartgwt and GWTP.
When tesing with IE8, I click on some form items which have some button on it, like SelectItem, ColorPickerItem and DateItem, it will lead me to the default page. For example if i am on
http://127.0.0.1:8888/mypage.html?gwt.codesvr=127.0.0.1:9997#!somepage
, then I click on those items on this page, the address will become
http://127.0.0.1:8888/mypage.html?gwt.codesvr=127.0.0.1:9997#
But when I use Chrome, then there is no problem.
Could any one tell me what is the problem?
Thanks.
This sounds like a bug in GWTP - it suggests that they are adding anchors to all <a> elements anywhere on the page, or adding event handlers to all such elements, including ones rendered by SmartGWT.

AutoComplete does not save when there's a postback before Submit

I have a very simple asp.net form.
a text box,
a dropdownlist with autopostback,
a submit button
now if i type in some value into the textbox
and then select an item in the dropdown which causes a page postback.
then click on submit button
the value in the text box does not get saved into the autocomplete data store.
if i do the opposite.
select an item from the dropdown which will cause a page postback.
type in some values in the textbox.
click submit.
the value is saved for the autocomplete.
I think this may have something to do with the page life cycle and the viewstate. but how do i get around this issue? I'm using IE8.
I have tried the AutoCompleteSaveForm command. but it does not work if there's a postback immediately after the execution of it.
Use this for IE:
if($.browser.msie){window.external.AutoCompleteSaveForm(FormName)};
It does not work for Firefox and I'm trying to find the answer for that....

How do I get html data to show in an panel when I click an item in my listbox? gwt

I am using eclipse with the google web toolkit plugin and have built a widget which has a ListBox and a horizontal SplitLayoutPanel. I want to be able to click on an item in my list box and have it display the HTML in the top pane of my split panel. I think I need to setup click handler but I am not quite sure how to go about this. Please give me a push in the right direction.
Add a ChangeHandler to the listBoxInstance. In the onChange, get the selected value using getSelectedIndex()/getValue(). Process as required.

How can i show textbox as a Dropdownlist on mouseover

When I hover over a textbox I want it to be displayed as a dropdown list, then after I click it I want it to be displayed as a text box again, how can this be done using jquery?
Try this JqueryUI Autocomplete Box, It can be tweaked as ComboBox as well.
http://jqueryui.com/demos/autocomplete/
I suggest to use this.