import com.codename1.ui.TextField; //导入方法依赖的package包/类
public void onLoginAction(Form f)
{
final TextField passwordField = ui.findTfdLoginPassword(f);
final TextField usernameField = ui.findTfdLoginUsername(f);
final String username = ui.findTfdLoginUsername(f).getText();
final String password = passwordField.getText();
ui.newsView.show();
/*
if(!username.equals("") && !password.equals(""))
{
InfiniteProgress inf = new InfiniteProgress();
final Dialog progress = inf.showInifiniteBlocking();
progress.setName(FORM_NAME);
if(!Api.getInstance().isOnline())
{
Api.getInstance().goOnline(new IJsonResponseHandler() {
@Override
public void onSuccess(Map data, Map headers) {
authenticate(username, passw