将数据从视图发送到控制器

时间:2022-01-19 17:47:25

Hi i'm using a brazillian framework called Vraptor and now I have a object in my JSP

嗨,我正在使用一个名为Vraptor的brazillian框架,现在我的JSP中有一个对象

${solicitacao }

And now i want to send this object to the controller or back-end without need add inputs to put the information of the object.

现在我想将此对象发送到控制器或后端,而无需添加输入来放置对象的信息。

2 个解决方案

#1


0  

In general terms, there's no to send data from the view to the controller without using input fields, or embedding data in an url. However, if you have the date already in a previous invocation of a controller, you could place the object in the session for later retrieval.

一般而言,如果不使用输入字段或在数据库中嵌入数据,则无法将数据从视图发送到控制器。但是,如果您在控制器的先前调用中已有日期,则可以将该对象放在会话中以供以后检索。

#2


0  

you can use the session as: classe.campo Note that the servlet runs on the server, and the "Controller" will be called only after being exeidos data in the browser screen, so you must use at least one object 'input type =' hidden '"

您可以将会话用作:classe.campo请注意,servlet在服务器上运行,并且只有在浏览器屏幕中显示exeidos数据后才会调用“Controller”,因此您必须使用至少一个对象'input type ='隐藏的“”

#1


0  

In general terms, there's no to send data from the view to the controller without using input fields, or embedding data in an url. However, if you have the date already in a previous invocation of a controller, you could place the object in the session for later retrieval.

一般而言,如果不使用输入字段或在数据库中嵌入数据,则无法将数据从视图发送到控制器。但是,如果您在控制器的先前调用中已有日期,则可以将该对象放在会话中以供以后检索。

#2


0  

you can use the session as: classe.campo Note that the servlet runs on the server, and the "Controller" will be called only after being exeidos data in the browser screen, so you must use at least one object 'input type =' hidden '"

您可以将会话用作:classe.campo请注意,servlet在服务器上运行,并且只有在浏览器屏幕中显示exeidos数据后才会调用“Controller”,因此您必须使用至少一个对象'input type ='隐藏的“”