Hi All,
There is a pure web application that uses only jsf as model, view,
controller. How do we achieve a reusable client-side validations
framework likes Struts's validator framework ?
Any ideas on how we do a clientside validation in a pure jsf application ?
Thanks Regards,
Kumar.
Hi,
Download the sources from this site
http://horstmann.com/corejsf/
In ch12 you can find examples for generating the client side javascript
code for performing the client side validations.
Regards,
KP
-Original Message-
From: babloosony [mailto:[EMAIL PROTECTED]
Sent: Wednesday,
Use an Action as you use a servlet. That is, in the execute method there
is the parameter HttpServletResponse response. Use it and render you
HTML page. You can then return null; (it means forward to nowhere) so
your HTTP response will be made only of your text built inside the Action.
But I think
Craig McClanahan wrote:
On Tue, 28 Sep 2004 20:12:58 -0700, Michael McGrady
[EMAIL PROTECTED] wrote:
I know what you are saying, Langdon, but warn you that a lot of those
solutions on the Googling are really poor solutions. I am sure you know
that already.
Your definition of a lot must be
There are no JSPs. All HTML. This is retrieved by another site.
rgds
Antony Paul
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 29, 2004 12:17 PM
Subject: Re: Rendering javascript using Action
Use an Action as you use a servlet. That is,
Brian,
If you are interested, I just created my first (and VERY basic) taglib to do
this. The syntax is:
val:required formName=someFormName
property=someFieldSomeTextToDisplay/val:required
If you want to lookup if the validation for the Action /someAction with
the field name is a required
Return Receipt
Your Maven with Struts
document
:
You can create a project model with :
maven genapp
Template name : struts or struts-jstl
It will prepare a very simple project for maven ready to use with struts.
Arnaud
On Wed, 29 Sep 2004 09:21:09 +0530, Bharathiraja
[EMAIL PROTECTED] wrote:
hi,
Anybody please explain me or give me some
A good place to start is checkout the struts source from cvs.
Setup a project that follows the maven ways
/project/project.xml
/project/project.properties
/project/maven.xml
/project/src/java
/project/src/webapp
/project/src/webapp/WEB-INF
/project/src/webapp/WEB-INF/web.xml
Define you
Hi,
I'm using struts 1.2.4 framework and I'm trying to
alter a form-bean definition (specified in struts-config.xml file) during
run-time in order to temporaly change the java class that implements that
form-bean.
I subclassed the ModuleConfigImpl and ModuleConfigFactoryImpl classes
in order to
Hi friends,
in my case .. we r generating a jsp which contains some tables of information.
Its a search results screen... we r gettting the records based on the
search criteria given by the user..
but the problem is as follows...
There is a button on the screen Refine Search
The user can
I know what you are saying, Langdon, but warn you that a lot of those
solutions on the Googling are really poor solutions. I am
sure you know
that already.
Is there a definitive resource anywhere for Struts tips, patterns and example code
for common problems/questions ( possibly
Hi Wendy
I really apologise to be sending you mail directly. I have been trying to
post on the Struts list for 2 days, but for some reason I cannot manage to
do it. I am registered, and I receive all the postings but mine just won't
show up. I am sending to [EMAIL PROTECTED] I need to post a
I know what you are saying, Langdon, but warn you that a lot of those
solutions on the Googling are really poor solutions. I am
sure you know
that already.
Is there a definitive resource anywhere for Struts tips, patterns and example code for common problems/questions ( possibly something
Check out the Oracle Faces components set which you can get an Early
Access version of from:
http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/index.html
This implemenation has client side validators built-in
Regards
Duncan Mills
babloosony wrote:
Hi All,
There
Return Receipt
Your Maven with Struts
document
:
I'm still stuck with this one. Anyone has any suggestions?
Phong.
In mainfile:
tiles:put name='stepimage' content='/images/dealerapp1of7.gif'
direct='true'/
In a layout file which is included in the template file
bean:define id=img
tiles:get name='stepimage' flush=true /
here is a very schematic representation of Struts flows (in french).
http://www.infini-fr.com/Sciences/Informatique/Langages/Imperatifs/Java/ServletsJsp/Struts/Struts.gif
or here http://www.darwinsys.com/java/java-struts.pdf
Bj
vineesh . kumar a écrit :
Helo all,
can anyone explain the
Hi,
Just a question on what's the usual practice or the easiest way of
adding/updating a product to an online store.
1.
Is the usualy practice using web services where a registered supplier
login and send an XML file with images serialized as binary data to
add a new product or update product?
Hello guys,
Can we prepare a list of URLs of resources that can be useful to person who
have no background in java and need to develop struts application. A
comprehensive FAQ is also proposed.
Take care
Amit Gupta
Mobile:9891062552
Email: [EMAIL PROTECTED]
A request - given the barrage of spam
try removing the flush attribute
bean:define id=img
tiles:get name='stepimage' flush=true /
/bean:define
html:img page=%=img% height=10 /
--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM:
Return Receipt
Your Re: Advice on adding/updating products to an online store?
document
:
Hi all,
I'm trying to create a link to an action using the Struts' html:link tag
like this:
html:link action=getSearchResults name=SearchActionForm
scope=requesttest2/html:link
However when I load the jsp containing this l get the following
exception:
[ServletException
I did remove the flush attribute below, but got the same result.
Phong.
On Wed, 29 Sep 2004, James Mitchell wrote:
try removing the flush attribute
bean:define id=img
tiles:get name='stepimage' flush=true /
/bean:define
html:img page=%=img%
Rudi Doku wrote:
Hello,
I'm new to struts. I have added the following string
to teh ApplicationResources.propertiesfile :
topic.label=Topic
I am trying to display this label on the page without
very much success. My page looks like this:
%@ page contentType=text/html;charset=UTF-8
language=java%
In this case I suspect the problem is that the basename attribute in the
fmt:bundle / tag does not have the full path to the file. e.g. it
should be something like
basename=myapp.view.resources.ApplicationResources
Regards
Duncan Mills
Jeff Beal wrote:
Rudi Doku wrote:
Hello,
I'm new to
Create a wrapper class or companion class for your product beans. If
it's a wrapper class, each instance contains a reference to a product.
If it's a companion class, perhaps you have a couple of maps, with the
keys in both maps being product ID, and the value in one being the
product, while
Hi,
I have a JSP Page which has two dropdown fields. If the user selects
something from first dropdown and doesn't selects anything from the
second dropdown, it displays me an error message saying This field is
required. But now I have a scenario wherein, on selecting a particular
value from
Hi!
I'm having great pains getting DynaValidatorForm to validate only the
page= attributed field elements in my validation.xml file.
It's the usual scenario: one DynaValidatorForm which is completed over
several JSP pages.
I want validation to occur as each page is submitted, using the
My Collection, PageBeans (plural), generates a
drop-down list like this:
html-el:select property=document
html-el:option value=-Select-/html-el:option
html-el:options collection=PageBeans
property=name labelProperty=name/
/html-el:select
Each individual bean, PageBean (singular), in the
How u r getting the error message.. urself has done something for it..
is that error message u r getting is a javascript alert?? or u r
getting that frm application.properties file??? i mean java side???
On Wed, 29 Sep 2004 18:55:19 +0530, Priya Jotwani
[EMAIL PROTECTED] wrote:
Hi,
I have a
I am getting it from the application.properties file. It's the code
which is already in place.I have to just do some modifications.
-Original Message-
From: Kranti Parisa [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 29, 2004 7:09 PM
To: Struts Users Mailing List
Subject: Re:
Turn the validation off on the second dropdown.
-Original Message-
From: Kranti Parisa [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 29, 2004 9:39 AM
To: Struts Users Mailing List
Subject: Re: Error Handling in Struts
How u r getting the error message.. urself has done something
Jeroen Breedveld [EMAIL PROTECTED] wrote on 09/29/2004 08:40:56 AM:
Hi all,
I'm trying to create a link to an action using the Struts' html:link tag
like this:
html:link action=getSearchResults name=SearchActionForm
scope=requesttest2/html:link
However when I load the jsp
Hi all
I'm using the 1.2.4 distribution of Struts (upgraded from 1.2.2
because of the known issues). I'm using the distribution exactly as it
came, and I see that validation.xml is causing problems. I'm getting
the following error.
It's pretty obvious why this is happening as all the elements
but I'm not using the validation.xml
Remove the loading of the validation xml from the struts-config.xml or the
web.xml whereever you set it to load from.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 29, 2004 9:51 AM
To: Struts Users
Where is the complication? During validation? If so, perhaps using
requiredif/validwhen rules would help. This way, the validator can be
told to forego validation on the second field if the value of the first
field passes some test (matches some value). A common example of this is
where you
Hi,
|| -Original Message-
|| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
|| Sent: woensdag 29 september 2004 15:10
|| To: Struts Users Mailing List
|| Subject: Re: ServletException using html:link tag
||
||
||
|| If I'm understanding your problem and if you have a
||
Return Receipt
Your Re: Advice on adding/updating products to an online store?
document
:
Depending on which version of Struts you are using, use requiredif or
validwhen.
See the online documentation for further details.
http://struts.apache.org/userGuide/dev_validator.html
--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx
Caroline Jen wrote:
My Collection, PageBeans (plural), generates a
drop-down list like this:
html-el:select property=document
html-el:option value=-Select-/html-el:option
html-el:options collection=PageBeans
property=name labelProperty=name/
/html-el:select
Each individual bean, PageBean
Mark - not sure if this is your problem, but based on what you pasted in
here, your JSP page is missing an html:form element. I'm going to
assume you snipped a bit more than what you said, but just in case...
All of your code seems correct to me. The only other thing I think could
possibly be
Gupta wrote:
person who
have no background in java and need to develop
Here is just the thing:
http://developer.sun.com/prodtech/javatools/jscreator/index.jsp
Also google on Sun'd PetStore on how to use EJB w/ above.
.V
ps: People that have development background should use
I have no issue with the action: it indeed has no knowledge about the
actual views being used which is OK. It means I'm able to re-use
actions if I want to.
The JSP pages however seem to know way to much about navigation. They
know this because they directly refer to an action path. This seems to
Thanks Duncan, I sorted out the problem. I'm also new
to JDeveloper 10g. I refered to some online JDeveloper
struts tutorials as well as Struts for Dummies, which,
by the way, is a really good book for Newbies.
--- Duncan Mills [EMAIL PROTECTED] wrote:
In this case I suspect the problem is
Varley, Roger wrote:
I know what you are saying, Langdon, but warn you that a lot of those
solutions on the Googling are really poor solutions. I am
sure you know
that already.
Is there a definitive resource anywhere for Struts tips, patterns and example
code for common
Hi,
you can use org.apache.struts.actions.DispatchAction instead of Action.
See Struts documentation.
I never used it, but if i remember correctly there was a bug (recursive
call) related to it.
BR
/Amleto Di Salle
-Messaggio originale-
Da: Shabada, Gnaneshwer [mailto:[EMAIL PROTECTED]
All,
I'm not sure if I am contacting the right list but this is the problem
that I am facing:
I am trying to convert a series of registration pages over to Struts.
The web server that I am using is JBoss 3.2 and it will eventually be
implemented on a cluster. What I want to know is what the
Have you looked at Struts for Dummies? It's not a
good bad book to start with. Several good examples
with detailed explanation.
--- Varley, Roger [EMAIL PROTECTED]
wrote:
I know what you are saying, Langdon, but warn you
that a lot of those
solutions on the Googling are really poor
Are you going to get an external HTML page and putting your own code to
it?
In this case you can do that very easily using a wrapping JSP page and a
tag library from the Jakarta Taglibs project:
http://jakarta.apache.org/taglibs/doc/io-doc/intro.html
Take a look to the io:request and io:http tags.
Hi
I'm using multibox and thats required fileds, i'm using required validation
in calidation.xml, but it's not working, ann ideas?
Thanks in advance
Anand
_
The new MSN 8: advanced junk mail protection and 2 months FREE*
Frank,
Thanks for your input. Thought I'd forward this back to the mailing list so
that others can view..
Coming back to my problem. I would call the same action from two screens
because, they both are delete functionality. It's just I need to determine
in my deleteAction class if its a multiple
When you declare that a form-bean connected to an action is used with
scope session means that an instance of that form bean will be put
inside the session space, i.e. the one you take calling:
request.getSession()
Then, the form bean is put inside the session scope of the web server that
I strongly recommend the book Jakarta Struts by O'Reilly. This book
clears up a whole bunch on how the framework all comes together and
also offers insight on some of the more advanced features of struts.
It's a good book to skim over and then later use as a reference when you
have questions on a
Thanks for the feedback! Much appreciated.
I realised that in my JSP page(s) I had the
html:hidden property=page value=1/
element declared before my form element:
html:form action=/WizardPage1Submit focus=firstName
The ordering of html:form first, with html:hidden nested inside
would seem
Hi,
As i wrote before may be the solution is to use DispatchAction.
BR
/Amleto
-Messaggio originale-
Da: Shabada, Gnaneshwer [mailto:[EMAIL PROTECTED]
Inviato: mercoledì 29 settembre 2004 18.00
A: '[EMAIL PROTECTED]'
Oggetto: RE: Detecting the previous JSP
Frank,
Thanks for your
DOH! I didn't upgrade my validator-rules.xml file from 1.1 to 1.2.4.
This previous post to this mailing list solved the problem:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg11592.html
Many thanks to those who responded to my original post.
Mark.
-Original Message-
From: Mark
From: Anand M S [EMAIL PROTECTED]
I'm using multibox and thats required fileds, i'm using required
validation
in calidation.xml, but it's not working, ann ideas?
You need to post the relevant bits of the JSP, validation.xml and explain
what you mean by it's not working. Are you getting errors?
Hi,
I have a screen which lists some names in a table and has a delete option
which calls an action to delete the associated name and then the view page
shows the updated list.
If you do a delete and then select refresh on the browser, the resulting
request is for another delete which is
Hi Wendy
here is the piece of code
struts.config.xml: form-property name=disability
type=java.lang.String[] /
validation.xml:
field property=disability depends=required
arg0 key=applicationForm.disability.displayName/
/field
JSP:
I'm using logic:iterate tag to create checkboxes
The html:form tag will (or should!) render a hidden field, on your html
form, containing the token value.
Paul
-Original Message-
From: andy wix [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 29, 2004 5:18 PM
To: [EMAIL PROTECTED]
Subject: Refresh problem
Hi,
I have a
I think that information should be passed to the action via form
properties (using html:hidden input tag on your pages)
On Wed, 29 Sep 2004 18:05:57 +0200, Amleto Di Salle
[EMAIL PROTECTED] wrote:
Hi,
As i wrote before may be the solution is to use DispatchAction.
BR
/Amleto
Hi,
Ah, that will be why... I use a link to submit. Is there any way to force
this to happen without a form?
Thanks,
Andy
_
It's fast, it's easy and it's free. Get MSN Messenger today!
http://www.msn.co.uk/messenger
From: Anand M S [EMAIL PROTECTED]
if i don't
select any one of the checkboxes and submit, it did not rise error
message,
it suppose to give error message as it is required field.
Where do you expect the error message to appear? What do you have in the
JSP?
Are you sure validation is turned
if i don't
select any one of the checkboxes and submit, it did not rise error
message,
it suppose to give error message as it is required field.
One more thing... what does your 'reset' method look like? Any chance
you're UN-checking a box and expecting it to fail? Without reset, the value
Patience grasshopper ...
Varley, Roger wrote:
Is there a definitive resource anywhere for Struts tips, patterns and example code for common problems/questions ( possibly something like O'Reillys Cookbook books). Whilst you may be right that many of the googled solutions are bad solutions, the
andy wix wrote:
Hi,
Ah, that will be why... I use a link to submit. Is there any way to
force this to happen without a form?
Thanks,
Andy
_
It's fast, it's easy and it's free. Get MSN Messenger today!
Hi folks,
I'd like know How I change the mainlayout of tiles on the fly, Can I
do this?How???
definion name=mainLayout page=\mainLayout.jsp
.!--declaretion of my inserts..--
.
.
/definion
definion name=otherLayout page=\mainLayout.jsp
.!--declaretion of my inserts..--
.
.
/definion
I'm using org.apache.struts.validator.DynaValidatorForm for form type in
struts-config.xml, i do not have sub class, so there is no overrriden method
for reset. Form is in request scope, i guess it's fine.
It's loading validation rules and validation is working correctly for other
fileds on the
Hi,
Can anyone let me know how to display or hide a table
based on the choice of a radio button.
Initially both the tables will be hidden and one among
them will be displayed on the click of a radio button.
Thanks.
__
Do You Yahoo!?
Tired of
Shabada, Gnaneshwer wrote:
Hi.
Is there any way in Struts I could determine dynamically what
JSP/screen/action am coming from when I am in a certain screen. I have a
scenario where I can delete users from a result list page or a member
details page. I want to use one action to do both. But to code
Wrap the table in a div :
div id=tableDiv style={display:none}table/table/div
Then call an JS function from your radio button (using something like an
onclick listener).
script language=javascript
function showTable() {
document.getElementById(tableDiv).style.display =
I have a JSP which uses JSTL to define a variable. This same JSP uses
tiles:insert to include a page segment that also needs to be able to have
visibility to its parent JSTL variable. How can I pass that variable to the
inserted tiles page and have it update the variables value so that the
From: JUTTIGA PHANIDHAR [EMAIL PROTECTED]
Can anyone let me know how to display or hide a table
based on the choice of a radio button.
Initially both the tables will be hidden and one among
them will be displayed on the click of a radio button.
With or without a form submit, or does it
If you are talking about client side then use div tags
and toggle visibity and innerHTML.
to hide a div-
div11.innerHTML='';
div11.style.display = 'none';
to show a div-
div11.style.display = '';
div11.innerHTML=detailsString;
where detailString contains the content to show.
If its is server
Frank,
Thanks again. I ran around into another problem trying to implement this
delete functionality. My member details (single delete) screen actually has
3 buttons for Update, Delete, Cancel. On this JSP my default action is
/update in the form tag. But when I display my Delete button I am
Hi, newbie question again.
I'm trying to use bean:write within html:text tag.
Here is how I use it with just plain HTML and it works:
input type=text name=somename value= ' bean:write name=myBeanName
property=id/ '
or
input type=hidden name=somename value= ' bean:write name=myBeanName
oh no, it's Client side. My browser gives Javascript error saying Object
does't support this property or method on the submit line.
I am starting to wonder, bcuz I've used this kind of calls in other
non-struts apps so many times..or am making any obvious mistake on my JSP?
-Original
Hi, newbie question again.
I'm trying to use bean:write within html:text tag.
You can't. You cannot nest tags. Use the el tags instead.
Here is how I use it with just plain HTML and it works:
input type=text name=somename value= ' bean:write
name=myBeanName property=id/ ' or input
Nadia K.,
If myBeanName is the ActionForm associated with your Action, just use:
html:text property=id /
If myBeanName is a bean you manually saved in the session or request and
isn't listed as the form for your action (using the name= attribute in the
action mapping), then you can try:
Hello Nadia
I dont know why you use
html:text
name=somename value= ' bean:write name=myBeanName
property=id/ ' /
instead of use
html:text
name=myBeanName property=id /
did u configure myBeanName in the struts-congig.xml?
does the action of the html:form use the bean-form myBeanName?
On
Hello Nadia
I dont know why you use
html:text
name=somename value= ' bean:write name=myBeanName
property=id/ ' /
instead of use
html:text
name=myBeanName property=id /
did u configure myBeanName in the struts-congig.xml?
does the action of the html:form use the bean-form myBeanName?
On
Hi,
I know this question has been asked before. I searched
the archives and found mails describing the problem I
have.However, I wasn't able to find any code example ,
which would make my life easier.
Well, I have a scenario in which I need to generate a
group of radio buttons dynamically eg.
tried that too..and worse is html:form doesn't take a name attribute..
function callDelete()
{
alert(call delete);
document.forms[0].action=/deleteRegistration;
alert(call delete again);
document.forms[0].submit(); JS error
}
-Original Message-
From:
OK. I obviously don't know enough to use the tags properly even though I've been
playing with struts for a week or two. My biggest problems are with the presentation.
The bean myBeanName is the DTO object and not an action form so it's not specified in
the struts-config.xml. The action form
Nadia,
Since you're talking DTO and not an input form bean, I recommend putting
your myBeanName object in the request scope using the method
request.saveAttribute() to store it. You should then be able to access it
using html:text and the name=myBeanName parameter a bit like this:
html:text
Does anyone know if there are plans for (or if an existing library is
floating around) that allows inline conditional expressions in the
POSIX style? An example would look something like the following:
c:out value=${user.registered ? 'registered' : 'guest'}/
I realize it is possible to use
I understand now.
first create a bean-form that it has as many properties as u want to show.
then declare it in the struts-config at top of the file.
then, in the action declaration, with the atribute name, tell that this action
uses the bean-from u declered previously.
then in the action that
I understand now.
first create a bean-form that it has as many properties as u want to show.
then declare it in the struts-config at top of the file.
then, in the action declaration, with the atribute name, tell that this action
uses the bean-from u declered previously.
then in the action that
I understand now.
first create a bean-form that it has as many properties as u want to show.
then declare it in the struts-config at top of the file.
then, in the action declaration, with the atribute name, tell that this action
uses the bean-from u declered previously.
then in the action that
I understand now.
first create a bean-form that it has as many properties as u want to show.
then declare it in the struts-config at top of the file.
then, in the action declaration, with the atribute name, tell that this action
uses the bean-from u declered previously.
then in the action that
Optionally,
What I have often done with DTO's is populate the action form from the DTO
and place the action form in the appropriate scope for use by the page.
Assuming that almost everything is a call to an action you can do this in
the action class just prior to forwarding to the view. It gets
Dan Allen wrote:
Does anyone know if there are plans for (or if an existing library is
floating around) that allows inline conditional expressions in the
POSIX style? An example would look something like the following:
c:out value=${user.registered ? 'registered' : 'guest'}/
I realize it is
Dan,
If you are using a JSP 2.0 container, here is a snippet from a post I made
in the last few days on how to use the ? : conditional statement:
JBoss v4.0 says it (like Tomcat 5.X.X) supports JSP 2.0. So you can use the
standard Struts release and simply type in the ${expression} syntax from
Hi,
I upload a file in which I read information to fill a Collection of
ValidatorForm object. The file is stocked in a DynaValidatorForm, who is
called in the ActionMapping of the struts-config. The Collection of Form is
fill in the DispatchAction of the ActionMapping.
I validate the
Thanks to all of you. I'll try your suggestions and let you know.
Nadia
-Original Message-
From: Fogleson, Allen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 29, 2004 3:47 PM
To: 'Struts Users Mailing List'
Subject: RE: bean:write within html:text, how to use?
Optionally,
What
Thanks! I'll try that.
Nadia
-Original Message-
From: Ricardo Andres Quintero [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 29, 2004 2:43 PM
To: Struts Users Mailing List
Subject: RE: bean:write within html:text, how to use?
I understand now.
first create a bean-form that it has
YES!!! The missing link to JSTL has been added! I'm excited...now I
guess I just need to migrate to JSP 2.0.
Dan
On Wed, 29 Sep 2004 15:59:30 -0400, David G. Friedman
[EMAIL PROTECTED] wrote:
Dan,
If you are using a JSP 2.0 container, here is a snippet from a post I made
in the last few
I have action mapping in the struts-config.xml like
this:
action
path=/ContentMgmt // the path for a link
type=org.dhsinfo.content.SelectPage
scope=request
validate=false
forward
name=success
path=.frame.Content/
/action
Dan,
Just don't forget to turn JSP 2.0 on for all JSP's
OR
on for selective JSP's using the in-page call:
%@ page isELIgnored=false %
It definitely works for me on a per-jsp basic in Tomcat 5.0.28 when I tested
it this week under Eclipse v3.X. :)
Good luck,
David
-Original Message-
1 - 100 of 115 matches
Mail list logo