I have UI issue in SelectItem. I have just added SelectItem. I have not applied any Extra CSS.
I have tested it on IE6, IE8 and FF. Its look is fine on IE6 and FF. But IE8 has its display issue. IE6 has another issue. When i just click the SelectItem to select any item from the list. It immediately navigates to initial page of the application.
I have noticed same issue in showcase in Chrome browser also. To check different versions of Internet Explorers use IETester.
I was stuck with the following Code:(it is working 100% fine on FF)
Code:
HLayout middleLayout = new HLayout(5);
final DynamicForm form1 = new DynamicForm();
form.setWidth(500);
form.setNumCols(4);
SelectItem departmentItem = new SelectItem();
departmentItem.setName("department");
departmentItem.setTitle("Department");
departmentItem.setAddUnknownValues(false);
form1.setItems(departmentItem);
form1.draw();
middleLayout.addMember(form1);
final DynamicForm form1 = new DynamicForm();
form.setWidth(500);
form.setNumCols(4);
SelectItem departmentItem = new SelectItem();
departmentItem.setName("department");
departmentItem.setTitle("Department");
departmentItem.setAddUnknownValues(false);
form1.setItems(departmentItem);
form1.draw();
middleLayout.addMember(form1);
Solution:
Although i tried
http://forums.smartclient.com/showthread.php?t=8159#aIE8
Code:
<meta http-equiv="X-UA-Compatible" content="IE=6">
<meta http-equiv="X-UA-Compatible" content="IE=6">
If i use IE=7 or IE=8 then problem remains same.
After using the above tag, UI was OK but the behavior was disturbing. As I click the dropdown icon of SelectedItem. It naviagtes the website to first page of the website. Why is it so? If I click the middle of the SelectItem then it works fine.
Use GWT's widget ListBox instead of SmartGWT's SelectItem because it has issues.
ListBox departmentItem = new ListBox();
departmentItem.setName("department");
departmentItem.setTitle("Department");
departmentItem.setSize("100px", "25px");
departmentItem.addItem("Pakistan");
departmentItem.addItem("India");
departmentItem.addItem("Iran");
departmentItem.addItem("China")
Although it is answered on the smartclient forum
http://forums.smartclient.com/showthread.php?t=14456
and
http://forums.smartclient.com/showthread.php?p=55908#post55908
but not a proper answer or solution is provided there. Suggest any Solution if u have.
No comments:
Post a Comment