I have a JTabbedPane similated application where I click back and forth
between 2 tabs...
In the process of going back and forth, I keep losing the data that I
entered on my first tab.
They're both sharing the same form object at session scope.I have
verified that...
When clicking from
This is the Tabbed Pane portion of my application:
table
tr
td valign=top
html:link page
=/UserActionPreload.do?method=tabChangetabname=DetailsDetails/html:link
/td
td valign=top
html:link page
=/UserActionPreload.do?method=tabChangetabname=LinkEmployeeLink to
Employee/html:link
Hi James:
But what if you have multiple html:submit's in your jsp...
And supposing only 1 of those submit button's need to have this javascript
confirm() popup. How does the onSubmit() at the form level know which
submit button-property was set?It would need to do an if statement and
only
thanks Leonardo!
Theron
Leonardo
Maciel To: Struts
I know with the html:form you have the onSubmit() javascript handler in
which the following will work:
script language=JavaScript
function unlinkConfirmation() {
if (confirm(Remove employee link?))
return true;
else
return false;
}
I apologize James, I ended up doing it a totally different way (without
using html:button) which seems to work nowI did not save the prior
way that I was having problems with :-(
theron
In a book I have it says:
It is also important to note that the Action class must be designed in a
thread-safe manner. This is because there's only a single instance of an
Action class per action element in the action-mapping configuration file.
So here's my 2 question(s):
1. I then
There are 2 different path elements but both refer to the same Action
class
instance...Does this mean 2 static instances of
BillingActionPreloadForm will exist or will only just 1 exist between
the 2
different action mappings that link to the same class?
I don't know, but it doesn't
The mm mysql jdbc driver has a last_insert_id() method to call after an
insert. It's the only way the driver returns you that info.What I
don't know though is how accurate it is?I think you can shoot
yourself in the foot if the call to it is not properly encapsulated within
a
Perhaps someone else can correct me.I don't believe you can access this
within JavaScript since JavaScript is client side and forms are
server-side...
You could preload hidden properties from a form selection and then access
them thru JavaScript
I had to set a form's propery thru
html:text property=firstName
size=%= EBDBTemplateFactory.getDBFieldSize
(CUSTTABLE, FIRSTNAME) %
maxlength=25
disabled=%= empForm.getFormEditFields() %
styleId=small/
I'm trying to
Sorry for replying to my own post... This seems to work:
% sSize
= new
Integer(EBDBTemplateFactory.getDBFieldSize(sTable, FIRSTNAME)).toString
(); %
html:text property=firstName
size=%= sSize %
Hi Richard:
Thanks for your help Escaping did the trick Unfortunately, it
makes the code look a little sloppy with all those backslashes :-)
I have since changed it to:
%!
public String getFieldSize(String sField) {
return new
I'm having a hardtime controlling the field-width for a dropdown using
html:select with html:options:
For example:
td ID=small width=100 maxlength=100
html:select property=addressstate size=1
disabled=%=
This is tricker than I thought:
What is the equivelant of:
link href=http://localhost:8080/express/billing.css; rel=stylesheet
using the html:link tag?
I see they have the style property and the styleClass property but I am not
sure exactly how they are used.
thanks for any insight...
thanks...
But for my next question though:
Why does the documentation:
http://jakarta.apache.org/struts/userGuide/struts-html.html#link
mention the style and styleId and the styleClass properties?
thanks,
Theron
We're converting our existing JFC/Swing application to use struts.We
have 3 developer's and have written alot of jsp's. Our pages look quite a
bit different and it's time to start converging them to use a uniform
front-end look and feel.
Can others offer opinions as to how you're doing
Hi Folks:
Don't really know much yet about this...I've implemented sensitive-form
resubmissions by way of tokens within actions but have a question about
when a session times out...
Under Apache (I don't know where yet), I suspect there's a timer/variable
in some configuration file that
Thanks Robert:
This is great information.
I was curious if the beans in the timed-out session automatically get
descoped and garbage-collected?
thanks,
Theron
Robert
I am getting a new computer in 2 weeks for home use. I plan to develop an
application using Struts and would like to use Tomcat 4.0
I don't want Windows XP installed so they're installing Windows 2000
instead.
Does Tomcat 4.0 run under Windows 2000?I spent about 15-20 minutes at
The nested tag tutorial created by Arron Bates simply rocks!I was kind
of intimidated by nested tags until I took a few hours out of my day to go
thru parts 1 and 2 of the tutorial. Thanks to the way it was well laid
out AND interesting, nested tags are no longer intimidating.Thanks to
thanks...I notice I cannot run his StrutsMonkey.war application because
he did not include the ApplicationResources file in the war file.I get
an exception when I try and run his application about a message resource
not being found.
I'll try and send the author of that web-site an email
I'm starting to get burned by using logic:iterate more than once in my
same JSP page.It's screwing up the results and I am getting some
bizzare server-side JSP exceptions.I think only nested tags will solve
this...I have downloaded/installed the new nightly build for struts and
I had to do something similar this last week and it was not as easy as I
thought it would be :-) In your Javascript, you can call an action to
reload this and then the action can return an ActionMapping back to your
current page after a reload.Although note that your page will
completely
I'm about to embark on writting some logic on a JSP page to traverse a
resultset but I want the page to have a dynamically created link at the
bottom of the resultset that will be:
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13
Where each page is a link that will cause the next-10 or prev-10 rows
from
A co-worker and I were talking about this yesterday and I was curious of
the following
Seems like in order to develop a struts application, you'll have to pay for
a private JVM instance so you can start and stop the tomcat or other JSP
engine so that it can re-read the config.xml files
logic:notEmpty name=EBErrorMsg property=exception scope
=request
pException: br[bean:write name=EBErrorMsg property
=exception/]brbr
%
if (EBErrorMsg.getException() == null) {
System.out.println(getException is null);
}
else {
Never mind, I forgot to include:
%@ taglib uri=/struts-logic prefix=logic %
In my JSP. Surprisingly, I received no JSP errors or exception stack
trace before when I did not have that include. I am surprised by that
behavior.
Hi Folks:
A thousand pardon's if this has already been asked in the pastIs
there a hosting service that's inexpensive or free (I doubt it?) that would
allow one to create a web-site that allows me to use JSP/Struts and mySql
database as well as access to an SMTP daemon to send email?
Thanks Greg:
Chances are whatever site I go with, I'll try and find a sponser who will
cover the charges since the site would benefit the readers and the bands
that the site promotes.The site would not benefit myself.So what I
would do is perhaps develop the site locally and borrow a
thanks Robert:
I don't feel so bad.I was stuck for 3 hours on this doggone dilema (not
to mention a little bit of cussing) and tried quite a few things prior to
my final solution of the intermediate JSP to set the property...I did
not think that setting a form object's values from
Hi Folks:
I'm doing a mimic-JTabbedPane approach. I have a screen with 5 tabs.I
am using 1 form object and 5 action mappings...
On tab 4, I'd like to detect changes made to a field on tab 1. I notice
I can change the field on tab 1 but tab 4 does not know about until the
form is
After spending 2 hours trying to find a solution to this, I found one by
trial and error...
BUT THERE HAS GOT TO BE A BETTER WAY :-)
Here's what I did but I can't believe it's this difficult to do...
Here's my checkfield property that needs to force a form value to be
updated:
I plan on trying it some time when I'm not under so much time
pressure. (It's ironic that sometimes we're so busy that we don't
have the time to learn how to do things more efficiently).
That's a funny and sad statement at the same time :-) I can definitely
relate. Many companies want
What do you have to do to have the Action class forward to a servlet
(instead of a jsp)? Do you have to use any special syntax in the
struts-config.xml or web.xml?
I need to have more control over the response sent to the client
(formatting, etc).
Any help would be greatly appreciated.
With the given html tags for the struts and taglibs and such, is there an
easy way to enable a corresponding textfield when you check the box?
Is there an easy way to disable the corresponding textfield when you
uncheck the checkbox as well as clear the text field.
thanks,
Theron
--
To
Me too.
Thanks again Larry.
John Menke
john@eagleinfosy
Hi Folks:
We're converting much of our GUI (written in JFC/Swing) to thin client
using HTML-JavaScript and the struts framework.
I have converted a few of the simpler maintenance screens using the
framework and (thanks to you all) have learned quite a bit with struts.
There is a screen that I
One other question though now that I am looking at this a little closer:
Each of my individual JSP's should not have a Submit/Cancel/Reset for each
page.I was thinking about having one and only one Submit/Cancel button.
So I would probobly use a Frame and have a target window (which would
Thanks alot!!!
That worked.
Jim Crossley
jcrossley@ifTo:
Hi Dave:
I am very sorry again to keep asking questions about this. I think I am
finally starting to understand... But please pardon my ignorance.
If you have the following scenario where all is defined as request scope:
1. The user hits the submit button on FORM A and FORM A's
Hi Dave:
thanks so much. This is helping. I think I know the answer to this
question but can you verify this with me:
- Based on what you said:
Request scope changes when the browser makes a request of the server.
Does this mean that invoking an http request to bring up a JSP page or
I have an action as such:
---
action
path=/enterBillingEdit
type=express.BillingIDActionForm
name=BillingIDForm
Rest omitted to save space
---
and the form definition of:
form-bean name=BillingIDForm type=express.BillingIDForm scope
=request/
And I have an entry
Hi Folks:
Pardon my ignorance.You guys have been a great help.Only been using
struts for a week or so.
Here's the scenario:
Step 1
Screen 1 has a menu of html:link
- Add Biller
- Edit Biller
- View Biller
Step 2
When you click Edit or View, I bring up another form (Screen 2) to
Hi Folks:
I have an action in struts.config.xml that looks like:
action
path=/enterBillingView
type=express.BillingIDActionForm
name=BillingIDForm
scope=session
validate=false
parameter=/BillingView.do
forward name=success
Hi Folks:
How can I determine when a bean/form in request scope has terminated?
Will hitting the back button on the browser and bringing up JSP pages
that use beans in request scope be using invalid beans in that case
(since they have scope=request)?
I'm still trying to figure out the
Hi Folks:
thanks to your help, you indicated that the Action should preload form
values on a maintenance form. This works great.
I have an Action object that allows maintenance on a table (call it table
A). This action object handles preloading of data
as well as the actual updating of
thanks Simon:
With all do respect to the other method (ie, parameters), I tend to favor
your approach.I have just completed a maintenance screen by having a
combined action and I don't like the if-else's and the action file is huge.
By splitting it, I can re-use the LoadFormAction in other
Wow!
Great reply. I am saving this one.
thanks,
Theron
Emaho, Ghoot
thanks Ted:
Your recommendation is a great way of doing it.
Theron
Ted Husted
Ted (or anyone else):
I am having a problem (I'm a newbie) with calling an Action.do to preload
form data.
The problem I am having is that I want to have validation=true so that my
form will perform validation...
What's happening is I have a menu (from a jsp file) with the following:
thanks so much Ted for your help on this...
It's highly appreciated!
Theron
Ted Husted
Hi Folks:
Does there exist a taglib or a way to perform date/time validation on an
input form WITHOUT having to use Javascript in the form?
Preferably a tag library would be the way to go.Unfortunately, all of
the date time tag libraries that I see (including the one on jakarta's
site)
Thanks Mark for your answer.
I was just curious how most others here choose when to perform things
like date/numeric validation?
thanks,
Therion
Mark
With struts,when using a Form, I'd like to be able to have the form
pre-load records prior to the form being displayed.
Actually, more than just that, I'd like to have a form that can be entered
in 3 different possible states:
- Insert state (in which case the form is empty)
- Edit/View state
In the end, I've just grabbed the Form bean from the pageContext
Pardon my ignorance but can you tell me the syntax in your JSP page to do
just that above?I think I'll need to be doing the same thing.
thanks,
Theron
Hi Folks:
I very versed with Java Swing ui programming as well as server side
programming via servlets and jsp.
I also understand the MVC architecture having done MFC and then JFC so I
understand about models and views and components.
Being new to struts, I am familiarizing myself with the
Hi Folks:
I'm doing the tiles tutorial at:
http://www.lifl.fr/~dumoulin/tiles/doc/tutorial.html
It says:
Copy directory tutorial/images from the distribution tutorial directory to
your examples root directory
for any help or comments,
Theron Kousek
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
59 matches
Mail list logo