Examples of ActionMessage


Examples of com.dotcms.repackage.org.apache.struts.action.ActionMessage

         * This code let it send messages of warning between pages, when
         * the session or request messages doesn't work
         * */
        if(UtilMethods.isSet(request.getParameter("message"))){
          ActionMessages message = new ActionMessages();
      message.add("message", new ActionMessage(request.getParameter("message")));
      saveMessages(request, message);
        }else if(UtilMethods.isSet(request.getParameter("error"))){
          ActionMessages errors = new ActionMessages();
      errors.add("errors", new ActionMessage(request.getParameter("error")));
      saveErrors(request, errors);
        }

        ActionForward af = (mapping.findForward("loginPage"));

View Full Code Here

Examples of flex.messaging.io.amf.ActionMessage

      throw cse;
    }

    String responseURI = getResponseURI();

    ActionMessage requestMessage = new ActionMessage( getObjectEncoding() );

    if( amfHeaders != null )
    {
      for( MessageHeader header : amfHeaders )
        requestMessage.addHeader( header );
    }

    MessageBody amfMessage = new MessageBody( command, responseURI, arguments );
    requestMessage.addBody( amfMessage );

    // Setup for AMF message serializer
    actionContext.setRequestMessage( requestMessage );
    ByteArrayOutputStream outBuffer = new ByteArrayOutputStream();
    AmfMessageSerializer amfMessageSerializer = new AmfMessageSerializer();
View Full Code Here

Examples of net.sf.jmyspaceiml.packet.ActionMessage

                message.setStatusMessage(statusMsg);
                message.setStatusCode(statusType);
                invokeMessageListener(message);
            }
            else if (type.equals(PacketType.ACTION_MESSAGE)) {
                ActionMessage message = new ActionMessage();
                message.setFrom((String) rawPacket.get("f"));
                message.setAction((String) rawPacket.get("msg"));
                invokeMessageListener(message);
            }
            else {
                Log.debug("Unsupported buddy message type: " + type);
            }
        }
        else if (rawPacket.containsKey("ka")) {
            // Keepalive status packet.
            Log.debug("Received keepalive packet.");
        }
        else if (rawPacket.containsKey("persistr")) {
            // Persistent roster packet.
            contactManager.parseContactListPacket(rawPacket);
        }
        else if (rawPacket.containsKey("error")) {
            // Error message
            ErrorMessage message = new ErrorMessage();
            message.setErrorMessage((String) rawPacket.get("errmsg"));
            message.setIsFatal(rawPacket.containsKey("fatal"));
            invokeMessageListener(message);
        }
        else {
            Log.debug("Unsupported packet type: " + rawPacket);
        }
View Full Code Here

Examples of net.yacy.upnp.messages.ActionMessage

  }
 
  private boolean testWANInterface( UPNPService srv ) {
    UPNPMessageFactory tmp = UPNPMessageFactory.getNewInstance( srv );
   
    ActionMessage msg = tmp.getMessage( "GetExternalIPAddress" );
    String ipToParse = null;
    try {
      ipToParse = msg.service().getOutActionArgumentValue( "NewExternalIPAddress" );
    } catch ( UPNPResponseException ex ) {
      // ok probably not the IP interface
    } catch ( IOException ex ) {
      // not really normal
      log.warn( "IOException occured during device detection", ex );
View Full Code Here

Examples of org.apache.struts.action.ActionMessage

    // we still okay with this at the moment
    ActionErrors validate = delegator.validate(null, null);

    for (Iterator iterator = validate.get(); iterator.hasNext();)
    {
      ActionMessage message = (ActionMessage) iterator.next();
      System.out.println("Message 1: " + message);
    }
  }
View Full Code Here

Examples of org.apache.struts.action.ActionMessage

  /* ****** helper methods ****** */

  protected String getValidationMessage(ActionErrors errors, String propertyName)
  {
    ActionMessage message = firstError(errors, propertyName);
    assert message != null;

    String outputMessage = resources.getMessage(message.getKey(), message.getValues());
    return outputMessage;
  }
View Full Code Here

Examples of org.apache.struts.action.ActionMessage

  @Override
  public ActionErrors validate(ActionMapping mapping, HttpServletRequest request)
  {
    ActionErrors errors = new ActionErrors();
    errors.add("projectName", new ActionMessage("another.error"));
    return errors;
  }
View Full Code Here

Examples of org.apache.struts.action.ActionMessage

  }

  protected ActionMessage firstError(ActionErrors errors, String propertyName)
  {
    Iterator error = errors.get(propertyName);
    ActionMessage message = (ActionMessage) error.next();
    return message;
  }
View Full Code Here

Examples of org.apache.struts.action.ActionMessage

    NavigableFormRenderBean actionBean = createStrictMock(NavigableFormRenderBean.class);
    ActionMapping mapping = createStrictMock(ActionMapping.class);
    DelegatingForm form = createStrictMock(DelegatingForm.class);

    ActionErrors errors = new ActionErrors();
    errors.add("prop", new ActionMessage("key"));
    expect(request.getAttribute(Globals.ERROR_KEY)).andReturn(errors);
    actionBean.setInputError(true);
    actionBean.execute();
    expect(form.getBindOutwards()).andReturn(false);
    expect(actionBean.getSuccessResult()).andReturn("success");
View Full Code Here

Examples of org.apache.struts.action.ActionMessage

    BasicFormAction actionBean = createStrictMock(BasicFormAction.class);
    ActionMapping mapping = createStrictMock(ActionMapping.class);
    DelegatingForm form = createStrictMock(DelegatingForm.class);

    ActionErrors errors = new ActionErrors();
    errors.add("prop", new ActionMessage("key"));
    expect(request.getAttribute(Globals.ERROR_KEY)).andReturn(errors);
    actionBean.setInputError(true);
    expect(actionBean.execute()).andReturn("success");
    expect(form.getBindOutwards()).andReturn(false);
    expect(mapping.findForward("success")).andReturn(actionForward);
View Full Code Here
TOP
Copyright © 2015 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.