ZK - Open Source Ajax Java FrameworkZK - Open Source Ajax Java Framework

Combobox need Two Tabkeys in IE7

RFSLUX
27 Aug 2010 05:01:54 GMT
27 Aug 2010 05:01:54 GMT

Hi All,

with zk3.6.x our app worked fine, now with zk5.03 i've a little prob with the combobox and IE7.
When I set ItemIndex of Combobox i need two keypresses of <TAB> to left the Combobox to next control.

Snippet to reproduce:

Pojo:

package lu.repondo.common.pojo;

public class Currency {
	Integer currencyid = new Integer(-1);
	String iso4217 = "";
	
	public Integer getCurrencyid() {
		return currencyid;
	}
	public void setCurrencyid(Integer currencyid) {
		this.currencyid = currencyid;
	}
	public String getIso4217() {
		return iso4217;
	}
	public void setIso4217(String iso4217) {
		this.iso4217 = iso4217;
	}
}

ZUL:

<?page title="new page title" contentType="text/html;charset=UTF-8"?>
<zk>
<zscript language="Java"><![CDATA[                               
	import lu.repondo.common.pojo.Currency;
	
	List waehrungen = new ArrayList();
	Currency c= new Currency();
	c.setCurrencyid(new Integer(1));
	c.setIso4217("EUR");
	waehrungen.add(c);
	
	c= new Currency();
	c.setCurrencyid(new Integer(2));
	c.setIso4217("USD");
	waehrungen.add(c);
]]>
</zscript>

<window title="new page title" border="normal">
	<label value="insert 1 or 2: " />
	<textbox id="a" onBlur="setCombo()"/>
	<textbox id="b" />
	<combobox width="116px" id="cmbCurrency" mold="rounded" >
		<comboitem forEach="${waehrungen}" label="${each.iso4217}" value="${each.currencyid}"/>
	</combobox>	
	<textbox id="c" />

<zscript language="Java"><![CDATA[                               
	public void setCombo(){
  			Integer nWaehrung = new Integer(a.getText());
  			for(int i=0;i<cmbCurrency.getItemCount();i++){
  				Integer nKey = (Integer)cmbCurrency.getItemAtIndex(i).getValue();  				
  				if (nKey.intValue() == nWaehrung.intValue()  ){
  					cmbCurrency.setSelectedIndex(i);
  					break;
  				}
  			}		
  	}
	
	a.setFocus(true);	
]]>
</zscript>
</window>
</zk>

Insert 1 or 2 and move through the controls via <TAB>-Key

In ie7 (no other versions testet at the moment) you need two keypress of <TAB> to move from combo
to textbox "c". In Firefox 3.6 only one keypress of <TAB> is needed, so in Firefox the code works fine for me.
Any idea how to fix it for IE ??

Best regards
Jörg

RFSLUX
31 Aug 2010 03:08:41 GMT
31 Aug 2010 03:08:41 GMT

Upd.
IE8 shows same characteristics.

Every time, I set the Combobox with setSelectIndex() to a differnet value. IE need two keypress of tab to leave after getting focus.
If the Combobox gets focus second time only one keypress of tab is needed to leave the box.

A Bug ?

Best regards
Jörg

PeterKuo
2 Sep 2010 02:21:59 GMT
2 Sep 2010 02:21:59 GMT

Yes, it's a bug.
Please report it and let us track it.
I can reproduce the case.

RFSLUX
2 Sep 2010 02:53:08 GMT
2 Sep 2010 02:53:08 GMT

Th@nx PeterKuo,

Bug is reported under:
Bug report

Best regards,
Jörg