Set zk component id prefix for selenium test support.

This commit is contained in:
Heng Sin Low 2011-02-07 18:00:56 +08:00
parent 14242ef8b6
commit 3cb79e95d4
2 changed files with 8 additions and 0 deletions

View File

@ -22,6 +22,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.adempiere.webui.AdempiereIdGenerator;
import org.adempiere.webui.LayoutUtils;
import org.compiere.util.Env;
import org.compiere.util.Msg;
@ -103,6 +104,8 @@ public final class ConfirmPanel extends Hbox
Button button = new Button();
button.setName("btn"+name);
button.setId(name);
button.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, button.getId());
String text = Msg.translate(Env.getCtx(), name);
if (!name.equals(text))
text = text.replaceAll("[&]", "");

View File

@ -30,6 +30,7 @@ import java.util.Properties;
import java.util.ResourceBundle;
import java.util.logging.Level;
import org.adempiere.webui.AdempiereIdGenerator;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.component.Combobox;
@ -261,6 +262,7 @@ public class LoginPanel extends Window implements EventListener
txtUserId = new Textbox();
txtUserId.setId("txtUserId");
txtUserId.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, txtUserId.getId());
txtUserId.setCols(25);
txtUserId.setMaxlength(40);
txtUserId.setWidth("220px");
@ -269,6 +271,8 @@ public class LoginPanel extends Window implements EventListener
txtPassword = new Textbox();
txtPassword.setId("txtPassword");
txtPassword.setType("password");
txtPassword.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, txtPassword.getId());
txtPassword.setCols(25);
// txtPassword.setMaxlength(40);
txtPassword.setWidth("220px");
@ -277,6 +281,7 @@ public class LoginPanel extends Window implements EventListener
lstLanguage.setAutocomplete(true);
lstLanguage.setAutodrop(true);
lstLanguage.setId("lstLanguage");
lstLanguage.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, lstLanguage.getId());
lstLanguage.addEventListener(Events.ON_SELECT, this);
lstLanguage.setWidth("220px");