Hi,
I am using bean:write tag to display properties
(return type Double) of my form bean.
I am also using formatKey attribute to format the
output.
This is the format key I have mentioned in
ApplicationResources.properties file.
display.currency=#,## 0.00
Formatting works fine. But negative
Hi,
Is it safe to create an instance of a action class in
another action class and use.
For example ..
public NewAction extends Action
{
public ActionForward execute ()
{
OtherAction oact = new OtherAction();
oact.execute();
}
}
Thanking you,
Chamal.
Hi,
I want to retireve a message from application
resources file.
This is my code..
resources
=(MessageResources)pageContext.getRequest().getAttribute(
Action.MESSAGES_KEY );
format = (String)
resources.getMessage(display.currency );
This works fine. But only issue is that
Message-
From: chamal desilva [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 05, 2006 8:52 AM
To: user@struts.apache.org
Subject: Formatting numbers in text field
Hi,
Is there a way display numbers in a text field in a
formatted way.
For example I want to display 100 as 1,000
Hi,
Is it possible to compare dates with logic equals tag.
My form bean has a property called addedDate.
I need to compare it with date 2006-12-24
how should I write the equals tag
logic:equals name=FormBeanName property=addedDate
value=What should I put here
Thanking You,
Chamal.
Hi,
Is there a way display numbers in a text field in a
formatted way.
For example I want to display 100 as 1,000 in a text
field.
My form field attribute type is Double.
Thanking You,
Chamal.
Do you
Hi,
U can do like this,
html:select name=division property=teamRef
html:optionsCollection name=division
property=allTeams value=teamRef label=teamName/
/html:select
Division is a form bean.
allTeams is the vector which contains the objects.
Vector contains team objects which has teamRef and
Hi,
I want to call
mapping .setInput() method inside my validate method
of a form bean.
But it throws an Exception.
java.lang.IllegalStateException: Configuration is
frozen at
org.apache.struts.config.ActionConfig.setInput(ActionC
Hi,
I have a form bean as this one
public class CustomerForm extends ActionForm
{
private AccountForm accForm = null;
// other attributes and methods
}
My JSP looks like this. It has a form which contains
details of CustomerForm as well as AccountForm inside
CustomerForm.
html:form
Thanks Antonio Petrelli,
But I can't define a forward, since the forward url
and id are not static. URL can be any page and id can
be any number. Is there a way to do it without
forwards.
Chamal.
--- Antonio Petrelli [EMAIL PROTECTED] wrote:
chamal desilva ha scritto:
Hi,
Is it possible
Hi,
Is it possible to forward to a url rather than
forwaring to a forward in struts.config file from a
action class.
For example we can do like this from servlets.
req.getRequestDispatcher(page.jsp?id=10).forward(req,resp);
Can we do the same with struts.
Thanking You,
Chamal.
Hi,
Is there a Struts tag to search and print a value of a
map
for example a tag like this
c:mapvalue mapname='mymap' key='mykey'/
where mapname is the name of map in session or request
and key is the key in map to be found.
Thanking You,
Chamal.
Hi,
Can we pass an expression to onclick handler of struts
html:submit tag.
html:submit styleClass=headerclk property=submit
value=%=String.valueOf(ArrEmpList.get(i))%
styleId='%=String.valueOf(ArrEmpList.get(i))%'
onclick=hilightButton2('%=myval%');
/html:submit
We tried this. But the HTML is
Hi,
Can we display the values of a hashtable in a html
drop down menu using struts tags.
Thanking You,
Chamal.
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Hi,
I have four classes.
public class AccountForm
{
private String accNum;
}
public class Account
{
private String accNum;
}
public class CustomerForm
{
private String custRef = ;
private Vector accounts= null;//Contains objects
of AccountForms classes
//Get, set methods
}
Hi,
I need to group actions to a common action class.
We dont have EventActionDispatcher since we have
struts version 1.1.
DispatchAction class needs button names to have the
save name as method names. And is there a way that we
can add common functionality to all methods in
DIspatchAction
Hi,
I want store all messages in a properties file called
MessageProperties.
I added this line to struts config file.
message-resources key=messages
parameter=arweb.resources.MessageResources/message-resources
How can I retireve values in properties file from my
action classes in order to
Hi,
How should we test wether a user has permission for an
action. Can we do it in action class or do we have to
do it in EJB tier.
Thanking You,
Chamal.
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
Hi,
I read few articles on struts. They recommend not to
send action form class to EJBs as data holders. They
recommend we should use general classes for holding
data to decople web tier with EJBs.
What they say must be correct but I still have few
doubts (Maybe b'cause I am not experienced).
Hi,
I have few action mapings.
/get_admin_tasks
/add_task
/ass_user
etc.
/get_add_data
/save_customer_data
/save_account_data
etc.
Is it necessary to write Action classes for each of
these actions or can we group several actions in to
one Action class.
What is the best way to
will be reset when struts reset the data.
Thanking You,
Chamal.
--- Scott Van Wart [EMAIL PROTECTED] wrote:
chamal desilva wrote:
For examle let's think there are four Accounts in
accounts vector. The first action displays this
list
on a JSP. User clicks on first account and views
Hi Scott,
Thanks a lot for your reply. It was very useful.
Thanking You,
Chamal.
--- Scott Van Wart [EMAIL PROTECTED] wrote:
chamal desilva wrote:
Dear Scott ,
Thanks for your reply.
If you're viewing the second account, why would
you
need data for the
first account? If it's
Hi,
As I know the reset method of a form bean is called
automatically when a action tries to add the form bean
to session or retrieve it.
Is there a way that we can stop the reset method being
called.
This is what I am
23 matches
Mail list logo