Questions tagged [model-driven]

An interface to support model component of the Struts2 MVC architecture.

An interface to support model component of the Struts2 MVC architecture. This interface should implement action classes which applying a user model as a generic parameter. If an action class implements the interface ModelDriven then it needs to return an object from the getModel() method. Struts2 will then populate the fields of this object with the request parameters, and this object will be placed on top of the valueStack once the action is executed. Validation will also be performed on this model object, instead of the action.

ModelDriven action uses it's own interceptor modelDriven which included in the defaultStack interceptor stack. Thus every action that uses that stack invokes this interceptor to check if an action is instance of ModelDriven then applying a model to it.

There's also a ScopedModelDriven interface that is used for models that has lifecycle for the specified scope.

128 questions
0
votes
1 answer

How to programmatically create Oracle ADF Essentials components - API for ADF and JDeveloper

Some prominent IDE's have API that let developers create modules (IDE plugins, extensions) that interact with editors and other IDE components. E.g. Embarcadero Delphi has Open Tools API, that allows developers to create (and integrate into Delphi…
TomR
  • 2,696
  • 6
  • 34
  • 87
0
votes
1 answer

The list attribute in select tag can't be resolved when using ModelDriven interface in Struts 2

I use the interface ModelDriven in my Struts 2 application. I have a problem rendering the page because I always get an error: 19 nov. 2013 11:23:12 org.apache.catalina.core.StandardWrapperValve invoke GRAVE: "Servlet.service()" pour la servlet jsp…
Ousmane MBINTE
  • 664
  • 4
  • 15
  • 37
0
votes
1 answer

Adding list of object in struts2 using ModelDriven>

I want to add a List of Receiptitem into DB using ModelDriven. This is action public class AddReceipAction extends ActionSupport implements ModelDriven>{ private List receiptItemList; public List
0
votes
2 answers

Struts2 - Rest Controllers ModelDriven with different model types

I am writing a few Struts2 Rest controllers and it seems that the show() and view() method will be returning two different types of models. Since implementing ModelDriven needs to be typed, I have been setting the type to . It seems like…
hsoj48
  • 36
  • 4
0
votes
1 answer

Struts 2 ModelDriven for different request parameter name and bean property name

Is it possible to assign the value to the bean property by implementing ModelDriven interface but having different name in request and bean for eg Ajax request DemoStruts.Action?param_a=649 the value of param_a parameter must set to the property…
arvindwill
  • 1,960
  • 1
  • 23
  • 39
0
votes
5 answers

How do I join two tables in a third n..n (hasAndBelongsToMany) relationship in CakePHP?

I have a n...n structure for two tables, makes and models. So far no problem. In a third table (products) like: id make_id model_id ... My problem is creating a view for products of one specifi make inside my ProductsController containing just…
Fernando Barrocal
  • 12,584
  • 9
  • 44
  • 51
-1
votes
1 answer

File upload not working with Struts2 Model-Driven Interface

When I am using Model driven interface, my file upload operation is not working. It is not popping any error, nor it is generating any log. My code is attached hereby, I want to know for file, do we have to generate its getters/setters in Model or…
-1
votes
1 answer

I found a problem with ModelDriven of Struts2

Please download this and run it. I think it's worth trying though it'll be a little annoying. In execute method of action class, if you set the bean by the method returning beans, Modeldriven won't work in JSP( won't work…
Deckard
  • 1,409
  • 6
  • 32
  • 59
1 2 3
8
9