Package de.iritgo.aktera.ui.form

Examples of de.iritgo.aktera.ui.form.ValidationResult$Message


      handler.preStorePersistents(wrappedRequest, formular, formular.getPersistents(), new Boolean(modified));

      if (request.getParameter(NO_FORM_STORE) == null && validate
              && ! NumberTools.toBool(request.getParameter(SYSTEM_EDIT), false))
      {
        ValidationResult result = null;

        try
        {
          result = FormTools.validateInput(wrappedRequest, wrappedResponse, formular, formular
                  .getPersistents());
          handler.validatePersistents(persistentConfig, wrappedRequest, wrappedResponse, formular, formular
                  .getPersistents(), NumberTools.toInt(id, - 1) == - 1, result);
        }
        catch (Exception x)
        {
          System.out.println("[Save] Error while validating input: " + x);
          x.printStackTrace();
        }

        if (result.hasErrors())
        {
          formular.setPage(Math.max(formular.getPageWithField(result.getFirstErrorField(formular).replaceAll(
                  "_", ".")), 0));
        }

        result.createResponseElements(wrappedResponse, formular);

        if (result.hasErrors())
        {
          if (! NumberTools.toBool(request.getParameter(SYSTEM_EDIT), false))
          {
            BeanRequest newRequest = new BeanRequest();
            newRequest.setBean(cmdEdit.getModel());
            newRequest.setLocale(request.getLocale());
            newRequest.setUserEnvironment(request.getUserEnvironment());
            newRequest.setParameter(keyName, id);
            newRequest.setParameter("error", result.getFirstErrorField(formular));
            redirect(cmdEdit.getModel(), newRequest, response);
            return;
          }
          else
          {
View Full Code Here


            bean = standardDao.get(persistentConfig.get(0).getAttribute("entity"), NumberTools.toInt(
                    ids[i], - 1));
          }
        }

        ValidationResult result = new ValidationResult();

        if (persistent != null)
        {
          if (handler.canDeletePersistent(wrappedRequest, ids[i], persistent, NumberTools.toBool(request
                  .getParameter(SYSTEM_DELETE), false), result))
          {
            handler.deletePersistent(wrappedRequest, wrappedResponse, ids[i], persistent, NumberTools
                    .toBool(request.getParameter(SYSTEM_DELETE), false));
          }
          else
          {
            result.createResponseElements(wrappedResponse, null);
          }
        }
        else
        {
          if (handler.canDeletePersistent(wrappedRequest, ids[i], bean, NumberTools.toBool(request
                  .getParameter(SYSTEM_DELETE), false), result))
          {
            handler.deletePersistent(wrappedRequest, wrappedResponse, ids[i], bean, NumberTools.toBool(
                    request.getParameter(SYSTEM_DELETE), false));
          }
          else
          {
            result.createResponseElements(wrappedResponse, null);
          }
        }
      }
    }
    catch (ConfigurationException x)
View Full Code Here

                    "This encoder can decode only Netty Messages.");
        }

        for (;;) {
            ByteBuffer buf = ByteBuffer.allocate(8192);
            Message m = (Message) message;
            try {
                if (m.write(buf.buf())) {
                    break;
                }
            } finally {
                buf.flip();
                if (buf.hasRemaining()) {
View Full Code Here

    public void decode(IoSession session, ByteBuffer in,
            ProtocolDecoderOutput out) throws Exception {
        put(in);

        Message m = readingMessage;
        try {
            for (;;) {
                readBuf.flip();
                if (m == null) {
                    int limit = readBuf.limit();
                    boolean failed = true;
                    try {
                        m = recognizer.recognize(readBuf);
                        failed = false;
                    } finally {
                        if (failed) {
                            // clear the read buffer if failed to recognize
                            readBuf.clear();
                            break;
                        } else {
                            if (m == null) {
                                readBuf.limit(readBuf.capacity());
                                readBuf.position(limit);
                                break; // finish decoding
                            } else {
                                // reset buffer for read
                                readBuf.limit(limit);
                                readBuf.position(0);
                            }
                        }
                    }
                }

                if (m != null) {
                    try {
                        if (m.read(readBuf)) {
                            out.write(m);
                            m = null;
                        } else {
                            break;
                        }
View Full Code Here

        }

        for( ;; )
        {
            ByteBuffer buf = ByteBuffer.allocate( 8192 );
            Message m = ( Message ) message;
            try
            {
                if( m.write( buf.buf() ) )
                {
                    break;
                }
            }
            finally
View Full Code Here

    public void decode( IoSession session, ByteBuffer in, ProtocolDecoderOutput out ) throws Exception
    {
        put( in );

        Message m = readingMessage;
        try
        {
            for( ;; )
            {
                readBuf.flip();
                if( m == null )
                {
                    int limit = readBuf.limit();
                    boolean failed = true;
                    try
                    {
                        m = recognizer.recognize( readBuf );
                        failed = false;
                    }
                    finally
                    {
                        if( failed )
                        {
                            // clear the read buffer if failed to recognize
                            readBuf.clear();
                            break;
                        }
                        else
                        {
                            if( m == null )
                            {
                                readBuf.limit( readBuf.capacity() );
                                readBuf.position( limit );
                                break; // finish decoding
                            }
                            else
                            {
                                // reset buffer for read
                                readBuf.limit( limit );
                                readBuf.position( 0 );
                            }
                        }
                    }
                }

                if( m != null )
                {
                    try
                    {
                        if( m.read( readBuf ) )
                        {
                            out.write( m );
                            m = null;
                        } else {
                            break;
View Full Code Here

        }

        for( ;; )
        {
            ByteBuffer buf = ByteBuffer.allocate( 8192 );
            Message m = ( Message ) message;
            try
            {
                if( m.write( buf.buf() ) )
                {
                    break;
                }
            }
            finally
View Full Code Here

    public void decode( IoSession session, ByteBuffer in, ProtocolDecoderOutput out ) throws Exception
    {
        put( in );

        Message m = readingMessage;
        try
        {
            for( ;; )
            {
                readBuf.flip();
                if( m == null )
                {
                    int limit = readBuf.limit();
                    boolean failed = true;
                    try
                    {
                        m = recognizer.recognize( readBuf );
                        failed = false;
                    }
                    finally
                    {
                        if( failed )
                        {
                            // clear the read buffer if failed to recognize
                            readBuf.clear();
                            break;
                        }
                        else
                        {
                            if( m == null )
                            {
                                readBuf.limit( readBuf.capacity() );
                                readBuf.position( limit );
                                break; // finish decoding
                            }
                            else
                            {
                                // reset buffer for read
                                readBuf.limit( limit );
                                readBuf.position( 0 );
                            }
                        }
                    }
                }

                if( m != null )
                {
                    try
                    {
                        if( m.read( readBuf ) )
                        {
                            out.write( m );
                            m = null;
                        } else {
                            break;
View Full Code Here

                    "This encoder can decode only Netty Messages.");
        }

        for (;;) {
            IoBuffer buf = IoBuffer.allocate(8192);
            Message m = (Message) message;
            try {
                if (m.write(buf.buf())) {
                    break;
                }
            } finally {
                buf.flip();
                if (buf.hasRemaining()) {
View Full Code Here

    public void decode(IoSession session, IoBuffer in,
            ProtocolDecoderOutput out) throws Exception {
        put(in);

        Message m = readingMessage;
        try {
            for (;;) {
                readBuf.flip();
                if (m == null) {
                    int limit = readBuf.limit();
                    boolean failed = true;
                    try {
                        m = recognizer.recognize(readBuf);
                        failed = false;
                    } finally {
                        if (failed) {
                            // clear the read buffer if failed to recognize
                            readBuf.clear();
                            break;
                        } else {
                            if (m == null) {
                                readBuf.limit(readBuf.capacity());
                                readBuf.position(limit);
                                break; // finish decoding
                            } else {
                                // reset buffer for read
                                readBuf.limit(limit);
                                readBuf.position(0);
                            }
                        }
                    }
                }

                if (m != null) {
                    try {
                        if (m.read(readBuf)) {
                            out.write(m);
                            m = null;
                        } else {
                            break;
                        }
View Full Code Here

TOP

Related Classes of de.iritgo.aktera.ui.form.ValidationResult$Message

Copyright © 2018 www.massapicom. 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.