fatefree wrote:
> 
> Hello, 
> 
> I am using several stripes:form tags to create forms which I submit via
> ajax for minor state changes (No validation, but the source page is
> returned with new html content).
> 
> This works fine, however the size of my html is growing too large and I
> would like to convert these forms to json objects in my jsp and submit
> those via ajax instead.
> 
> I noticed however that the stripes:form is creating the hidden _sourcePage
> input field. Is there a way to recreate that value from the actionBean so
> I can insert it as a parameter in my json form object? The same question
> goes for the action url that gets generated in the form tag from the
> beanclass. Can I retrieve these two values from the actionBean?
> 


The answer was:

ActionBean:

        /**
         * Returns the url binding for the actionBean.
         *
         * @return String
         */
        public String getUrlBinding() {
                return
StripesFilter.getConfiguration().getActionResolver().getUrlBinding(this.getClass());
        }

ActionBeanContext:

   /**
     * Returns the encrypted source page which is a required parameter for
customized stripes forms.
     *
     * @return String
     */
        public String getEncryptedSourcePage() {
                return CryptoUtil.encrypt(getRequest().getServletPath());
        }
-- 
View this message in context: 
http://old.nabble.com/Getting-the-form-action-and-source-page-hidden-input-in-a-jsp-tp33339351p33340510.html
Sent from the stripes-users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to