Examples of FeedBack


Examples of com.habitsoft.kiyaa.widgets.Feedback

  public void setLoadingImage(String src) {
    setLoadingHtml("<img src=\""+src+"\"/>");
  }

    private void displayError(Throwable caught) {
        Feedback fb = new Feedback();
        fb.showError(caught);
        if(GWT.getUncaughtExceptionHandler() != null)
          GWT.getUncaughtExceptionHandler().onUncaughtException(caught);
        wrapper.setWidget(fb);
    }
View Full Code Here

Examples of com.tubeonfire.entity.Feedback

  @Override
  protected void doPost(HttpServletRequest req, HttpServletResponse resp)
      throws ServletException, IOException {
    try {
      Feedback obj = new Feedback();
      TreeMap<String, String> check = new TreeMap<String, String>();
      String name = req.getParameter("name");
      String email = req.getParameter("email");
      String title = req.getParameter("title");
      String message = req.getParameter("message");

      // check name.
      if (name == null || name.length() == 0) {
        check.put("name", "Please enter your name.");
      } else {
        obj.setName(name);
      }

      // check mail
      if (email == null || email.length() == 0) {
        check.put("email", "Please enter your email.");
      } else {
        Pattern pattern = Pattern.compile(".+@.+\\.[a-z]+");
        Matcher m = pattern.matcher(email);
        boolean matchFound = m.matches();
        if (!matchFound) {
          check.put("email", "Please enter exactly email.");
        } else {
          obj.setEmail(email);
        }
      }

      // check title.
      if (title == null || title.length() == 0) {
        check.put("title", "Please enter message title.");
      } else {
        obj.setTitle(title);
      }

      // check message.
      if (message == null || message.length() == 0) {
        check.put("message", "Please enter message content.");
      } else {
        obj.setMessage(message);
      }

      // check cap.cha
      String remoteAddr = req.getRemoteAddr();
      ReCaptchaImpl reCaptcha = new ReCaptchaImpl();
      reCaptcha.setPrivateKey("6LfUNtESAAAAANSiC1e3dD974bMUFY21S5QANakS");
      String challenge = req.getParameter("recaptcha_challenge_field");
      String uresponse = req.getParameter("recaptcha_response_field");
      ReCaptchaResponse reCaptchaResponse = reCaptcha.checkAnswer(
          remoteAddr, challenge, uresponse);

      if (!reCaptchaResponse.isValid()) {
        check.put("capcha", "Please enter exactly what you see.");
      }
      if (check.size() > 0) {
        req.setAttribute("feedback", obj);
        req.setAttribute("check", check);
      } else {
        obj.setStatus(1);
        obj.setId(IdUniqueHelper.getId());
        FeedbackModel.insert(obj);
        FeedbackModel.clearModelCache();
        req.setAttribute("success",
            "Your feedback has been sent, we'll reply as soon as possible.");
      }
View Full Code Here

Examples of com.tubeonfire.entity.Feedback

  public void doGet(HttpServletRequest req, HttpServletResponse resp)
      throws IOException, ServletException {
    try {
      HttpSession session = req.getSession();
      String id = req.getParameter("id");
      Feedback obj = FeedbackModel.getById(id);
      if (obj != null) {
        obj.setStatus(2);
        FeedbackModel.insert(obj);
        FeedbackModel.clearModelCache();
        req.setAttribute("obj", obj);
        req.getRequestDispatcher("/admin/view_feedback.jsp").forward(
            req, resp);
View Full Code Here

Examples of com.tubeonfire.entity.Feedback

      throws IOException {
    String action = request.getParameter("action");
    if (action != null && action.equals("delete")) {
      try {
        String id = request.getParameter("id");
        Feedback obj = FeedbackModel.getById(id);
        if (obj != null) {
          FeedbackModel.delete(obj);
          FeedbackModel.clearModelCache();
          response.getWriter().print("");
        } else {
          response.getWriter()
              .print("Action fails ! Feedback's not exits or has been deleted !");
        }
      } catch (Exception e) {
        response.getWriter().print("Action fails ! Please try again !");
      }

    } else if (action != null && action.equals("delete-all")) {
      try {
        String strIds = (String) request.getParameter("ids");
        String[] ids = strIds.split(",");
        for (int i = 0; i < ids.length; i++) {
          if (!ids[i].isEmpty()) {
            Feedback obj = FeedbackModel.getById(ids[i]);
            if (obj != null) {
              FeedbackModel.delete(obj);             
            }           
          }
        }
View Full Code Here

Examples of com.tubeonfire.entity.Feedback

  @SuppressWarnings("unchecked")
  public static Feedback getById(String id) {
    try {
      init();
      Feedback obj = new Feedback();
      String prefix = cachePrefix + "id_" + id;
      if (cache != null && cache.containsKey(prefix)) {
        obj = (Feedback) cache.get(prefix);
      } else {
        try {
View Full Code Here

Examples of com.twilio.sdk.resource.instance.Feedback

     * {@inheritDoc}
     */
    @Override
    public Feedback create(List<NameValuePair> params) throws TwilioRestException {
        TwilioRestResponse response = this.client.safeRequest(this.parentLocation + "/Feedback.json", "POST", params);
        return new Feedback(this.client, response.toMap(), this.parentLocation);
    }
View Full Code Here

Examples of cu.repsystestbed.data.Feedback

          {
            data = new EvolData(new ArrayList<Double>(), new ArrayList<Double>(),
                new ArrayList<Double>(), new ArrayList<Double>());
          }
         
          Feedback f1 = null, f0 = null;
          double ts1 = Double.MIN_VALUE, ts0 = Double.MIN_VALUE;
         
          if(fhge.feedbacks.size() >= 2)
          {
            f1 = fhge.feedbacks.get(fhge.feedbacks.size() - 1);
View Full Code Here

Examples of cu.repsystestbed.data.Feedback

      {
        /*
         * t(u) = sum( s(u,i) * cr(p(u,i)) )
         * cr(p(u,i)) = t(p(u,i)) / sum(p(u,i))
         */
        Feedback exp = (Feedback)it2.next();
        trustScoreToBeCalculated = trustScoreToBeCalculated + exp.value * (trustScore/totalTrustScore);
      }
     
    }
   
 
View Full Code Here

Examples of cu.repsystestbed.data.Feedback

      try
      {
        for(FeedbackHistoryGraphEdge fhge : (ArrayList<FeedbackHistoryGraphEdge>) changes)
        {

          Feedback f1 = null, f0 = null;
          double ts1 = Double.MIN_VALUE, ts0 = Double.MIN_VALUE;
         
          if(fhge.feedbacks.size() >= 2)
          {
            f1 = fhge.feedbacks.get(fhge.feedbacks.size() - 1);
View Full Code Here

Examples of cu.repsystestbed.data.Feedback

  {
    this.maxAgentId = maxAgentId;
    Iterator it = feedbacks.iterator();
    while(it.hasNext())
    {
      Feedback tr = (Feedback)it.next();
      //we care only if it is  complaint
      addTransaction(tr, threshold, maxAgentId);
    }
  }
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.