Package com.uphea

Source Code of com.uphea.IndexAction

package com.uphea;

import com.uphea.domain.Question;
import jodd.bean.BeanUtil;

/**
* Prints question for certain date.
* An example how to use actions without a container and to
* simulate request and read the results.
*/
public class IndexAction extends AppWebRunner {

  public static void main(String[] args) {
    new IndexAction().runWebApp();
  }

  @Override
  public void run() {
    com.uphea.action.IndexAction indexAction = petite.createBean(com.uphea.action.IndexAction.class);
    BeanUtil.setDeclaredProperty(indexAction, "date", "20100720");
    indexAction.view();
    Question q = (Question) BeanUtil.getDeclaredProperty(indexAction, "question");
    System.out.println(q.getText());
  }
}
TOP

Related Classes of com.uphea.IndexAction

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.