Hi
I am sending a runtime value to a custom tag.I am sending the value through
bean:write tag
but it is not sending the value.i am attaching the sample code.
here in the tag class it does not take the value passed through bean:write
tag if I pass like below it takes.
I have to use bean:write
Hi
I am sending a runtime value to a custom tag.I am sending the value through
bean:write tag
but it is not sending the value.i am attaching the sample code.
here in the tag class it does not take the value passed through bean:write
tag if I pass like below it takes.
I have to use bean:write
Of course. If you want a bean created and to put it into some
specific scope, your form is the place to do it. You can use other
methods of course.
On 5/25/06, Chaudhary, Harsh <[EMAIL PROTECTED]> wrote:
Isn't that what Struts forms do out of thye box.
Harsh.
-Original Message-
From:
Adam Hardy wrote:
So struts marshalls the HTTP request params into a form bean and perhaps
validates them.
Also struts interfaces with the model when it calls business methods
from action classes.
But for Ajax requests then there is only ever one possible actionForward
(or 2 if you count a glob
Action 1 Framework (SAF1) is what you used to know as Struts is now
called. Not just the latest version, but all of them. As you say, SAF2
is what used to be called WebWork. "Struts" is now an umbrella housing
three separate frameworks: SAF1, SAF2 and Shale.
Frank
Monkeyden wrote:
I know t
Thank you Chaudhary for your time, this is realy a good explaination, what I
will do is to have 8 forms :
form1 has a NEXT button that when submitted go to form2 and insert data in a
table.
form2 has two has two buttons NEXT and PREVIOUS, NEXT , submit to form3 and
insert data.
..
I know the "Action 2 Framework" is the WebWork integration branch but is the
"Action 1 Framework" just the latest version of traditional Struts? I
developing my first NEW Struts project since this new name has appeared.
So struts marshalls the HTTP request params into a form bean and perhaps validates them.
Also struts interfaces with the model when it calls business methods from action classes.
But for Ajax requests then there is only ever one possible actionForward (or 2 if you count a global error). I can't
What you say is definitely doable but consider this. You would need to save the
data from each screen till the end of the screens i.e. the 8th screen. You can
do this by saving the data in the session (not advisable as the session object
will be huge). Or you could pass data as hidden fields ont
Hi,
I have 8 forms (every form will be stored in a separate table), I am
wondering if it is possible to have one jsp page with 8 tabs , fill up the form
in the first tab, move to other tabs and fill forms and at the end press a one
submit button to save data ( from these forms) to the databas
Hi Harsh,
Thanks for the solution.
It works now.
Yildiz
--- "Chaudhary, Harsh" <[EMAIL PROTECTED]> wrote:
> I am sorry I wasn't clear enough in my reply. Here's
> what you need to
> do:
>
> String explainUrgency =
> field.getVarValue("explainUrgency");
> String whatever =
> ValidatorUtils.getV
[EMAIL PROTECTED] wrote:
Albert L. Sapp asked:
This is my first post so I will try to make it short. I am trying to
use the logic:iterate and html:multibox. I found what I
thought was a
good example through a google search, but I just can't get it to work.
Here is the exception I get:
On 5/25/06, Yildiz Terkesli <[EMAIL PROTECTED]> wrote:
Hi,
I am using Apache Struts and Validator framework for
my current project. I have encountered this problem
when I tried to create my own validation rule:
I want to validate a field against another field. For
this purpose I have created my
Albert L. Sapp asked:
> This is my first post so I will try to make it short. I am trying to
> use the logic:iterate and html:multibox. I found what I
> thought was a
> good example through a google search, but I just can't get it to work.
>
> Here is the exception I get: javax.servlet.Servl
Yeah. There is this date comparator at:
http://jakarta.apache.org/commons/validator/apidocs/org/apache/commons/validator/routines/DateValidator.html
It has methods like compareDates etc. But you will need to call this method
from a Java class and a custom validator seems like a good place. Consid
Harsh, Thanks for the quick response.
I was seeking if Struts has the internal validator do this things. If not,
then I agree with you in that I need to write my own custom validator easily.
But I prefer if Struts already has this sort of comparison validator.
"Chaudhary, Harsh" <[EMAI
The solution is to write a custom validator if you want to do it server side
using validator. In your custom validator, create 2 calendars, one each for
start date and end date. Then use the method call "before" or "after" on these
calendar.
Harsh. Man I got a lot of free time today.
-Orig
Hi, everyone.
This is my first post so I will try to make it short. I am trying to
use the logic:iterate and html:multibox. I found what I thought was a
good example through a google search, but I just can't get it to work.
Here is the exception I get: javax.servlet.ServletException: Canno
I am sorry I wasn't clear enough in my reply. Here's what you need to
do:
String explainUrgency = field.getVarValue("explainUrgency");
String whatever = ValidatorUtils.getValueAsString(bean, explainUrgency);
Harsh.
-Original Message-
From: Yildiz Terkesli [mailto:[EMAIL PROTECTED]
Sent:
I am not sure if this is workable, but my requirement was that
Two Fields, startDate and endDate, I need to validate the endDate is
greater/older than the startDate. Is this something workable/configurable using
struts validator?
Thanks.
Do this to get the value in urgency field.
String year = ValidatorUtils.getValueAsString(bean, explainUrgency);
Where bean is:
public static boolean validateYourMethod(Object bean, ValidatorAction
va, Field field, ActionMessages errors, Validator v, HttpServletRequest
request)
Harsh.
-Origi
Makes sense. At least reading it here.
I'll try it out and see if it still makes sense when I'm doing code. : )
Thanks a lot!
--
View this message in context:
http://www.nabble.com/ValidatorActionForm+vs+ValidatorForm-t1682623.html#a4564295
Sent from the Struts - User forum at Nabble.com.
-
Hi,
I am using Apache Struts and Validator framework for
my current project. I have encountered this problem
when I tried to create my own validation rule:
I want to validate a field against another field. For
this purpose I have created my own validation method,
created new XML file instead of ch
We've been using FormDef struts plug-in
(http://www.rabago.net/struts/formdef/index.htm) to format data going to the
form and parsing the data before saving to the database. It seems to be
relatively straight-forward and does what we need it to do. What other methods
are there for doing this
Use ValidatorActionForm when you want to key the validation by the
Actions i.e. certain fields will be validated if a certain action is
called. Suppose you have a big Struts Form which serves as the form for
a number of actions e.g. updateClient.do, deleteClient.do,
loginClient.do etc.
Suppose you
Hello,
I'm struggling to understand the difference between the ValidatorActionForm
and the ValidatorForm.
The main difference I find in API is that the key passed into the
ValidatorForm "is the action element's 'name' attribute from the
struts-config.xml" and the key passed into the ValidatorAc
Take maven and you have no problem with any IDE or development environment.
Manfred
Dave Newton wrote:
> [EMAIL PROTECTED] wrote:
>
>> My point is that Eclipse does not, in the base IDE, have the knowledge to
>> build and deploy a web-app. You can get that capability with ANT, which
>> giv
[EMAIL PROTECTED] wrote:
> My point is that Eclipse does not, in the base IDE, have the knowledge to
> build and deploy a web-app. You can get that capability with ANT, which
> gives you all the flexibility in the world about how you arrange your
> project, or with a plugin, which requires you
I do agree.
Martin
> -Ursprüngliche Nachricht-
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Gesendet: Donnerstag, 25. Mai 2006 19:05
> An: user@struts.apache.org; [EMAIL PROTECTED]
> Betreff: RE: Struts with Eclipse 3.1
>
>
> My point is that Eclipse does not, in the base ID
My point is that Eclipse does not, in the base IDE, have the knowledge to build
and deploy a web-app. You can get that capability with ANT, which gives you
all the flexibility in the world about how you arrange your project, or with a
plugin, which requires you to arrange your project in a part
I have not really followed this stream, but just to develop a Struts (action
1.x) based app with Eclipse 3.x
does not require something special. Just create the project, add the Struts
jars to it (do not forget the build path) and go.
If you want to have integrated debugging with Tomcat you can us
If you don't want to build with ANT (or equivalent) then I think you must use
one of the plugins with webapplication support. These, in my experience
(mostly with MyEclipse), require particular layouts of the source for it to
work.
It seems to be your choice which work you want to do.
> -
But I donnot have an ANT build file. for my project, we donot have an ANT build
file yet..
Miguel Galves <[EMAIL PROTECTED]> wrote: just for the record, I use a plain
Java project, with an appropriate ANT
build file that builds and deploys teh struts system for me.
It works fine.
Miguel
On 5
want to validate a property for
required,
and also make sure it's value is greater than Zero. The value should be a
positive double.
tried the below
test
(*this* >= 0)
when nothi
just for the record, I use a plain Java project, with an appropriate ANT
build file that builds and deploys teh struts system for me.
It works fine.
Miguel
On 5/25/06, Maya menon <[EMAIL PROTECTED]> wrote:
No. It wont work. when I do that, it asks for a folder to import to. When
I type a new
${list1Item}
${list2[status.index]}
the status variable is an instance of LoopTagStatus, which has an index
property that is set by the forEach loop.
I might favor combining the two lists (in your action) into a single
list, each element of which has a list that holds the two items from t
No. It wont work. when I do that, it asks for a folder to import to. When I
type a new name in says, specified project doesnt exist and stops there...
"Chaudhary, Harsh" <[EMAIL PROTECTED]> wrote: Sounds like something wrong with
the import you did. Why don't you do a fresh import without creat
How about creating a single list with an object to encapsulate the
values from list1 and list2 in a single entity?
Public class MyClassContainer {
private MyClass1 my1;
private MyClass2 my2;
...
}
List = ...
myClassContainerList.add(new MyClassContainer(myClass1, myClas
Sounds like something wrong with the import you did. Why don't you do a fresh
import without creating a project first. Then when you import, it would prompt
you to specify a project at which point, you can create a new project.
Hopefully this will merge the two and generate a singular file struc
The best IDE support for struts in eclipse I've found is now owned by
BEA, and is called BEA Workshop Studio. It was formerly NitroX from m7.
It does a great job of providing development time error checking and
code completion in jsp and xml configuration files, including validation
and tiles confi
Hi,
I've been enjoying these conversations about 'Architecture'/'Best Practices'
etc.. Does anyone knows if there is a specific list somewhere to get more
information about architecture decisions, etc ???
-Rafael T Icibaci
- Original Message -
From: "Adam Hardy" <[EMAIL PROTECTED
I'll chime in like everyone else plus give you alternatives:
Have you even looked at the DisplayTag documentation, live examples or
looked at the configuration information? The examples show the alternating
row css coloring is automatic (even[row]/odd[row] css styles) while the
configuration page
Check this out. I haven't used it myself. Just a pointer. Check out
TimeValidator in the API docs.
http://jakarta.apache.org/commons/validator/apidocs/index.html
Harsh.
-Original Message-
From: Carl Smith [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 25, 2006 10:54 AM
To: Struts Users Ma
Yes, I was trying that.
I created an empty "Web project" in eclipse and imported struts-sample.war.
But this created two WEB-INF directories and 2 web.xml files. Looks like when a
web project is first created, it already creates the web.xml and web-inf
directory,a nd when the war file gets
Does struts have an intrisic validator for time entered using a format as
HH:mm:ss? Thanks.
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
A sample web project is bundeled with the struts distribution at like:
\struts-1.2.8-bin\struts-1.2.8-bin\webapps
Its called struts-examples.war. Get that running and then you can reuse
that code to get started.
Harsh.
-Original Message-
From: Maya menon [mailto:[EMAIL PROTECTED]
Sent: Th
sure
On 5/25/06, Monkeyden <[EMAIL PROTECTED]> wrote:
I assume you have at the top of your class:
package utilities;
On 5/25/06, Miguel Galves <[EMAIL PROTECTED]> wrote:
>
> Thats what it seemed to meso I wrote the following code
>
> public class MyTilesRequestProcessor extends Tiles
Thanks Harsh. I also dont care about ide support.
But think you have an existing web project and you want to use struts files.
How do you do that ?
In my case, I have a web project in eclipse [created using eclipse 3.1 and
eclipse web tools platofrm]. Now to this project I have added
Hi,
Is it possible to do with JSTL something like this:
(Note: size of list1 and list2 are equal)
List list1 = getList1();
List list2 = getList2();
for(int i=0; i
Sure you can do that. But you would not have any IDE support. Personally
I don't care much for IDE support as all you need is entries in
struts-cofig.xml, an Action class, a Struts form and an HTML or JSP
page.
Harsh.
-Original Message-
From: Maya menon [mailto:[EMAIL PROTECTED]
Sent: Th
Ok Thanks. Can I just import the zip file to my project and start using it ?
Maya
"Chaudhary, Harsh" <[EMAIL PROTECTED]> wrote:
Sure you can. Just include the Struts lib files in your project. If you
are talking about IDE support for Struts, then I would suggest:
http://www.myeclipseide.c
Hi Abhimanyu,
There are a question before I or I guess anyone on this list could be of
help.
1. How are you drawing the row in you table (i.e. JSTL's forEach tags or
something else)?
(see http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/index.html for
informatio about JSTL's forEach
Sure you can. Just include the Struts lib files in your project. If you
are talking about IDE support for Struts, then I would suggest:
http://www.myeclipseide.com/ContentExpress-display-ceid-55.html
This is a tested plug-in for Struts on eclipse. It costs about $30 -
$40.
There is another Struts
http://javaboutique.internet.com/tutorials/three/
El jue, 25 de 05 de 2006 a las 17:05, Maya menon escribió:
> All,
>
> Is it possible to use struts with Eclipse 3.1 ? If yes, how. Can anyone
> please help.
>
> Thanks.
>
>
> -
> Feel fre
Hi,
of course.
you can use WTP or sysdeo plugin
El jue, 25 de 05 de 2006 a las 17:05, Maya menon escribió:
> All,
>
> Is it possible to use struts with Eclipse 3.1 ? If yes, how. Can anyone
> please help.
>
> Thanks.
>
>
> -
> Feel fr
All,
Is it possible to use struts with Eclipse 3.1 ? If yes, how. Can anyone
please help.
Thanks.
-
Feel free to call! Free PC-to-PC calls. Low rates on PC-to-Phone. Get Yahoo!
Messenger with Voice
I assume you have at the top of your class:
package utilities;
On 5/25/06, Miguel Galves <[EMAIL PROTECTED]> wrote:
Thats what it seemed to meso I wrote the following code
public class MyTilesRequestProcessor extends TilesRequestProcessor {
public void process(HttpServletRequest requ
As per your suggestion i have used like this
document.forms[0].action="/<%=strRoot%>/Help.do?method=downloadHelp&hdnPage=
<%=Constants.FIRST_PAGE%>"
.
..
document.forms[0].action="/<%=strRoot%>/Help.do?method=downloadHelp&hdnPage=
<%=Constants.TENTH_PAGE%>"
in Struts-Config.xml
.
.
>You just need 2
>different forms pointing to different actions.
I am using only one mailto:[EMAIL PROTECTED]
Sent: Thursday, May 25, 2006 7:49 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: More then 1 Action Forms in JSP
Sure its possible for a JSP to call 2 different action
Well I can't tell you the JS way, but surely I can tell you how to do it
Struts way.
Your custom validator rule should first check for fields value. If not #
then call the date validator:
if(! ValidatorUtils.getValueAsString(bean, field.getProperty
()).equals("#"))
{
if(
I think the best thing (and only thing) to do would be to, like someone
else suggested, to write a custom validator, and then if the incoming
value is #, return true. Otherwise, run the validation. For examples of
custom validators, download the commons validator distribution. It has
an example pro
Thats what it seemed to meso I wrote the following code
public class MyTilesRequestProcessor extends TilesRequestProcessor {
public void process(HttpServletRequest request, HttpServletResponse
response) throws IOException,
ServletException {
...
}
public void setTeste(String
I considered DispatchAction but it sounds like he is looking for your
average context-sensitive help functionality.
On 5/25/06, Chaudhary, Harsh <[EMAIL PROTECTED]> wrote:
Sure its possible for a JSP to call 2 different actions. You just need 2
different forms pointing to different actions.
I
Or rather, if the value is #, return true.
Harsh.
-Original Message-
From: Vinit Sharma [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 25, 2006 7:54 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: change date validator-rules
Write a custom validator rule, check for the
There is no easy way man. best you can do is to find a JavaScript date
library that already exists. Try the forums on java.net. Its way too
much work to write a date handeler library yourself and its probably
been done before.;
Harsh.
-Original Message-
From: Abhimanyu Koul [mailto:[EMAIL
damn! Mutator, not accessor.
On 5/25/06, Monkeyden <[EMAIL PROTECTED]> wrote:
Ah, ok. This is from the struts-config DTD. Looks like you need to
define an accessor, named setTest, in your RequestProcessor.
When the object representing the surrounding element is instantiated, the
accessor
Ah, ok. This is from the struts-config DTD. Looks like you need to define
an accessor, named setTest, in your RequestProcessor.
When the object representing the surrounding element is instantiated, the
accessor for the indicated property is called and passed the indicated
value.
On 5/25/06,
Isn't that what Struts forms do out of thye box.
Harsh.
-Original Message-
From: Eric Chow [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 25, 2006 3:29 AM
To: Struts User List
Subject: How can I pass all the request parameters into a bean ?
Hello,
How can I pass all the request paramet
If you look at the HTML source of the file, you will see that the table
structure generated by DisplayTag by default looks something like:
The class is the key as it differentiates odd and even rows. Now
For interactive session viewing look at
http://messadmin.sourceforge.net/. It's not something I'd put on a
production server, but it is useful for testing.
-ed
On 5/25/06, Chaudhary, Harsh <[EMAIL PROTECTED]> wrote:
I just wrote the object to a file as a bit blob and looked at the file
size. Bu
Sure its possible for a JSP to call 2 different actions. You just need 2
different forms pointing to different actions.
I would implement an action like DispatchAction and determine
programatically which action to forward the user to. This also helps if
I need to change the design in the future.
Thats because I've changed the tag before sending the code to the list.
The original version was in portuguese...teste... :-) I've definded a
setTeste method
and a teste property.
So that's OK..
On 5/25/06, Monkeyden <[EMAIL PROTECTED]> wrote:
You always have to watch your "testes" when overrr
I just wrote the object to a file as a bit blob and looked at the file
size. But I needed something quick and dirty and not necessarily
extremely accurate.
Harsh.
-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 25, 2006 12:16 AM
To: Struts Users Ma
You always have to watch your "testes" when overrriding the
RequestProcessor. Looks like you have a typo.
java.lang.NoSuchMethodException: Bean has no property named teste
at org.apache.commons.digester.SetPropertyRule.begin(
On 5/25/06, Miguel Galves <[EMAIL PROTECTED]> wrote:
Hi,
I wrot
As in a pop-up? If so, then you create a HelpAction and JSP, which would be
expecting a request parameter specifiying the current screen. Use that
parameter to determine what content to fetch. Basically, it's a new
Action. The only thing your 10 existing screens will be responsible for is
pass
Hi,
I wrote a new controller class, which extends TileRequestProcessor, in order
to solve a problem we had with POST requests enconding (UTF-8), specially
with multipart-form requests.
I'm now trying to pass some paremeters to the new controller, using
the set-property tag in server.xml
I think that the controller is always going to be in struts. There
reason is this - the action will be obtaining some input, coordinating
with the back-end services, retrieving the model to be rendered and then
rendering the model into a view which could be HTML or XML/JSON which is
more "ajax
Is this a Struts question?
On 5/25/06, Abhimanyu Koul <[EMAIL PROTECTED]> wrote:
how can i use a popup window to search for a record from the database and
on clicking any record in the popup window, i should get that value into my
text box.
search
Abhimanyu Koul
FinEng Solutions (P) Ltd
In that case this is very much a JavaScript question and not a Struts
one. I can tell you that the JavaScript Date functions are terrible. You
could adapt my previous technique as follows:
1) Create a variable for holding the total
2) Create a Date object form both the start and end dates.
3) C
The thing is that user can input nothing in filed, but if they input # than
date validation is
"skipped", but if input is different from # then date validation is executed.
My idea was to change
date validation to check if the input if equal #, but my knowledge of js is
very limited, and dont
kn
Write a custom validator rule, check for the field value and if the value is
not #, then set error message.
HTH,
On 5/25/06, Stanislav <[EMAIL PROTECTED]> wrote:
Hi!
I want to change date validator-rules so ih the input data id equal "#"
than return that everything
is ok... How can i do that
thanks.
but i am really looking for a way to do this on the client side.
any idea?
Abhimanyu Koul
FinEng Solutions (P) Ltd.
Dani Compound,
158, Vidyanagari Marg,
Kalina, Santacruz (East),
Mumbai - 400 098
Mobile : +91 9860582533
- Original Message -
From: "Bart Busschots" <[EMAIL PROTECTE
This isn't a struts question but anyway, assuming you want to do this on
the server side and not on the client side (you'd be mad to do it on the
client side) the java Date related utility classes will be able to help
you out (java.util.Calendar, java.util.GregorialCalendar, java.util.Date).
T
hi!
i am really struggling to find a way to calculate number of days between two
dates in mm/dd/ which i get using javascript popup calendars. excluding
sundays and half saturdays.
the number of days i have to record in the database.
please help
Abhimanyu Koul
FinEng Solutions (P) Ltd.
Da
try this..
onclick of the text link.. put this line
*window.opener*.getElementById('a_id').*value = "somevalue";
*
--
Regards,
Deva.
Abhimanyu Koul wrote:
how can i use a popup window to search for a record from the database and on
clicking any record in the popup window, i should get th
how can i use a popup window to search for a record from the database and on
clicking any record in the popup window, i should get that value into my text
box.
search
Abhimanyu Koul
FinEng Solutions (P) Ltd.
Dani Compound,
158, Vidyanagari Marg,
Kalina, Santacruz (East),
Mumbai - 400 098
Hi!
I want to change date validator-rules so ih the input data id equal "#" than
return that everything
is ok... How can i do that?
Tnx, Stanislav
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EM
Hello,
How can I pass all the request parameters into a bean ?
For example:
class User {
private int id;
private String name;
private String sex;
private Dat birth;
private boolean status;
}
How can I set all the request parameters into the User if those
parameters name contain
88 matches
Mail list logo