Examples of Poll


Examples of javango.polls.model.Poll

    }
  }

  public HttpResponse results(HttpRequest request, Long poll_id) throws HttpException {
    try {
      Poll p = modelFactory.dao(Poll.class).get(poll_id);
      Map<String, Object> context = new HashMap<String, Object>();
      context.put("poll", p);
     
      return renderToResponse("src/main/webapp/templates/results.html", context);
    } catch (DaoException e) {
View Full Code Here

Examples of javango.polls.model.Poll

    }   
  }
 
  public HttpResponse vote(HttpRequest request, Long poll_id) throws HttpException {
    try {
      Poll p = modelFactory.dao(Poll.class).get(poll_id);
     
      VoteForm form = (VoteForm)formFactory.newForm(VoteForm.class).bind(request.getParameterMap());
      form.updateChoices(p);
     
      if (!form.isValid()) {
View Full Code Here

Examples of lejos.nxt.Poll

  @Test
  public void setPollerTest() {
    // setPoller() can only be called via setThrottle(...) since
    // modifier is private
    Poll poll = new Poll();
    poll.setThrottle(1);
    assertTrue(isCalled);
  }
View Full Code Here

Examples of lejos.nxt.Poll

    isCalled = true;
  }

  @Test
  public void setThrottleTest() {
    Poll poll = new Poll();
    poll.setThrottle(1);
    assertTrue(isCalled);
    assertTrue(hasExpectedParams);
  }
View Full Code Here

Examples of net.lalotech.struts2.map.components.Poll

    protected String timeout;   
    protected String timestep;

    @Override
    public Component getBean(ValueStack vs, HttpServletRequest hsr, HttpServletResponse hsr1) {
        return new Poll(vs, hsr, hsr1);
    }
View Full Code Here

Examples of net.lalotech.struts2.map.components.Poll

    }

    @Override
    protected void populateParams() {
        super.populateParams();
        Poll p = (Poll) component;
        p.setUrl(url);       
        p.setTimeout(timeout);       
        p.setTimestep(timestep);
    }
View Full Code Here

Examples of net.lalotech.struts2.map.components.Poll

        super(stack, req, res);
    }   

    @Override
    protected Component getBean() {
        return new Poll(stack, req, res);
    }
View Full Code Here

Examples of net.lalotech.struts2.map.components.Poll

        return "poll";
    }

    @Override
    protected Component getBean(ValueStack vs, HttpServletRequest hsr, HttpServletResponse hsr1) {
        return new Poll(vs, hsr, hsr1);
    }
View Full Code Here

Examples of org.cspoker.external.pokersource.commands.poker.Poll

    pollers.put(game_id, executor.scheduleAtFixedRate(new Runnable(){
     
      @Override
      public void run() {
        try {
          send(new Poll(game_id, 0));
        } catch(Exception e){
          //catch and rethrow to avoid ScheduledExecutorService eating it silently.
          e.printStackTrace();
          logger.error(e);
          throw new RuntimeException(e);
View Full Code Here

Examples of org.encuestame.persistence.domain.survey.Poll

     */
    @Test
    public void testGetFrontendItems() throws ServletException, IOException{
        final Question question = createQuestion("abcdefg", "pattern");
        final TweetPoll tp = createTweetPollPublicated(Boolean.TRUE, Boolean.TRUE, new Date(), getSpringSecurityLoggedUserAccount(), question);
        final Poll poll = createPoll(new Date(), question, getSpringSecurityLoggedUserAccount(), Boolean.TRUE, Boolean.TRUE);
        tp.setRelevance(50L);
        poll.setRelevance(30L);
        getTweetPoll().saveOrUpdate(tp);
        getPollDao().saveOrUpdate(poll);
        initService("/api/common/frontend/stream.json", MethodJson.GET);
        setParameter("period", "all");
        setParameter("maxResults", "10");
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.