On 2/28/2018 3:47 PM, shahzad.ismail@ wrote:
> I've debugged it a bit and able to figure out that, initially, at the start
> of action1, request.getParamater("modelprop") is null then I set modelprop in
> the action1 method which makes mymodel.modelprop == "something" and
> request.getAttribut
t; action3 --> jsp2
>
> So it must be type="chain" for action1 --> action2 and action2 --> action3 as
> I need to pass ModelDriven model as well as some action member variables,
> some of them are non-strings. All 3 actions are chaining to different methods
>
Hi,
I'm migrating an app from Struts 1 to Struts 2 (Tomcat v8 and Struts 2.5.14.1).
There is a scenario in which mapping goes like:
jsp1 --> action1 --> action2 --> action3 --> jsp2
So it must be type="chain" for action1 --> action2 and action2 --> action3 as I
roperty in the diagnosisDTO object which is in the
diseasetracking model object, if I give the complete path of the property, its
working now.
Thank you all for looking at my issue.
Kiran
> On Apr 3, 2017, at 2:25 PM, Lukasz Lenart wrote:
>
> 2017-04-03 16:04 GMT+02:00 Kiran Konga
2017-04-03 16:04 GMT+02:00 Kiran Kongala :
>
> listKey=*"dstLookupTypeId"*
>
Do you have a getter for this value? getDstLookupTypeId() ?
> listValue=*"lookupValue"*
>
Same here, do you have a getter? getLookupValue() ?
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
PS. Do not inl
vice in action and if I assign that value to 'diagnosisDTO.primaryDiagnosis'
name in the action model, I thought it will pick that value as selected. If
I remove the listKey and list Value from the s:select tag, I am getting the
complete object in the drop down as below
2017-04-02 22:58 GMT+02:00 Kiran Kongala :
> Hi Lulasz,
>
>
> *I am not comparing the same objects.I am trying to compare the String to
> a constant String.Still do I need to override the equals and hashCode
> methods.*
>
> *I added a tag in the jsp and I see the values.But the value
> doesnt set
mple.
> >
> > On Apr 1, 2017 7:38 PM, Kiran Kongala wrote:
> > Hi,
> >
> > I am trying to use the Struts2 s:select tag but the drop down value
> coming
> > from the db is not being set to the drop down as selected value and the
> > screen always shows the
below are the three classes being used in the code other than the
Model(DiseaseTracking)*
*From the Service class, I have the list of DSTLookupDTO objects with
dstLookupId as the int value.*
*I loop through the list and if a string value matches a constant string
value, I add the dstLookupId value to
stKey="dstLookupTypeId"
>listValue="lookupValue"
>multiple="false"
> headerKey="-1"
>headerValue="Please Select"
>size="1"/>
>
> *Action Class Code*
>
>
> *I have Disease Tracking as a Model obj
t; screen always shows the default first value in the list.
>>
>> Can some one please help me.
>>
>> *JSP Code*
>>
>> >list="primaryDiagnosisTypes"
>>listKey="dstLookupTypeId"
>>listValue="lookupValue"
>
elp me.
>
> *JSP Code*
>
> list="primaryDiagnosisTypes"
>listKey="dstLookupTypeId"
>listValue="lookupValue"
>multiple="false"
>headerKey="-1"
> headerValue="Please Select"
>size="1&quo
.
Can some one please help me.
*JSP Code*
*Action Class Code*
*I have Disease Tracking as a Model object and inside that model I have
DiagnosisDTO object where I have properties which are matched to the jsp
select tag above*
*This is the Model Object defined in the Action Classpublic
Tracking as a Model object and inside that model I have
DiagnosisDTO object where I have properties which are matched to the jsp
select tag above*
*This is the Model Object defined in the Action Classpublic
DiseaseTracking getModel() {return this.diseasetracking;}*
*DiseaseTracking
ssue and has to do with
> talking to .NET developers regarding framework difference than with
> framework use.
>
> I'm trying to wrap my head around the Model View Pattern (MVP) pattern. My
> issue is that I can't really differentiate it from what I do in Struts2.
> Bu
Marked as OT because this more of a conceptual issue and has to do with
talking to .NET developers regarding framework difference than with
framework use.
I'm trying to wrap my head around the Model View Pattern (MVP) pattern. My
issue is that I can't really differentiate it from wh
fied this, perhaps there's some magic (e.g., spooky) caching
> happening somewhere, but to my mind, without some very clear documentation,
> instantiating the model object in the getter would probably be wrong.
>
> Dave
>
>
>
> On Tue, Oct 15, 2013 at 5:38 AM, Umesh
but to my mind, without some very clear documentation,
instantiating the model object in the getter would probably be wrong.
Dave
On Tue, Oct 15, 2013 at 5:38 AM, Umesh Awasthi wrote:
> Hi All,
>
> I am facing a strange issue while trying to validate a bean using bean
> validat
> Just to add more information by changing code to
>
> ProfileDTOgetModel md=new ProfileDTOgetModel();
> @Valid
> public ProfileDTOgetModel()
> {
> return md;
> }
> }
>
> Bean Validation is working fine, so i am confused which is right way
Just to add more information by changing code to
ProfileDTOgetModel md=new ProfileDTOgetModel();
@Valid
public ProfileDTOgetModel()
{
return md;
}
}
Bean Validation is working fine, so i am confused which is right way to use
Model driven.
I took reference from
http
Hi Umesh,
Both you mentioned are same.
ModelDriven is best used to create new object if they do not exist.
So your getModel method must be
ProfileDTOModel md;
public ProfileDTOModel getModel()
{
if(md != null)// Or Some other condition as required by your model.
Typically check for Id
Hi All,
Have rarely used model driven interface and not sure about how exactly it
work.
Can any one point me what will be difference between
ProfileDTOModel md = new ProfileDTOModel();
publicProfileDTOModel getModel()
{
return md;
}
and
public ProfileDTOModel
No, my issue is something different..
some how underlying Valitor API is not validating all fields and its
happening only when i am using Model driven, for rest cased everything is
working fine for same bean object and for same validations.
On Tue, Oct 15, 2013 at 3:15 PM, Christoph Nenning
> Hi All,
>
> I am facing a strange issue while trying to validate a bean using bean
> validation.I am using model driven interface to pass form field values
to
> Action and here is the action code
>
> public class ModelDriven extends ActionSupport implements
>
Hi All,
I am facing a strange issue while trying to validate a bean using bean
validation.I am using model driven interface to pass form field values to
Action and here is the action code
public class ModelDriven extends ActionSupport implements
com.opensymphony.xwork2.ModelDriven{
@Valid
Hello,
I am trying to implement a form within a portlet using the model
driven interface, and the portlet plugin inside of a clustered
environment. Each time I submit the form I get this exception
(truncated):
SEVERE: Unable to serialize delta request for sessionid
HI,
I have extended the ScopeModelDrivenInterceptor to reset the model in session
based on some criteria. I have overridden the resolveModel method of
ScopeModelDrivenInterceptor as below.
I am using this for wizard flow.
protected Object resolveModel(ObjectFactory factory, ActionContext
%E5%83%8F_1.png
so,I get another way .
M. Curabitur malesuada.
……
-
==
My Blog: http://blog.csdn.net/watson243671
--
View this message in context:
http://struts.1045723.n5.nabble.com/Struts2-jQuery-plugin-Model-dialog-autoclose
Johannes
-
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep
--
View this message in context:
http://struts.1045723.n5.nabble.com/Struts2-jQuery-plugin-Model-dialog-autoclose-tp4840337p4842516.html
Sent from the Struts - User mailing
?
thanks to anyone who may help.
--
View this message in context:
http://struts.1045723.n5.nabble.com/Struts2-jQuery-plugin-Model-dialog-autoclose-tp4840337p4840337.html
Sent from the Struts - User mailing list archive at Nabble.com
-PLUGIN-Model-not-updated-on-JSON-XML-post-tp4399776p4411895.html
Sent from the Struts - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h
Hi,
I've developed a solution based on Struts2 and the REST-plugin. Recently I
noticed that it's not possible for me to POST/PUT anything to any
controller. GET works fine, both jsp/xhml and json/xml. It's also possible
to update the model using a form in a jsp.
I'm not ge
Did you try to user annotation @TypeConversion ?
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Kapituła Javarsovia http://javarsovia.pl
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional
Thanks guys for your reponses, but I think I may have been unclear in
my question. I have a class called MyCurrencyConverter that converts
a string to a BigDecimal by stripping the "$", commas, etc. - this
works fine. The problem arises when struts does not call
MyCurrencyConverter for the nested
2010/12/12 Burton Rhodes :
> I know. I don't have a setIncome(String) method. But I do have
> setIncome(BigDecimal) method , hence the type conversion. Normally the
> class MyCurrencyCoverter will covert the String to BigDecimal, but
> it's never called. I am wondering what I am doing wrong that th
.entity.ContactLead.setIncome([Ljava.lang.String;)]
> >
> > Scott
> >
> > On Fri, Dec 10, 2010 at 2:53 PM, Burton Rhodes >wrote:
> >
> >> I am having issues trying to get a Type Converter to run when
> >> converting a field that is a "sub-obje
t;
> On Fri, Dec 10, 2010 at 2:53 PM, Burton Rhodes wrote:
>
>> I am having issues trying to get a Type Converter to run when
>> converting a field that is a "sub-object" of the main model. For
>> example, I have a Contact class that contains a ContactLead clas
es trying to get a Type Converter to run when
> converting a field that is a "sub-object" of the main model. For
> example, I have a Contact class that contains a ContactLead class. I
> have an Action class that saves a new Contact and ContactLead at the
> same time.
I am having issues trying to get a Type Converter to run when
converting a field that is a "sub-object" of the main model. For
example, I have a Contact class that contains a ContactLead class. I
have an Action class that saves a new Contact and ContactLead at the
same time. Origina
Hello,
Is there a standard Struts declarative way of removing the model
object from session when using a ScopedModelDriven action?
i.e. so when invoking another action, which doesn't implement
ScopedModelDriven and doesn't need the model object previously placed
in session, the model
rsonally I'd use a map so you actually have a
> > way
> > to access them by something meaningful, like an ID. Then you use
> map-based
> > property field names (it's [] or (), with the key inside, I forget which
> > off
> > the top of my head). I think () is for i
> >
> > I'm using an action which implements the ModelDriven interface where my
> > model is a hibernate POJO (e.g. Customer). In this Customer I have a
> > OneToMany relationship with another hibernate POJO (e.g. Address)...
> >
> >/** persistent field */
>
so I'd aim for [] first.
Dave
On Tue, Oct 12, 2010 at 2:21 PM, Ryan Beckes wrote:
> Hello,
>
> I'm using an action which implements the ModelDriven interface where my
> model is a hibernate POJO (e.g. Customer). In this Customer I have a
> OneToMany relationship w
Hello,
I'm using an action which implements the ModelDriven interface where my
model is a hibernate POJO (e.g. Customer). In this Customer I have a
OneToMany relationship with another hibernate POJO (e.g. Address)...
/** persistent field */
@OneToMany(mappedBy="customer"
here is an extract of my domain model :
public class Survey {
private String freq;
private String information;
private List observations;
}
public class Observation {
private int abundance;
private SpeciesGroup speciesGroup;
}
my class SurveyAction
Hi,
I know in json result type we can configure something like this
total,
page,
records,
gridData.*,
userdata.*
Can we do the same in rest controller using annotation?
My interceptor stack is as below
Please guide.
On Tue, Jul 13, 2010 at 4:27 PM, Amol Ghotankar wrote:
> Dear List members,
>
>
> I have implemented model driven & prepare able interface in S2, also
> i
Dear List members,
I have implemented model driven & prepare able interface in S2, also
included interceptor stack
My method call flow is
1.prepare 2.getModel 3.getModel
Why does getModel gets called twice. Is it to useful to call it twice or is
my config setting wrong somewhere.
Al
on here is to
use paramsPrepareParamsStack interceptor. Surely i call some of the
interceptor twice but at least i've an access to the parameters.
On Tue, Jun 29, 2010 at 12:56 PM, Rene Gielen wrote:
> Hi Greg,
>
> the thing about ModelDriven is that the model object gets pus
Hi Greg,
the thing about ModelDriven is that the model object gets pushed on the
value stack _before_ your action method is executed. To initialize the
model object before the ModelDrivenInterceptor comes into play, just
implement Preparable and do your initialization in prepare() (as Lukasz
hi,
the scenario is as follow:1
1. class EditMyBeanAction implements Model...
2. url mapping calls edit method on the EditMyBeanAction
3. the result should be that once edit method returns (it loads MyBean
object from the database) MyBean should be displayed on the jsp
the problem is that it
2010/6/29 Greg Stasica :
> 2. get the MyBean object in getModel() method but i don't think this method
> should do any dao/business operations
You can always use Preparable interface
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
Kapituła Javarsovia 2010 http://javarsovia.pl
hi,
the scenario is as follow:1
1. class EditMyBeanAction implements Model...
2. url mapping calls edit method on the EditMyBeanAction
3. the result should be that once edit method returns (it loads MyBean
object from the database) MyBean should be displayed on the jsp
the problem is that it
2010/5/25 Robert Graf-Waczenski :
> My intuition for the "model" is "that which is serialized to disk" (or, more
> generally: "to persistent storage"). This means that such a class does not
> contain any business logic but only has getters and/or setters
My intuition for the "model" is "that which is serialized to disk" (or,
more generally: "to persistent storage"). This means that such a class
does not contain any business logic but only has getters and/or setters.
In reality (and in many nontrivial projects) the
2010/5/25 Fabio Perfetti :
> so? what is the model? the beans?
>
> public class Employee{
> private String name;
> private String surname;
> public setter/getter ...
> }
I'd call them "domain objects", it's a more appropriate term. So yes they are.
so? what is the model? the beans?
public class Employee{
private String name;
private String surname;
public setter/getter ...
}
2010/5/25 Antonio Petrelli
> 2010/5/25 Fabio Perfetti :
> > I am wondering if the actions belongs to the model layer or to the
> > c
2010/5/25 Fabio Perfetti :
> I am wondering if the actions belongs to the model layer or to the
> controller layer.
Actions are by definition part of the controller.
> All the example on the web are simple!
> Anyone can explain me? (with an example please)
No example but a simple a
Hi all,
I am wondering if the actions belongs to the model layer or to the
controller layer.
All the example on the web are simple!
Anyone can explain me? (with an example please)
Thanks
user on the form
which caused action errors. Therefore it will be useful to have something
likeModelStoreInterceptor which preserves model across requests and makes it
available on value stack. Anyone knows if this is written already?
Thanks,Unmesh
Well i would say, tha action implementation (action class) is the
controller, formBean is in one way the interface between view and
controller and model is implementation of some third part (f.e.
hibernate)... Thats my view of the 'story'. If i'm wrong, please
correct me.
ya, i understand, but action class is a part of controller or model.
and formBean is a part of model or controller.
On Mon, Oct 12, 2009 at 3:59 PM, Terry Gardner wrote:
> Broadly speaking, the Controller is the filter, the Model is the action,
> and the result leads to the View.
>
>
Broadly speaking, the Controller is the filter, the Model is the
action, and the result leads to the View.
On Oct 12, 2009, at 5:58 AM, Arindam Rajbanshi wrote:
i am doing struts 1.2 . Please tell me action is a part of
controller or
model.
and formbean is a part of controller or model
i am doing struts 1.2 . Please tell me action is a part of controller or
model.
and formbean is a part of controller or model. even in the apache document
http://struts.apache.org/1.x/userGuide/index.html
tehy mentionde bormbean in Building Model Components and Building
Controller Components in
Frans Thamura wrote:
i try several small REST and old S2 development
and the old one cannot work
I built something that allows you to use different action mappers for
different segments of urls. I've never quite wrapped it up well enough
to contribute (no test cases), but since I've gotten
hi all
i try several small REST and old S2 development
and the old one cannot work
can help?
this is simple xml of S2.xml,
http://struts.apache.org/dtds/struts-2.0.dtd";>
/success.jsp
Hi Chris,
I am able to resolve the issue by initializing the Bean object in Model when
page loads.
Action class
//-- baen initialize --//
this.cBookingFactorsModel.setCBookingFactorsBean(new CBookingFactorsBean());
JSP Page:
But the error on server console is still seen
$ControlRunnable.run(ThreadPool.jav
a:685)
at java.lang.Thread.run(Unknown Source)
-Original Message-
From: musom...@aol.com [mailto:musom...@aol.com]
Sent: Monday, September 21, 2009 6:29 PM
To: user@struts.apache.org
Subject: Re: Struts2 - OGNL - access bean prop
Hi Franciou,
I have a clarification here.
If model is initialized in prepare method, then it will be called for every
call of other Action invocation methods in action class like add ,edit
delete and save button actions.
What can be done if I want prepare method to be called only for the first
JSP page:
The c in CBookingFactorsBean should be lower case , I think.
Chris
-Original Message-
From: Raghuveer.V
To: user@struts.apache.org
Sent: Mon, Sep 21, 2009 7:48 am
Subject: RE: Struts2 - OGNL - access bean property in model object
Hi Rouxel
Hi Rouxel,
I am using ScopedModelDriven.
I am not using prepare,since ModelDSriven interceptor takes care of
initializing model object.
I have following implemented methods of ScopedModelDriven and other servlet
config related methods in my Action class
maybe the model is not on the stack...or on the stack but null
be sure your prepare() method initialize properly your bean...
fr/
- Message d'origine
De : Raghuveer.V
À :
I have following property in model object(ScopedModelDriven).
CBookingFactorsBean cBookingFactorsBean=null;
In JSP page i get error when accessing [b]'salesAfterDiscount'[/b] property
of custom object(CBookingFactors[b]Bean[/b]) in
model(CBookingFactors[
This is working after using correct jar file, "struts2-core-2.1.6" jar.
_
From: Raghuveer.V [mailto:raghuve...@infotechsw.com]
Sent: Wednesday, August 19, 2009 6:55 PM
To: 'user@struts.apache.org'
Subject: Struts2 - ScopedModelDriven - Unable to update the mode
On Wed, 19 Aug 2009 09:24:52 -0400, Raghuveer.V
wrote:
Hi,
I have a problem implementing ScopedModelDriven.
One thing that could be a problem:
public void prepare() throws Exception {
user = new User();
Don't instantiate a new User object - the interceptor w
Hi,
I have a problem implementing ScopedModelDriven.
I Have Model / User Java Bean object in action class.
I am trying to implement concept of same model object being used for 3 JSP
pages with PREVIOUS and NEXT button navigation.
Data to be updated in Model object for every page
action. :S
>
> Thanks,
> James
>
> On Mon, Aug 17, 2009 at 1:09 PM, James Carr wrote:
>> I'm giving up and putting it on the model. It doesn't belong there,
>> but at least it works. :(
>>
>>
>>
>> On Mon, Aug 17, 2009 at 1:06 PM, James Ca
Nevermind, I'm a moron... The page I was trying to use it on didn't
map to an action. :S
Thanks,
James
On Mon, Aug 17, 2009 at 1:09 PM, James Carr wrote:
> I'm giving up and putting it on the model. It doesn't belong there,
> but at least it works. :(
>
>
>
Put a breakpoint in ListUIBean.evaluateExtraParams and you will find
out what is going on.
musachy
On Mon, Aug 17, 2009 at 11:09 AM, James Carr wrote:
> I'm giving up and putting it on the model. It doesn't belong there,
> but at least it works. :(
>
>
>
> On Mon, Au
I'm giving up and putting it on the model. It doesn't belong there,
but at least it works. :(
On Mon, Aug 17, 2009 at 1:06 PM, James Carr wrote:
> I tried #action.franchises and got the same error... is it literally
> #action, or is it #nameOfActionDefinedInStrutsXml?
>
>
delDriven interface
>> for my action, but I would assume that OGNL would still resolve
>> against my action in addition to my model. when I load the page, I get
>> this error:
>
> Either the action or the model is pushed into the stack, not both. Try
> "#action.franchis
On Mon, Aug 17, 2009 at 9:39 AM, James Carr wrote:
> One note of interest though is I am using the ModelDriven interface
> for my action, but I would assume that OGNL would still resolve
> against my action in addition to my model. when I load the page, I get
> this error:
Either t
on to my model. when I load the page, I get
this error:
tag 'select', field 'list', name 'franchise': The requested list key
'franchises' could not be resolved as a
collection/array/map/enumeration/iterator type. Example: people or
people.{name}
Any ideas
] Model Driven validation using xml?
Hi All,
I seem to be unable to find an example of using xml based validation
with model driven. My object model is nested, most of my text fields
look like:
Any help or links would be much apperciated.
Thanks,
James
Hi All,
I seem to be unable to find an example of using xml based validation
with model driven. My object model is nested, most of my text fields
look like:
Any help or links would be much apperciated.
Thanks,
James
-
To
Would someone be kind enough to point me to an example of the Scoped Model
Driven usage? Both the xml config part and the Action code.
I've googled this, and delved into the sample source code, and not come up
with anything -
Thanks,
On 28 mei 2009, at 01:01, Dave Newton wrote:
Bas Schulte wrote:
Activity id:
String:
No arg:
According to the OGNL docs, adding an argument needs parenthesis,
as I'm doing in 'boomering(activityId'. [sic]
This isn't working :( '
Bas Schulte wrote:
Activity id:
String:
No arg:
According to the OGNL docs, adding an argument needs parenthesis, as I'm
doing in 'boomering(activityId'. [sic]
This isn't working :( 'boomerang' without argument does work, i
Hi,
more confusion. I'm trying to call a method in a model object with a
Long (type doesn't really matter though) argument:
Activity id:
String:
No arg:
According to the OGNL docs, adding an argument needs paren
r for some reason Java is saying that the two variables
are == to each other which is clearly not the case. Definitely weird.
Can anyone suggest what might be going on? My only thought is that there is
some weirdness going on with the Hibernate CGLIB enhanced model objects.
Peter Kelley
--
Hi Jack. Thank for your response.
The problem is that the login.jsp is called before the user authentication,
performed through jaas, and in the in the web.xml, is not
possible to specify an action. So I heven't the possibility to pass the model
to the login.jsp.
The workaround is to a
Hi Gianluca
Why do you do this ,s2 is use to replace on control layer of MVC and model
be put in valueStack on current thread,it 's diffcultly to visit it in
other thread!
--
From: "Gianluca Musella"
Sent: Monday, February 09,
Hello list,
Is possible to access the model bean from a std servlet?
I think this is possible, because s2 store this model into the session
(or request) object, and presents it to the getModel() method of an
action implementing the ScopedModelDriven.
If this, I only need the name of this object
Hi all,
Is possible, from my custom login module, to access the model?
Thanks in advance,
Gianluca
On Saturday 24 January 2009 15:57:56 Gianluca Musella wrote:
> Does someone can explain me this behaviour please?
>
> I'm absolutely sure that my model is created more than one times. This
> is a problem for me.
>
> Can you explain me the lifecycle of the model?
>
> T
Does someone can explain me this behaviour please?
I'm absolutely sure that my model is created more than one times. This
is a problem for me.
Can you explain me the lifecycle of the model?
Thanks in advance
Gianluca
---
Hello All,
Is it expected to receive errors from the first invocation of the Params
interceptor since there are not commonly setters for all the model
properties and prepare has not yet had a chance to retrieve the model?
Thanks!
--john
; > >> On Fri, Dec 12, 2008 at 6:02 PM, Dave Newton > >wrote:
> > >>
> > >>> --- On Fri, 12/12/08, srinivasa_v wrote:
> > >>> > > name="EmpReleaseTransferForm"
> > >>> > method="post" encty
"multipart/form-data" >
> >>>
> >>> Oh, did you mean "enctype"?
> >>>
> >>> > id="sponsorDetails"/>
> >>> >
t;
>>>
>>> Oh, did you mean "enctype"?
>>>
>>> >
>>> >
>>> >
>>> > in action class [...]
>>>
>>> It might be beneficial to inclu
1 - 100 of 276 matches
Mail list logo