Struts : Validating two forms in a single page , on a single submit

In my JSP page, i have two forms, with modifiable feilds. I'm using submit button of the 2nd form to submit both forms (ie. <form action="someAction2.do" onsubmit="return firstForm.submit();"> )
Two forms have different actions which is specified in structs-config.xml. Validation(server-side) is done using validation.xml file.On success/failure, both these actions are mapped to the same (input) JSP page.
Problem is that, validation errors in second form only is displayed. This is because, as soon as 1st form returns validation errors, the second form gets submitted. How can i specify that 2nd form should be submitted only if the 1st form doesnot return any validation errors. I know its possible using javascript at client side, but i want this validation on server-side.
Can any one please help me out. Thanks

Off hand I dont know the answer to your question. But since no one answered your question, here are my 2 cents worth:
I suggest all your JSP pages have one and only one form tag. Re write your JSP page. Make sure all your variables your submitting have unique names. (no duplicate names). As far as I know, having multiple forms on a JSP page is not normallly done and makes it difficult to alter by another programmer after you leave the company.

Similar Messages

  • Two forms on checkout registration page?

    Hi all,
    Is this scenario for checkout possible? I've been trying to implement it but keep running into issues.
    - Login field to check out as a member, check outfields are prefilled. If you check out as a member you will not be subscribed to a secure zone (this is the main reason for having two forms. I don't want people who already have a membership to get a redundant password reminder.)
    - Check out as non-member, subscribe to a secure zone - otherwise all is the same as the member form.
    The only way I can see to do this is to have two forms on checkout and show one based on logged in/logged out criteria, and this is no problem to implement. What is a problem is that the Amount field on one of the forms just won't populate - it's completely blank. If I delete one of the forms from the page, it begins to work again without a hitch.
    So I can't help thinking I'm taking the wrong approach and I just have to deal with a redundant membership details email. Or, is something going on that I'm not seeing? Any help is very very much appreciated.

    Thanks, Liam.
    The second part of your answer doesn't really hold true though. If you have a password field and have the form set to subscribe people to a secure zone on log out, it will ALWAYS send users an email giving them their username and password, and telling them what zone they're subscribed to. I understand it doesn't resubscribe them...but I want to supress this behaviour - it is undesirable. In a nutshell:
    I have two secure zones - one members (paid subscription), one general (bought something online).
    If they are a member of neither, I want them to get a general subscription on checkout.
    If they are a member, I don't want to subscribe them to anything.
    Even if i HAVE to subscribe them to the general secure zone, I'd love it if they wouldn't get notification of this.
    As far as I can tell, this scenario is not possible with your answer above.

  • Struts Validation not working

    As far as I can tell I can't see anything wrong with my validation on struts, but if I put nothing into a required field it doesn't report an error. Any ideas? Below is the offending code:
    First Validation.xml
    <form-validation>
        <formset>
            <form name="User">
                <field property="email"
                        depends="required,email">
                    <arg0 key="user.email"/>
                </field>
            </form>
        </formset>
    </form-validation>Next my struts-config.xml:
    <form-bean name="User" type="org.apache.struts.validator.DynaValidatorForm">
             <form-property name="userName" type="java.lang.String"/>
             <form-property name="password" type="java.lang.String"/>
             <form-property name="firstName" type="java.lang.String"/>
             <form-property name="lastName" type="java.lang.String"/>
             <form-property name="email" type="java.lang.String"/>
    </form-bean>next the jsp code:
    <html:form action="/profile?action=save">
    <html:errors/><BR><BR>
    <tr>
         <td align="left" valign="top"><font face="Arial, Helvetica" size="2">Email:</font></td>
         <td></td>
         <td align="left"><html:text property="email" size="35" maxlength="255" /><br><font size="1"><i>(Your name @ your company web site address)</i></font></td>
    </tr>
    </form>And my Action code:
              else if (action.equals("save")){
                   errors = form.validate(mapping, request);
                   if ((errors == null) || (errors.isEmpty())){
                        //Save Item goes here
                        return (mapping.findForward("Profile"));
                   else {
                        saveErrors(request, errors);
                        return (mapping.findForward("show"));
              }And my validator-rules.xml (it is the default one that comes with struts, but I included it just in case)
    <form-validation>
       <global>
          <validator name="required"
                classname="org.apache.struts.validator.FieldChecks"
                   method="validateRequired"
             methodParams="java.lang.Object,
                           org.apache.commons.validator.ValidatorAction,
                           org.apache.commons.validator.Field,
                           org.apache.struts.action.ActionErrors,
                           javax.servlet.http.HttpServletRequest"
                      msg="errors.required">
             <javascript><![CDATA[
                function validateRequired(form) {
                    var isValid = true;
                    var focusField = null;
                    var i = 0;
                    var fields = new Array();
                    oRequired = new required();
                    for (x in oRequired) {
                         var field = form[oRequired[x][0]];
                        if (field.type == 'text' ||
                            field.type == 'textarea' ||
                            field.type == 'file' ||
                            field.type == 'select-one' ||
                            field.type == 'radio' ||
                            field.type == 'password') {
                            var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                            value = field.options[si].value;
                                  } else {
                                       value = field.value;
                            if (trim(value).length == 0) {
                                 if (i == 0) {
                                     focusField = field;
                                 fields[i++] = oRequired[x][1];
                                 isValid = false;
                    if (fields.length > 0) {
                       focusField.focus();
                       alert(fields.join('\n'));
                    return isValid;
                // Trim whitespace from left and right sides of s.
                function trim(s) {
                    return s.replace( /^\s*/, "" ).replace( /\s*$/, "" );
                ]]>
             </javascript>
          </validator>
          <validator name="requiredif"
                     classname="org.apache.struts.validator.FieldChecks"
                     method="validateRequiredIf"
                     methodParams="java.lang.Object,
                                   org.apache.commons.validator.ValidatorAction,
                                   org.apache.commons.validator.Field,
                                   org.apache.struts.action.ActionErrors,
                                   org.apache.commons.validator.Validator,
                                   javax.servlet.http.HttpServletRequest"
                     msg="errors.required">
          </validator>
          <validator name="minlength"
                classname="org.apache.struts.validator.FieldChecks"
                   method="validateMinLength"
             methodParams="java.lang.Object,
                           org.apache.commons.validator.ValidatorAction,
                           org.apache.commons.validator.Field,
                           org.apache.struts.action.ActionErrors,
                           javax.servlet.http.HttpServletRequest"
                  depends=""
                      msg="errors.minlength">
             <javascript><![CDATA[
                function validateMinLength(form) {
                    var isValid = true;
                    var focusField = null;
                    var i = 0;
                    var fields = new Array();
                    oMinLength = new minlength();
                    for (x in oMinLength) {
                        var field = form[oMinLength[x][0]];
                        if (field.type == 'text' ||
                            field.type == 'textarea') {
                            var iMin = parseInt(oMinLength[x][2]("minlength"));
                            if ((trim(field.value).length > 0) && (field.value.length < iMin)) {
                                if (i == 0) {
                                    focusField = field;
                                fields[i++] = oMinLength[x][1];
                                isValid = false;
                    if (fields.length > 0) {
                       focusField.focus();
                       alert(fields.join('\n'));
                    return isValid;
                }]]>
             </javascript>
          </validator>
          <validator name="maxlength"
                classname="org.apache.struts.validator.FieldChecks"
                   method="validateMaxLength"
             methodParams="java.lang.Object,
                           org.apache.commons.validator.ValidatorAction,
                           org.apache.commons.validator.Field,
                           org.apache.struts.action.ActionErrors,
                           javax.servlet.http.HttpServletRequest"
                  depends=""
                      msg="errors.maxlength">
             <javascript><![CDATA[
                function validateMaxLength(form) {
                    var isValid = true;
                    var focusField = null;
                    var i = 0;
                    var fields = new Array();
                    oMaxLength = new maxlength();
                    for (x in oMaxLength) {
                        var field = form[oMaxLength[x][0]];
                        if (field.type == 'text' ||
                            field.type == 'textarea') {
                            var iMax = parseInt(oMaxLength[x][2]("maxlength"));
                            if (field.value.length > iMax) {
                                if (i == 0) {
                                    focusField = field;
                                fields[i++] = oMaxLength[x][1];
                                isValid = false;
                    if (fields.length > 0) {
                       focusField.focus();
                       alert(fields.join('\n'));
                    return isValid;
                }]]>
             </javascript>
          </validator>
          <validator name="mask"
                classname="org.apache.struts.validator.FieldChecks"
                   method="validateMask"
             methodParams="java.lang.Object,
                           org.apache.commons.validator.ValidatorAction,
                           org.apache.commons.validator.Field,
                           org.apache.struts.action.ActionErrors,
                           javax.servlet.http.HttpServletRequest"
                  depends=""
                      msg="errors.invalid">
             <javascript><![CDATA[
                function validateMask(form) {
                    var isValid = true;
                    var focusField = null;
                    var i = 0;
                    var fields = new Array();
                    oMasked = new mask();
                    for (x in oMasked) {
                        var field = form[oMasked[x][0]];
                        if ((field.type == 'text' ||
                             field.type == 'textarea') &&
                             (field.value.length > 0)) {
                            if (!matchPattern(field.value, oMasked[x][2]("mask"))) {
                                if (i == 0) {
                                    focusField = field;
                                fields[i++] = oMasked[x][1];
                                isValid = false;
                    if (fields.length > 0) {
                       focusField.focus();
                       alert(fields.join('\n'));
                    return isValid;
                function matchPattern(value, mask) {
                   return mask.exec(value);
                }]]>
             </javascript>
          </validator>
          <validator name="byte"
                classname="org.apache.struts.validator.FieldChecks"
                   method="validateByte"
             methodParams="java.lang.Object,
                           org.apache.commons.validator.ValidatorAction,
                           org.apache.commons.validator.Field,
                           org.apache.struts.action.ActionErrors,
                           javax.servlet.http.HttpServletRequest"
                  depends=""
                      msg="errors.byte"
           jsFunctionName="ByteValidations">
             <javascript><![CDATA[
                function validateByte(form) {
                    var bValid = true;
                    var focusField = null;
                    var i = 0;
                    var fields = new Array();
                    oByte = new ByteValidations();
                    for (x in oByte) {
                         var field = form[oByte[x][0]];
                        if (field.type == 'text' ||
                            field.type == 'textarea' ||
                            field.type == 'select-one' ||
                                  field.type == 'radio') {
                                  var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                            value = field.options[si].value;
                                  } else {
                                       value = field.value;
                            if (value.length > 0) {
                                if (!isAllDigits(value)) {
                                    bValid = false;
                                    if (i == 0) {
                                        focusField = field;
                                    fields[i++] = oByte[x][1];
                                } else {
                                     var iValue = parseInt(value);
                                     if (isNaN(iValue) || !(iValue >= -128 && iValue <= 127)) {
                                         if (i == 0) {
                                             focusField = field;
                                         fields[i++] = oByte[x][1];
                                         bValid = false;
                    if (fields.length > 0) {
                       focusField.focus();
                       alert(fields.join('\n'));
                    return bValid;
                }]]>
             </javascript>
          </validator>
          <validator name="short"
                classname="org.apache.struts.validator.FieldChecks"
                   method="validateShort"
             methodParams="java.lang.Object,
                           org.apache.commons.validator.ValidatorAction,
                           org.apache.commons.validator.Field,
                           org.apache.struts.action.ActionErrors,
                           javax.servlet.http.HttpServletRequest"
                  depends=""
                      msg="errors.short"
           jsFunctionName="ShortValidations">
             <javascript><![CDATA[
                function validateShort(form) {
                    var bValid = true;
                    var focusField = null;
                    var i = 0;
                    var fields = new Array();
                    oShort = new ShortValidations();
                    for (x in oShort) {
                         var field = form[oShort[x][0]];
                        if (field.type == 'text' ||
                            field.type == 'textarea' ||
                            field.type == 'select-one' ||
                            field.type == 'radio') {
                            var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                            value = field.options[si].value;
                                  } else {
                                       value = field.value;
                            if (value.length > 0) {
                                if (!isAllDigits(value)) {
                                    bValid = false;
                                    if (i == 0) {
                                        focusField = field;
                                    fields[i++] = oShort[x][1];
                                } else {
                                     var iValue = parseInt(value);
                                     if (isNaN(iValue) || !(iValue >= -32768 && iValue <= 32767)) {
                                         if (i == 0) {
                                             focusField = field;
                                         fields[i++] = oShort[x][1];
                                         bValid = false;
                    if (fields.length > 0) {
                       focusField.focus();
                       alert(fields.join('\n'));
                    return bValid;
                }]]>
             </javascript>
          </validator>
          <validator name="integer"
                classname="org.apache.struts.validator.FieldChecks"
                   method="validateInteger"
             methodParams="java.lang.Object,
                           org.apache.commons.validator.ValidatorAction,
                           org.apache.commons.validator.Field,
                           org.apache.struts.action.ActionErrors,
                           javax.servlet.http.HttpServletRequest"
                  depends=""
                      msg="errors.integer"
           jsFunctionName="IntegerValidations">
             <javascript><![CDATA[
                function validateInteger(form) {
                    var bValid = true;
                    var focusField = null;
                    var i = 0;
                    var fields = new Array();
                    oInteger = new IntegerValidations();
                    for (x in oInteger) {
                         var field = form[oInteger[x][0]];
                        if (field.type == 'text' ||
                            field.type == 'textarea' ||
                            field.type == 'select-one' ||
                            field.type == 'radio') {
                            var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                      if (si >= 0) {
                                           value = field.options[si].value;
                                  } else {
                                       value = field.value;
                            if (value.length > 0) {
                                if (!isAllDigits(value)) {
                                    bValid = false;
                                    if (i == 0) {
                                         focusField = field;
                                          fields[i++] = oInteger[x][1];
                                } else {
                                     var iValue = parseInt(value);
                                     if (isNaN(iValue) || !(iValue >= -2147483648 && iValue <= 2147483647)) {
                                         if (i == 0) {
                                             focusField = field;
                                         fields[i++] = oInteger[x][1];
                                         bValid = false;
                    if (fields.length > 0) {
                       focusField.focus();
                       alert(fields.join('\n'));
                    return bValid;
                function isAllDigits(argvalue) {
                    argvalue = argvalue.toString();
                    var validChars = "0123456789";
                    var startFrom = 0;
                    if (argvalue.substring(0, 2) == "0x") {
                       validChars = "0123456789abcdefABCDEF";
                       startFrom = 2;
                    } else if (argvalue.charAt(0) == "0") {
                       validChars = "01234567";
                       startFrom = 1;
                    } else if (argvalue.charAt(0) == "-") {
                        startFrom = 1;
                    for (var n = startFrom; n < argvalue.length; n++) {
                        if (validChars.indexOf(argvalue.substring(n, n+1)) == -1) return false;
                    return true;
                }]]>
             </javascript>
          </validator>
          <validator name="long"
                classname="org.apache.struts.validator.FieldChecks"
                   method="validateLong"
             methodParams="java.lang.Object,
                           org.apache.commons.validator.ValidatorAction,
                           org.apache.commons.validator.Field,
                           org.apache.struts.action.ActionErrors,
                           javax.servlet.http.HttpServletRequest"
                  depends=""
                      msg="errors.long"/>
          <validator name="float"
                classname="org.apache.struts.validator.FieldChecks"
                   method="validateFloat"
             methodParams="java.lang.Object,
                           org.apache.commons.validator.ValidatorAction,
                           org.apache.commons.validator.Field,
                           org.apache.struts.action.ActionErrors,
                           javax.servlet.http.HttpServletRequest"
                  depends=""
                      msg="errors.float"
           jsFunctionName="FloatValidations">
             <javascript><![CDATA[
                function validateFloat(form) {
                    var bValid = true;
                    var focusField = null;
                    var i = 0;
                    var fields = new Array();
                    oFloat = new FloatValidations();
                    for (x in oFloat) {
                         var field = form[oFloat[x][0]];
                        if (field.type == 'text' ||
                            field.type == 'textarea' ||
                            field.type == 'select-one' ||
                            field.type == 'radio') {
                             var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                           value = field.options[si].value;
                                  } else {
                                       value = field.value;
                            if (value.length > 0) {
                                // remove '.' before checking digits
                                var tempArray = value.split('.');
                                var joinedString= tempArray.join('');
                                if (!isAllDigits(joinedString)) {
                                    bValid = false;
                                    if (i == 0) {
                                        focusField = field;
                                    fields[i++] = oFloat[x][1];
                                } else {
                                     var iValue = parseFloat(value);
                                     if (isNaN(iValue)) {
                                         if (i == 0) {
                                             focusField = field;
                                         fields[i++] = oFloat[x][1];
                                         bValid = false;
                    if (fields.length > 0) {
                       focusField.focus();
                       alert(fields.join('\n'));
                    return bValid;
                }]]>
             </javascript>
          </validator>
          <validator name="double"
                classname="org.apache.struts.validator.FieldChecks"
                   method="validateDouble"
             methodParams="java.lang.Object,
                           org.apache.commons.validator.ValidatorAction,
                           org.apache.commons.validator.Field,
                           org.apache.struts.action.ActionErrors,
                           javax.servlet.http.HttpServletRequest"
                  depends=""
                      msg="errors.double"/>
          <validator name="date"
                classname="org.apache.struts.validator.FieldChecks"
                   method="validateDate"
             methodParams="java.lang.Object,
                           org.apache.commons.validator.ValidatorAction,
                           org.apache.commons.validator.Field,
                           org.apache.struts.action.ActionErrors,
                           javax.servlet.http.HttpServletRequest"
                  depends=""
                      msg="errors.date"
           jsFunctionName="DateValidations">
             <javascript><![CDATA[
                function validateDate(form) {
                   var bValid = true;
                   var focusField = null;
                   var i = 0;
                   var fields = new Array();
                   oDate = new DateValidations();
                   for (x in oDate) {
                       var value = form[oDate[x][0]].value;
                       var datePattern = oDate[x][2]("datePatternStrict");
                       if ((form[oDate[x][0]].type == 'text' ||
                            form[oDate[x][0]].type == 'textarea') &&
                           (value.length > 0) &&
                           (datePattern.length > 0)) {
                         var MONTH = "MM";
                         var DAY = "dd";
                         var YEAR = "yyyy";
                         var orderMonth = datePattern.indexOf(MONTH);
                         var orderDay = datePattern.indexOf(DAY);
                         var orderYear = datePattern.indexOf(YEAR);
                         if ((orderDay < orderYear && orderDay > orderMonth)) {
                             var iDelim1 = orderMonth + MONTH.length;
                             var iDelim2 = orderDay + DAY.length;
                             var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
                             var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
                             if (iDelim1 == orderDay && iDelim2 == orderYear) {
                                dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
                             } else if (iDelim1 == orderDay) {
                                dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
                             } else if (iDelim2 == orderYear) {
                                dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
                             } else {
                                dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
                             var matched = dateRegexp.exec(value);
                             if(matched != null) {
                                if (!isValidDate(matched[2], matched[1], matched[3])) {
                                   if (i == 0) {
                                       focusField = form[oDate[x][0]];
                                   fields[i++] = oDate[x][1];
                                   bValid =  false;
                             } else {
                                if (i == 0) {
                                    focusField = form[oDate[x][0]];
                                fields[i++] = oDate[x][1];
                                bValid =  false;
                         } else if ((orderMonth < orderYear && orderMonth > orderDay)) {
                             var iDelim1 = orderDay + DAY.length;
                             var iDelim2 = orderMonth + MONTH.length;
                             var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
                             var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
                             if (iDelim1 == orderMonth && iDelim2 == orderYear) {
                                 dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
                             } else if (iDelim1 == orderMonth) {
                                 dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
                             } else if (iDelim2 == orderYear) {
                                 dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
                             } else {
                                 dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
                             var matched = dateRegexp.exec(value);
                             if(matched != null) {
                                 if (!isValidDate(matched[1], matched[2], matched[3])) {
                                     if (i == 0) {
                                         focusField = form[oDate[x][0]];
                                     fields[i++] = oDate[x][1];
                                     bValid =  false;
                             } else {
                                 if (i == 0) {
                                     focusField = form[oDate[x][0]];
                                 fields[i++] = oDate[x][1];
                                 bValid =  false;
                         } else if ((orderMonth > orderYear && orderMonth < orderDay)) {
                             var iDelim1 = orderYear + YEAR.length;
                             var iDelim2 = orderMonth + MONTH.length;
                             var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
                             var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
                             if (iDelim1 == orderMonth && iDelim2 == orderDay) {
                                 dateRegexp = new RegExp("^(\\d{4})(\\d{2})(\\d{2})$");
                             } else if (iDelim1 == orderMonth) {
                                 dateRegexp = new RegExp("^(\\d{4})(\\d{2})[" + delim2 + "](\\d{2})$");
                             } else if (iDelim2 == orderDay) {
                                 dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})(\\d{2})$");
                             } else {
                                 dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{2})$");
                             var matched = dateRegexp.exec(value);
                             if(matched != null) {
                                 if (!isValidDate(matched[3], matched[2], matched[1])) {
                                     if (i == 0) {
                                         focusField = form[oDate[x][0]];
                                      fields[i++] = oDate[x][1];
                                      bValid =  false;
                              } else {
                                  if (i == 0) {
                                      focusField = form[oDate[x][0]];
                                  fields[i++] = oDate[x][1];
                                  bValid =  false;
                         } else {
                             if (i == 0) {
                                 focusField = form[oDate[x][0]];
                             fields[i++] = oDate[x][1];
                             bValid =  false;
                   if (fields.length > 0) {
                      focusField.focus();
                      alert(fields.join('\n'));
                   return bValid;
             function isValidDate(day, month, year) {
                 if (month < 1 || month > 12) {
                        return false;
                    if (day < 1 || day > 31) {
                        return false;
                    if ((month == 4 || month == 6 || month == 9 || month == 11) &&
                        (day == 31)) {
                        return false;
                    if (month == 2) {
                        var leap = (year % 4 == 0 &&
                                   (year % 100 != 0 || year % 400 == 0));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         

    Next my struts-config.xml:That's all? What about an <action-mappings> section
    which specifies the action URIs and whether or not
    validation is turned on for specific ones?Whoops, sorry I forgot to put my action, although you just made me figure out the answer. I forgot I have 2 versions of the bean, one called Profile and one Called User, and I was trying to test the validation on the Profile bean while I was specifying the User bean :)

  • If I set Firefox to refrain from loading images automatically, how can I view a single image, or a single page's images, without having to enter the site in the Exceptions list, only to go back and remove it when I'm done?

    I was hoping for a hotkey option or button on the toolbar to load images for a single page for a single session at a time. Turning off images really saves bandwidth and speeds load time on websites, but sometimes I'd like to view the images on a page, but only for this session. Is that possible, or do I have to go to the Exceptions page and allow a specific domain or page to load images and then go back and remove that domain or page when I'm done?

    *Image Block: https://addons.mozilla.org/firefox/addon/image-block/

  • Forms, web applications, dynamic pages

    Hi.
    Can someone tell me what the best method is to create a form
    in DW? Correct me if I am wrong as I am quite new to this, but I
    see a lot of sites out there with different types of
    pages...they're using .aspx, .jsp, .php, .cgi, .html, .asp .cfm
    .........etc. Which one do you use??
    I want a form for contact info filled in & then you click
    a submit button & an email goes to your email listing all the
    fields & the entries of whoever filled your form. What is the
    difference of all of those mentioned above?
    Also what is the difference between .aspx & .asp?
    .html & .htm?
    Any help would be appreciated.
    Thanks.

    Forms can be html pages but once the submit button is clicked
    the form is
    usually processed on the sever hence the .asp. .aspx .jsp
    .php etc.
    Search google for active server pages. You can also look at
    the help file
    for info on database sites.
    Dave
    "Stella1251" <[email protected]> wrote in
    message
    news:gpmak2$ftb$[email protected]..
    > Hi.
    >
    > Can someone tell me what the best method is to create a
    form in DW?
    Correct me
    > if I am wrong as I am quite new to this, but I see a lot
    of sites out
    there
    > with different types of pages...they're using .aspx,
    .jsp, .php, .cgi,
    .html,
    > .asp .........etc. Which one do you use??
    >
    > I want a form for contact info filled in & then you
    click a submit button
    & an
    > email goes to your email listing all the fields &
    the entries of whoever
    filled
    > your form. What is the difference of all of those
    mentioned above?
    >
    > Also what is the difference between .aspx & .asp?
    > .html & .htm?
    >
    > Any help would be appreciated.
    > Thanks.
    >

  • Two SAPScript forms on a single page

    Hello
    Is there a way (in SAPScript) to have two forms (sapscript forms defined in SE71) printed in a single page ?
    What I would like to achieve is to have several sapscript forms defined in the system and to be able to combine them in a single page dynamicallly - I mean: the printing program would decide which of them should be output.
    I have one sapscript form which I want to output always - it contains some header and main window with some items. Apart from this form I need to print some additional information on the same page.
    This additional information may be formated in a few different ways - depending on the case. I need to include this info at the top of the page - formatted in one of possible ways mentioned. The rest of the page is always the same (some header and main window with items).
    I know I could just use windows definitions in a single sapsript form and let the printing program decide which of those windows to print. But my problem is: I would like to have different sizes of the information printed at the top of the pages - when I define a window I must declare height which will be occupied on the page - I'd like to have different height values for different cases.
    Is there a way to achieve that ?
    thanks in advance
    regards

    Hi,
    It is not possible.
    But instead of creating sapscript, why dont you create different standard text and call in same sap-script based on condition.
    You can create standard text in tcode so10. Its similar to editor in sap-script.
    Reward if useful

  • Two forms at same page

    1st my sincere thanks for all the help and suggestions so far from apex group of friends.
    I have a very critical dilevery to submit by tommorow and i am stucked on this, so please try to help me out with this...
    I have a requirement like to fill up a form and once i click the submit button the fields data will be updated in the database table DIM_INDICATOR whose structure is like this.
    CREATE TABLE  "DIM_INDICATOR"
       (     "DIMENSION_KEY" NUMBER NOT NULL ENABLE,
         "DESCRIPTION" VARCHAR2(2000),
         "INDICATOR_CODE" VARCHAR2(16) NOT NULL ENABLE,
         "INDICATOR_STATUS" VARCHAR2(3),
         "REVISION" VARCHAR2(7),
         "ID" NUMBER,
         "INDICATOR_NAME" VARCHAR2(100) NOT NULL ENABLE,
         "FORMATSTRING" VARCHAR2(20) DEFAULT '999G999G990D99',
         "FORMATSUFFIX" VARCHAR2(1) DEFAULT '%',
         "SCFA_SUBDOMAIN_ID" NUMBER,
         "PLANNED_DELIVERY" VARCHAR2(20),
         "PLANNED_DELIVERY_COMMENT" VARCHAR2(200),
         "QIX_INCLUDE_REQUESTOR" VARCHAR2(100),
         "INDICATOR_NAME_ARB" VARCHAR2(100),
         "DESCRIPTION_ARB" VARCHAR2(2000),
         "UNIT_ENG" VARCHAR2(100),
         "UNIT_ARB" VARCHAR2(100),
         "REMARKS" VARCHAR2(2000),
         "SCFA_DOMAIN_ENG" VARCHAR2(100),
         "SCFA_SUBDOMAIN_ENG" VARCHAR2(100),
         "SCFA_DOMAIN_ARB" VARCHAR2(100),
         "SCFA_SUBDOMAIN_ARB" VARCHAR2(100),
         "CREA_USER" VARCHAR2(30),
         "CREA_DATE" DATE DEFAULT sysdate,
         "MODI_USER" VARCHAR2(30),
         "MODI_DATE" DATE DEFAULT sysdate,
         "AGGREGABLE" VARCHAR2(1) DEFAULT 'N',
         "SORT_ORDER" NUMBER(5,0),
          CONSTRAINT "DIM_INDIC_DIMENSION_KEY_PK" PRIMARY KEY ("DIMENSION_KEY") ENABLE
    ALTER TABLE  "DIM_INDICATOR" ADD CONSTRAINT "DIM_INDICATOR_STATUS_FK" FOREIGN KEY ("INDICATOR_STATUS")
           REFERENCES "VPD"."ADM_INDICATOR_STATUS" ("INDICATOR_STATUS") ENABLE
    CREATE OR REPLACE TRIGGER  "DIM_INDICATOR_BFI"
      before insert or update on dim_indicator 
      for each row
    begin
      IF inserting AND :new.dimension_key IS NULL THEN
        select seq_indicators.nextval into :new.dimension_key from dual;
      :new.id := :new.dimension_key; 
      END IF;
      IF inserting THEN
        :new.crea_user := nvl(v('APP_USER'),USER);
        :new.crea_date := sysdate;
      END IF;
      IF updating THEN
        :new.modi_user := nvl(v('APP_USER'),USER);
        :new.modi_date := sysdate;
      END IF;
    end dim_indicator_bfi;
    ALTER TRIGGER  "DIM_INDICATOR_BFI" ENABLEAt the same time in the same page i have to make a tabular form (We wan to use tablular form here because we will get the functionality of add rows here) which will ask the user to fill the DESCRIPTION_ENG and DESCRIPTION_ENG columns which will update in ADM_INDICATOR_PROVIDER table whose structure is like this.
    CREATE TABLE  "ADM_INDICATOR_PROVIDER"
       (     "INDICATOR_PROVIDER_ID" NUMBER NOT NULL ENABLE,
         "INDICATOR" NUMBER NOT NULL ENABLE,
         "DATA_SOURCE" NUMBER NOT NULL ENABLE,
         "EQUATION_ENG" VARCHAR2(2000),
         "EQUATION_ARB" VARCHAR2(2000),
         "DESCRIPTION_ENG" VARCHAR2(2000),
         "DESCRIPTION_ARB" VARCHAR2(2000),
         "CREA_USER" VARCHAR2(30),
         "CREA_DATE" DATE DEFAULT sysdate,
         "MODI_USER" VARCHAR2(30),
         "MODI_DATE" DATE DEFAULT null,
          CONSTRAINT "ADM_INDICATOR_PROVIDER_PK" PRIMARY KEY ("INDICATOR_PROVIDER_ID") ENABLE,
          CONSTRAINT "ADM_INDICATOR_PROVIDER_UQ" UNIQUE ("INDICATOR", "DATA_SOURCE") ENABLE
    ALTER TABLE  "ADM_INDICATOR_PROVIDER" ADD CONSTRAINT "ADM_INDICATOR_PROVIDER_IND_FK" FOREIGN KEY ("INDICATOR")
           REFERENCES "DWH"."DIM_INDICATOR" ("DIMENSION_KEY") ENABLE
    ALTER TABLE  "ADM_INDICATOR_PROVIDER" ADD CONSTRAINT "ADM_INDICATOR_PROVIDER_PROV_FK" FOREIGN KEY ("DATA_SOURCE")
           REFERENCES "DWH"."DIM_DATA_SOURCE" ("DIMENSION_KEY") ENABLE
    CREATE OR REPLACE TRIGGER  "ADM_INDICATOR_PROVIDER_TRG"
    BEFORE INSERT OR UPDATE  ON adm_indicator_provider
    FOR EACH ROW
    BEGIN
      IF inserting AND :new.indicator_provider_id IS NULL THEN
        SELECT adm_indicator_provider_seq.nextval
        INTO :new.indicator_provider_id
        FROM dual;
      END IF;
      IF inserting THEN
        :new.crea_user := nvl(v('USER'),USER);
        :new.crea_date := sysdate;
      END IF;
      IF updating THEN
        :new.modi_user := nvl(v('USER'),USER);
        :new.modi_date := sysdate;
      END IF;
    END;
    ALTER TRIGGER  "ADM_INDICATOR_PROVIDER_TRG" ENABLE
    /NOTE : Here the DIMENSION_KEY column of DIM_INDICATOR is same as INDICATOR column of ADM_INDICATOR_PROVIDER
    So at the same page i have to show two forms,1st for dim_indicator table and other is for adm_indicator_provider table. Once the user clicks the submit button my procedure should check that 1st form is filled and ask him to fill the fields of 2nd form before updating in both the tables.(dim_indicator and adm_indicator_provider)
    I know its a big one favor i am asking for...but i am really looking for a kind reply from someone who could help me out to achieve it for sure
    Regards
    Adi

    Hello,
    I don’t think you’ll be able to find a simple wizard solution for your restrictions, especially not using tabular forms. One reason is that when you add rows to the tabular form you actually submitting the page. Any validation errors in the first table will reset all the updated/new information on the tabular form, and in case of more than one description to a single indicator you might create temporary inconsistency in your database, that might not be acceptable by your application logic restrictions, not to mention potential problems in multi-user environment.
    You should design your form manually, and consider using a view that reflects both your tables. For the long run, it will probably take you less time than forcing the wizards to do what you want (if it's even possible).
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Forthcoming book about APEX: Oracle Application Express 3.2 – The Essentials and More

  • How can I make some pages in a PDF display in single-page view and others in two-page (facing) view?

    Exactly as it says on the tin. I am looking to save a PDF magazine/book layout in such a way so that when opened, only the front and back covers open to the viewer in single-page mode, and the rest of the pages in two-page facing mode, without re-printing the in-between pages in booklet format  and re-inserting them into a new PDF (with the front and back covers left separate and untouched, and included as single portrait-orientation pages). This is so that individual pages can still be printed (on a physical printer, not a "virtual" one like a PDF driver), as-is without having the page next to it included, or the printouts always requiring landscape orientation (resulting with two "pages" from the PDF showing up on one sheet of paper).
    So when the PDF is opened, I want just the front and back cover to be auto-viewed by themselves, and the content (the "meat" of the document) viewed side-by-side, as though one were actually reading a "book" -- but without actually re-doing the content pages to be "fused" side-by-side. Thus creating the "illusion" that they are, in fact, in booklet form. Is this possible, to have different page-display settings for different pages/page ranges in a single PDF? If so, how is this done? If not, what would be my best course of action otherwise to achieve this "virtual" book layout, while still retaining the "physical" structure of the document and allowing individual pages to be printed by themselves rather than "fused" together?
    Using Acrobat X Pro on Windows 7 Pro SP1.

    Dave Merchant wrote:
    The best you can do practicably is the 'two up with cover page' view mode. The first page will appear singly but not centered, and to get the last page to behave it would have to be a folio sheet.
    It's theoretically possible to use JavaScript to reset the view mode as each page is changed, but it makes for a nightmare of usability (what if someone on a smaller display wants to use 'fit to width'? Not an option if JS keeps overruling it). Anything involving JS won't work on non-Adobe software or mobile devices.
    Not a programmer by any means, so I won't be using JavaScript because I wouldn't know where to begin. I was thinking more in terms of an option I could adjust in the menus or dialogues.

  • SAP Script need to display main window two times on single page.

    Hello Guru's,
    So here is my requirement, we need to print check. We are using F110_PRENUM_CHCK and linked with driver prog RFFOUS_C. We have Letter size paper with three sections,
    1. Check
    2. Voucher Section (containing table of element 515, 525 and 530) 515: Heading, 525 : Regup-Belnr, Regup-XBLNR, Regud-Wrbtr.
                                                                                    530: Regup-SGTXT
    3. Voucher Section (As a receipt for bank itself) : contains same data as 2nd section.
    I tried several things reading all the previous post over here in SDN.
    1. Created Z form created two instances of main window it results just single display of table (voucher section) in section two and not in third.
    2. I also tried pasting two times same code in single main window which gives only last item line for the table.
    3. Created z driver program made changes in Write_form added control form for element 515 that does results in showing element 515 on both the location.
                CALL FUNCTION 'CONTROL_FORM'
                  EXPORTING
                    command   = 'NEW-WINDOW'
                  EXCEPTIONS
                    unopened  = 1
                    unstarted = 2
                    OTHERS    = 3.
                CALL FUNCTION 'WRITE_FORM'
                  EXPORTING
                    element = '515'
                  EXCEPTIONS
                    window  = 1
                    element = 2.
    3. For Element 525 and element 530 is not acting same. In the prog 525 = hlp_ep_element. And there are many write_form for this. I tried pasting each and every place same kind of code. It doesnt work. what it do it gives me three pages of output repeating every thing twice and weirdly.
    I am need this to be done as I already took so much time solving nothing is working.
    Please give me the exact location where to paste this code so I can have two times data of main window.
    Or is there any other way to do this....Any way will be good for me as long as it shows two times data in the form.
    The data is table.

    Hi Manju,
    I create a new window (no main) but does not run, please can you tell me what should I do to make it work.
    Best regards.
    Robert.

  • Inconsistent Form Behavior on Failed Struts Validation

    So I'm working on a strange bug regarding an Edit User form for an application, where some fields revert to their default and some fields do not.
    We have a form for editing users in our system, with most of the usual information inputted in text boxes (login, first name, last name, password, password confirmation). We also have three possible levels of 'admin' - none, admin, and superadmin. These are chosen via radio buttons. There are also a couple of checkboxes (like 'user is active'). Overall, it's a fairly simple form.
    When the form is submitted, we do struts validation. We've set up the validation via comment annotation in our Java code, like so:
         * @struts.validator type="minlength"
         *                   arg1value="${var:minlength}"
         * @struts.validator-var name="minlength" value="8"
         * @struts.validator type="maxlength"
         *                   arg2value="${var:maxlength}"
         * @struts.validator-var name="maxlength" value="50"
        public void setPassword1(String string) {
            password1 = string;
        }All of the fields in our form are set from user properties, so they're initialized by the values in the user object. For example, if we had user John Smith, an admin, with login 'jsmith,' we'd have the first name and last name fields initialized to John and Smith, and the radio buttons for Admin set to 'admin.' For reference, here's the EditUser.jsp code for the radio buttons, based off of the selectedAdminRole property:
    <div class="InputElement">
            <label for="selectedAdminRole"><bean:message key="userForm.adminType"/></label>
              <html:radio styleId="selectedAdminRole" property="selectedAdminRole" value="None"
                          disabled="${userForm.loggedInUser.admin and userForm.userId == userForm.loggedInUser.id}">None</html:radio>
              <html:radio property="selectedAdminRole" value="Admin"
                          disabled="${userForm.loggedInUser.admin and userForm.userId == userForm.loggedInUser.id}">Admin</html:radio>
              <c:if test="${userForm.loggedInUser.superAdmin}">
                  <html:radio property="selectedAdminRole" value="SuperAdmin">Super</html:radio>
              </c:if>
         </div>As you can see above, the struts validator requires passwords to be at least 8 characters long. So if the user tries to change their password to something with less than that, they'll fail validation and they'll end up back on the form with the validation errors in red at the top of the page. However, the form data that they've edited will be preserved. So if John had tried to change his first name to 'Fred,' he'd still see 'Fred' in the First Name text field, even though it wouldn't actually get saved to the user object until he submitted the form with no errors. This works with radio buttons too - if John had tried to set his admin status down to 'none' from 'admin,' the radio button 'none' would still be checked. Basically, it preserves all your progress on the form until you navigate away.
    Unfortunately, it does NOT do this when you create a new user. Creating a new user uses the same form, and since there's no user object to get the fields from, they all get initialized to blank - except for one of the checkboxes ('user is active') and the radio buttons for admin (starts with 'none' checked). Now, if the user fills out the form and hits submit, but fails the struts validation, it preserves all the form data in the text fields, but reverts the checkboxes and the radio buttons to their default state.
    This leads to the following problem: say I'm trying to create a new admin, Jane Smith. I fill out the whole form, check the 'admin' button, and then enter a four-letter password. I submit, and the form fails struts validation and throws me back to the page with an error message informing me that passwords need to be at least 8 characters. I look over the form again - the login field is still 'janesmith,' the first name field is still 'Jane,' the last name field is still 'Smith,' everything looks fine except I screwed up the password. I enter an 8 letter password and resubmit. Jane then logs in and complains that she's not an admin, because I didn't notice that the 'admin' button had reset itself to the default of 'none' when I failed validation.
    My question is, why does it reset the radio buttons and checkboxes - but not the text fields - on failed validation when a new user is being created, but resets nothing at all when an existing user is being edited? I'd like it to reset none of the information when a new user is being created, but I cannot figure out the reason for this inconsistent behavior.
    If anyone can help me figure out how to get this working so that nothing gets reset - or at least explain to me the reason for this inconsistent behavior - I would be very grateful. I will also try to provide any additional information I can if this isn't enough.

    So what you are saying is that radio and checkboxes don't retain their state when validation fails?
    Checkboxes are always troublesome because of their design. If not selected, they don't submit any value - so you have to specifically unset them.
    My first instinct would be to look at the formbean which you are populating from, and see what (if anything) modifies its values.
    - for originally loading the new user page is it an action or JSP? Does it apply any default values to the form?
    - check the "input" page you redirect to when validation fails. Is it an action or a JSP?
    - is the same form being uses on the newUser jsp and whatever action you are submitting it to?
    - is there a form reset() method?
    My theory is that the "input" page you are redirecting to when validation fails is an action, and it sets some values on the form prior to loading.
    But thats just a guess at this point. Its hard to debug this without a working example. Its been a while since I worked with struts, and never with annotations providing the validation.
    Suggestion for debugging: dump the contents of the form bean at strategic points in the process to see that the values are what you think they should be.
    - running the save action
    - just after validation
    - on the jsp page.
    Hope this helps some,
    evnafets

  • Two  ALV Grid Display  format on the Single page

    Hi guru's
    I have two plant details. I want to be  display these two plant details in the single page with ALV Grid display format.. like
    plant no 1(Details):
    xxxx  xxxx xxxx xxxx with ALV Grid Display format
    plant no 2 (Details):
    xxx  xxxx xxxx xxxx ALV Grid Display format
    Can any body help on the .. if you have sample code pls paste.
    Thanks in Advance
    Surendra

    hi,
    Grid display is not possible but u can display two list on same page by Block ALV....
    TYPE-POOLS : slis.
    TABLES : mara,
             makt.
    SELECT-OPTIONS : mat FOR mara-matnr.
    DATA : BEGIN OF itab OCCURS 0,
            matnr LIKE mara-matnr,
            maktx LIKE makt-maktx,
            matkl LIKE mara-matkl,
            mtart LIKE mara-mtart,
           END OF itab.
    DATA : BEGIN OF itab1 OCCURS 0,
            mtart LIKE mara-mtart,
            count TYPE i,
           END OF itab1.
    DATA : BEGIN OF itab1_col OCCURS 0,
            mtart LIKE mara-mtart,
            count TYPE i,
           END OF itab1_col.
    DATA : t_fcat1 TYPE slis_t_fieldcat_alv,
           t_fcat2 TYPE slis_t_fieldcat_alv,
           wa_fcat TYPE slis_fieldcat_alv,
           t_eve TYPE slis_t_event,
           wa_eve TYPE slis_alv_event,
           t_layout TYPE slis_layout_alv.
    DATA : v_repid LIKE sy-repid,
           t_mat LIKE mara-matnr.
    DEFINE create_fcat.
      clear wa_fcat.
      wa_fcat-fieldname = &1.
      wa_fcat-seltext_l = &2.
      wa_fcat-outputlen = &3.
      append wa_fcat to t_fcat1.
    END-OF-DEFINITION.
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM dis_data.
    *&      Form  get_data
          text
    FORM get_data.
      SELECT amatnr bmaktx amtart amatkl INTO CORRESPONDING FIELDS OF TABLE itab
      FROM mara AS a INNER JOIN makt AS b ON
      amatnr = bmatnr
      WHERE a~matnr IN mat.
      LOOP AT itab.
        itab1-mtart = itab-mtart.
        itab1-count = 1.
        APPEND itab1.
      ENDLOOP.
      SORT itab1 BY mtart.
      LOOP AT itab1.
        MOVE-CORRESPONDING itab1 TO itab1_col.
        COLLECT itab1_col.
      ENDLOOP.
    ENDFORM.                    "get_data
    *&      Form  dis_data
          text
    FORM dis_data.
      v_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
        EXPORTING
          i_callback_program      = v_repid.
      REFRESH t_fcat1.
      CLEAR t_fcat1.
      REFRESH t_eve.
      wa_eve-name = 'TOP_OF_PAGE'.
      wa_eve-form = 'TOP_OF_PAGE1'.
      APPEND wa_eve TO t_eve.
      create_fcat:
      'MATNR' 'Material' '10',
      'MAKTX' 'Material Description' '40',
      'MTART' 'Type' '10',
      'MATKL' 'Group' '10'.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          is_layout   = t_layout
          it_fieldcat = t_fcat1
          i_tabname   = 'ITAB'
          it_events   = t_eve
        TABLES
          t_outtab    = itab.
      REFRESH t_fcat1.
      CLEAR t_fcat1.
      REFRESH t_eve.
      wa_eve-name = 'TOP_OF_PAGE'.
      wa_eve-form = 'TOP_OF_PAGE2'.
      APPEND wa_eve TO t_eve.
      create_fcat:
      'MTART' 'Type' '10',
      'COUNT' 'Total' '5'.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          is_layout   = t_layout
          it_fieldcat = t_fcat1
          i_tabname   = 'ITAB1_COL'
          it_events   = t_eve
        TABLES
          t_outtab    = itab1_col.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
    ENDFORM.                    "dis_data
    *&      Form  top_of_page1
          text
    FORM top_of_page1.
      FORMAT COLOR COL_POSITIVE.
      WRITE:/ 'First Block'.
      FORMAT COLOR OFF.
    ENDFORM.                    "top_of_page
    *&      Form  top_of_page2
          text
    FORM top_of_page2.
      FORMAT COLOR COL_NEGATIVE.
      WRITE /5 'Second Block'.
      FORMAT COLOR OFF.
    ENDFORM.                    "top_of_page
    reward if usefull....

  • Scroll two-up documents as single page

    I have Adobe Acrobat 8.1 running in Windows 7 and I would like all of my documents to open as two-up page view but I need them to scroll as single page.  Is there any way to make this a default setting?I dislike viewing a single page at a time just so I can scroll one page at a time.  I want to see two pages while scrolling at the one page setting so that when I scroll I would go from pages 1-2 to pages 3-4, if that's understandable.
    Any help is greatly appreciated.

    Off hand I dont know the answer to your question. But since no one answered your question, here are my 2 cents worth:
    I suggest all your JSP pages have one and only one form tag. Re write your JSP page. Make sure all your variables your submitting have unique names. (no duplicate names). As far as I know, having multiple forms on a JSP page is not normallly done and makes it difficult to alter by another programmer after you leave the company.

  • "How to forward from a struts form to a login page?"or "how to connect form

    Can Any boby please let me know
    "How to forward from a struts form to a login page?"or "how to connect form to login session id"?
    Thanks
    Shailajakrishna

    I believe I can not use a
    request.sendRedirectURL("....") in which I would
    encode all my parameters, because:Righto. This is a bit tricky.
    Basically, you have two options, and both of those are a little nasty.
    1) You could use and intermediate JSP page. Just dispatch you request to that page, use the attributes to construct a form with hidden fields, and use Javascript to POST that form to your intended URL on the document's BODY onload event. Would work, but wouldn't be pretty and requires you to use JSPs and Javascript. Still an idea.
    2) This is something that I wouldn't recommend. Open a socket to the URL you you want to post your data. Manually construct a HTTP POST request, encoding your parameters into the headers. Read and parse the response & modify your HttpServletResponse object accordingly.
    Take a look at i.e. http://javaalmanac.com/egs/java.net/PostSocket.html?l=new for some pointers.
    I'd go with item #1.
    For my own edification, I'd be also interested in
    knowing why such a function does not exist in the
    current httpServletRequest api.I suppose it's a little out of scope. Servlets were ment to interoperate inside one container, not across domains and different implementations.
    I'm guessing I must be missing something fundamentals
    maybe?No, you're not.
    .P.

  • How to add two different page numbers in a single page

    How to add two different page numbers in a single page? One is for page number of the whole article, the other one is for page number for each chapter in the article.

    It's quite complicated, see
    Two Page Numbering Schemes in the Same Document.
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • How do i change the display in ADE to a single page view instead of two pages side by side? I find it distracting and prefer to look at one page at a time.

    How do i change the display in ADE to a single page view instead of two pages side by side? I find it distracting and prefer to look at one page at a time.

    You can increase the font size and automatically page view changes. Go to menubar; Reading -> PDF View or Epub Text Size (depending upon the ebook) and increase the size.

Maybe you are looking for