Examples of JspView


Examples of com.firefly.mvc.web.view.JspView

  public View getFood(HttpServletRequest request) {
    Food food = new Food();
    food.setName("orange");
    food.setPrice(3.5);
    request.setAttribute("fruit", food);
    return new JspView("/food.jsp");
  }
View Full Code Here

Examples of com.firefly.mvc.web.view.JspView

    return new JspView("/food.jsp");
  }
 
  @RequestMapping(value = "/food/view1")
  public View getFoodView(HttpServletRequest request) {
    return new JspView("/foodView1.jsp");
  }
View Full Code Here

Examples of com.firefly.mvc.web.view.JspView

  private static Log log = LogFactory.getInstance().getLog("firefly-system");

  @RequestMapping(value = "/hello")
  public View index(HttpServletRequest request) {
    request.setAttribute("hello", "你好 firefly!");
    return new JspView("/index.jsp");
  }
View Full Code Here

Examples of com.firefly.mvc.web.view.JspView

  }

  @RequestMapping(value = "/book/value")
  public View bookValue(HttpServletRequest request, @HttpParam Book book) {
    request.setAttribute("book", book);
    return new JspView("/book.jsp");
  }
View Full Code Here

Examples of com.firefly.mvc.web.view.JspView

    return new JspView("/book.jsp");
  }

  @RequestMapping(value = "/book/create", method = HttpMethod.POST)
  public View createBook(@HttpParam("book") Book book) {
    return new JspView("/book.jsp");
  }
View Full Code Here

Examples of com.serotonin.m2m2.jviews.component.JspView

*/
abstract public class ViewTagSupport extends TagSupport {
    private static final long serialVersionUID = -1;

    protected JspView getJspView() throws JspException {
        JspView view = JspViewsCommon.getJspView((HttpServletRequest) pageContext.getRequest());
        if (view == null)
            throw new JspException("No JSP view in session. Use the init tag before defining points");
        return view;
    }
View Full Code Here

Examples of com.serotonin.m2m2.jviews.component.JspView

    }

    private List<JspComponentState> getViewPointData() {
        HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();

        JspView view = JspViewsCommon.getJspView(request);
        if (view == null)
            return Collections.emptyList();

        List<JspComponentState> states = new ArrayList<JspComponentState>();

        for (JspViewComponent comp : view.getComponents())
            states.add(comp.createState(Common.runtimeManager, request));

        return states;
    }
View Full Code Here

Examples of com.serotonin.m2m2.jviews.component.JspView

* @author Matthew Lohbihler
*/
public class JspViewDwr extends ModuleDwr {
    @DwrPermission(anonymous = true)
    public void setJspViewPoint(int pollSessionId, String xid, String valueStr) {
        JspView view = JspViewsCommon.getJspView(WebContextFactory.get().getHttpServletRequest());
        setPointImpl(view.getPoint(xid), valueStr, view.getAuthorityUser());
        notifyLongPollImpl(getLongPollData(pollSessionId, false).getRequest());
    }
View Full Code Here

Examples of com.serotonin.m2m2.jviews.component.JspView

        if (user == null)
            throw new JspException("Username '" + username + "' not found");
        if (user.isDisabled())
            throw new JspException("Username '" + username + "' is disabled");

        JspViewsCommon.setJspView((HttpServletRequest) pageContext.getRequest(), new JspView(user));

        return EVAL_BODY_INCLUDE;
    }
View Full Code Here

Examples of com.serotonin.m2m2.jviews.component.JspView

    }

    @Override
    public int doStartTag() throws JspException {
        // Find the custom view.
        JspView view = getJspView();

        // Find the point.
        DataPointVO dataPointVO = getDataPointVO(view, xid);

        // Add the point to the view
        int id = view.addPoint(dataPointVO, raw, disabledValue, time);

        // Add the id for the point to the page context.
        pageContext.setAttribute("componentId", id);

        return EVAL_BODY_INCLUDE;
View Full Code Here
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.