actionForm class

2005-08-13 Thread Balkan Guler
Hello.
 There is something I could not understand with actionForms.
 Suppose that I have 2 pages and a action. 
In first page I want to take student number and call the business objects in 
action to fetch the student details from database and show them in the 
second page.
 there is a studentNumberForm declared in the action-mapping block with the 
studentAction. So struts will fill the studentNumber field of the 
studentNumberForm with the first page parameter and send it to the 
studentAction.
 The question is after taking the student detail from DB where will I place 
them to show in the last page? There is only one action form...


Re: actionForm class

2005-08-13 Thread Sebastian Hennebrueder
Balkan Guler schrieb:

Hello.
 There is something I could not understand with actionForms.
 Suppose that I have 2 pages and a action. 
In first page I want to take student number and call the business objects in 
action to fetch the student details from database and show them in the 
second page.
 there is a studentNumberForm declared in the action-mapping block with the 
studentAction. So struts will fill the studentNumber field of the 
studentNumberForm with the first page parameter and send it to the 
studentAction.
 The question is after taking the student detail from DB where will I place 
them to show in the last page? There is only one action form...

  

a)
You may use hidden fields in the different pages
b)
Save the values or the complete actionForm in the session

-- 
Best Regards / Viele Grüße

Sebastian Hennebrueder



http://www.laliluna.de

Tutorials for JSP, JavaServer Faces, Struts, Hibernate and EJB 

Get support, education and consulting for these technologies - uncomplicated 
and cheap.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: actionForm class

2005-08-13 Thread Richard Yee

Balkan,
The values retrieved from the database don't need to be put into an 
ActionForm. Just put the collection or bean as a session or request 
attribute in your Action class, forward to your second page, and then 
retrieve the values and display them. There is no need to have an 
ActionForm associated with your second page. ActionForms are mainly used 
when you are taking form input from a page.


-Richard


At 07:49 AM 8/13/2005, you wrote:

Hello.
 There is something I could not understand with actionForms.
 Suppose that I have 2 pages and a action.
In first page I want to take student number and call the business objects in
action to fetch the student details from database and show them in the
second page.
 there is a studentNumberForm declared in the action-mapping block with the
studentAction. So struts will fill the studentNumber field of the
studentNumberForm with the first page parameter and send it to the
studentAction.
 The question is after taking the student detail from DB where will I place
them to show in the last page? There is only one action form...




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Struts and XML - Any stories to tell?

2005-08-13 Thread Rahul Akolkar
On 8/12/05, Ted Husted [EMAIL PROTECTED] wrote:
 A colleague is looking to add VoiceXML capabilities to their Struts
 consumer-to-business application.
 
 I don't see any prior references to VoiceXML in the archives, just
 this one aside:
 
 * http://www.mail-archive.com/user@struts.apache.org/msg30556.html
 
 I wonder if anyone here has any VoiceXML best practices, war stories,
 or gotchas to share, especially relating to Struts or development
 tools, or the Jakarta Taglibs Reuseable Dialog Components (RDC).
snip/

Sounds like a RDC thing ;-)

The RDC framework is agnostic to the higher layers. We use Struts for
the controller bits in the sample applications. We have a multi
channel sample application (GUI  VUI) called music-store, that uses
Amazon Web Services (so a AWS subscription ID is needed to try it
out). Looking at the struts config [1] for the sample apps might help
convey how we used path wild cards (Struts 1.2) to tackle multiple
views (one for each channel), while sharing many of the higher layer
artifacts. Ofcourse, the entire sample app is in svn.

At some point, I took a stab at explaining the RDC-Struts interface
[2] in the RDC tutorials [3] section of the Taglibs wiki. Your
colleague may also want to look at the RDC website [4], for
developments and documentation, if there is interest.

I'd be glad to help on taglibs-dev / user @jakarta.apache.org if there
are other questions.

-Rahul

Reference Links:

[1] RDC examples war - struts config for sample apps [
http://svn.apache.org/repos/asf/jakarta/taglibs/proper/rdc/trunk/examples/web/WEB-INF/struts-config.xml
]

[2] Tutorial - How to use RDCs with Struts [
http://wiki.apache.org/jakarta-taglibs/ReusableDialogComponents/Tutorials/StrutsInterface
 ]

[3] RDC Tutorials - [
http://wiki.apache.org/jakarta-taglibs/ReusableDialogComponents/Tutorials
]

[4] RDC home page - [ http://jakarta.apache.org/taglibs/doc/rdc-doc/intro.html ]

 
 TIA, Ted.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Struts and VoiceXML - Any stories to tell?

2005-08-13 Thread Ted Husted
Oops, subject imprecise:

  /s/XML/VoiceXML/

... thanks for the replies so far, gang. 

On 8/12/05, Ted Husted [EMAIL PROTECTED] wrote:
 A colleague is looking to add VoiceXML capabilities to their Struts
 consumer-to-business application.
 
 I don't see any prior references to VoiceXML in the archives, just
 this one aside:
 
 * http://www.mail-archive.com/user@struts.apache.org/msg30556.html
 
 I wonder if anyone here has any VoiceXML best practices, war stories,
 or gotchas to share, especially relating to Struts or development
 tools, or the Jakarta Taglibs Reuseable Dialog Components (RDC).
 
 TIA, Ted.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Displaying errors for all except one key

2005-08-13 Thread Chris Loschen
Hi all,

The app I'm working on (using Struts 1.1) has handled errors pretty
simply: they all used to display in one place. However, now we want to
display some errors separately. We've already set up the errors we want
to display separately with their own key, like this:

errors.add(RIGHT_PANE_THRESHOLD_PROPERTY, new
ActionError(RIHierarchyMessages.RIGHT_PANE_THRESHOLD_EXCEEDED));

And then we set up the main error display JSP like this:

%-- Display Error Messages if the showErrors parameter is true --%
logic:equal name=showErrors value=true
%String global_key=ActionErrors.GLOBAL_ERROR; %
logic:messagesPresent message=false
property=%=global_key%
div class=errorMsgul
html:messages id=message message=false
property=%=global_key% 
libean:write name=message//li
/html:messages
/ul/div
/logic:messagesPresent
/logic:equal

That works fine as long as the errors are coming through with the
GLOBAL_ERROR key. The special error with its special key doesn't get
displayed, and gets displayed where we want it instead. However, we're
now discovering that we're not getting other errors, specifically the
errors thrown by the Validator. I'm guessing that these are not being
sent with the GLOBAL_ERROR key but some other key, though my Googling
and other research hasn't yet told me which one.

I'd be curious to know what key the validator errors are sent with, but
more importantly, I need to figure out how to display some keys but not
others in my main error display. My best choice would be to do something
like display any errors with properties that are NOT ... At the
moment, there is just one property which we need to exclude, but that
could possibly grow down the road.

Does anyone have any ideas? Thank you!

Chris Loschen


___
Siebel
IT'S ALL ABOUT THE CUSTOMER
Visit www.siebel.com

This e-mail message is for the sole use of the intended recipient(s) and 
contains confidential and/or privileged information belonging to Siebel 
Systems, Inc. or its customers or partners. Any unauthorized review, use, 
copying, disclosure or distribution of this message is strictly prohibited. If 
you are not an intended recipient of this message, please contact the sender by 
reply e-mail and destroy all soft and hard copies of the message and any 
attachments. Thank you for your cooperation.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Converting Enums

2005-08-13 Thread Niall McLoughlin
I hope this is the right place to ask this question.
 
 Let's say I have the following class (using jdk 1.5):
 
 public enum UserType {
 MANAGER,
 SUPERVISOR,
 USER;
 }

 I can build a List of these types to display in an options tag easily enough:
 
 public ListValueLabelPair getUserTypes()
 throws Exception {
 ListValueLabelPair items = new ArrayList ValueLabelPair();
 for( UserType userType : UserType.values()) {
 items.add(new ValueLabelPair( String.valueOf(
userType.ordinal(), userType.name() ) ));
 }
 return items;
 }
 
 This works well, but what happens when I need to 'internationalize'
my app for other languages or want to display another 'name' instead
of the enum name without messing with my model? What would be the best
way to convert those display names if I stored the labels in a
MessageResources file?
 
Thanks very much.

-- 
Niall McLoughlin
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] Reasonable implementation time guesstimates

2005-08-13 Thread Dave Newton

Heya,

This is Struts-related because I'm using Struts, other than that it's 
more of a project management thing. I am not a project manager; I pretty 
much suck at anything smelling even slightly of management, and I hate 
most everything about project management.


That said, I'm trying to figure out if the guesstimate I made originally 
for a current project is even in an appropriate ballpark. So with my 
sketchy outline below, if anybody wants to tell me what they think it 
should have taken me to implement this I'd be grateful :)


-- Basic unit is an Event.
-- Events have exhibitors and managers. (There is also an admin role; 
actions have role-based access perms.)
-- Exhibitors can post announcements of event-specific announcement 
types for event-specific product categories.
-- Announcements may have enhancements: individually-priced add-ons 
like a web link, email, PDF upload, etc. The rendering of the 
enhancements is event-specific (via a template in the DB and a property 
set specific to that enhancement type).
-- Posting an announcement consists of entry, confirmation, cart 
display, checkout, and thank you pages.
-- Managers may also post announcements that do not go through the 
cart/checkout process.
-- Managers must approve or reject announcements; rejected announcements 
send an email to the poster and aren't included in announcement compilation.
-- Rejected announcements are editable/re-submittable via a link in the 
email and get put back in the announcement approval bin.
-- Admin users compile event announcements (sorted by announcement 
type then product category) and get an HTML chunk back that they paste 
into their own marketing email system.
-- Paid/approved event announcements are viewable in an event's 
announcement archive.
-- Event archive is sorted by product category (pick a product category, 
see announcements for that prodcat; only prodcats with announcements are 
presented)
-- Each event has a vanity url; system entry is via 
http://blahblah.com/${urltag}/${subsystem} where ${subsytem} is 
something like 'manager', 'exhibitor', 'archive', 'admin', etc.
-- CRUD exists for the obvious things: events, event announcement types 
and product categories, event managers, etc.

-- announcement types have individual prices
-- exhibitors may be supplied with $ credits for purchasing, updatable 
by admins by either adding to existing $ or by replacing

-- exhibitor file upload (CSV of exhibitors for a given event)

I think that's the bulk of it.

I'm _REALLY_ curious as to what people think the amount of effort for 
something like this is--any input would be great!


TIA,
Dave



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



weird message problem

2005-08-13 Thread Werner Punz
Hi I am trying to add a simple error handler to a form with a message 
upon an error condition, so far it works, some kind of message arrives

but I get a weird error, here are the relevant code snippets:


the part where the error is added:
ActionMessages errors = new ActionMessages();
errors.add(message, new ActionMessage(type mismatch 
failure+detail));


super.saveMessages(request,errors);
ActionForward returnActionForward = 
mapping.findForward(failure);
return returnActionForward;

now the form code is like following:

html:messages id=message message=true 
xxx
libean:write name=message //li
 /html:messages


and the failure forward set like following (and also triggered)
		action attribute=data name=AssetDetailForm 
path=/assetDetailSubmit scope=request


type=com.sonydadc.claudio.struts.asset.actions.AssetDetailAction
			forward name=success 	 
path=/WEB-INF/jsps/core/asset/Simpleone.jsp /
			forward name=pubreqsuccess 
path=/WEB-INF/jsps/core/asset/PubRequestSuccess.jsp /


			forward name=failure  	 
path=/WEB-INF/jsps/core/asset/AssetDetailMain.jsp /

/action


the funny thing is the code is triggered because if I remove the bean
write the xxx is called





but now I get following error:

Servlet.service() for servlet action threw exception 
javax.servlet.jsp.JspException: Cannot find bean message in any 
scopejavax.servlet.jsp.JspException: Cannot find bean message in any scope

at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:992)
at org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:227)
	at 
org.apache.jsp.WEB_002dINF.jsps.core.asset.AssetDetailMain_jsp._jspx_meth_bean_write_0(org.apache.jsp.WEB_002dINF.jsps.core.asset.AssetDetailMain_jsp:642)
	at 
org.apache.jsp.WEB_002dINF.jsps.core.asset.AssetDetailMain_jsp._jspService(org.apache.jsp.WEB_002dINF.jsps.core.asset.AssetDetailMain_jsp:255)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



which means basically it has the message but the message bean itself is 
not reachable thus the entire messaging system fails.


Does anyone know why this happens?

Werner


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Displaying errors for all except one key

2005-08-13 Thread Chris Loschen
My Google research leads me to believe that I'm using old, deprecated
constants here. I've known for a while that the app will eventually need
to replace ActionError with ActionMessage and so on, but haven't had the
time to work on it. Is that what validator is doing and perhaps that's
why I'm seeing the other errors but not the validator errors? Is there a
way to make this work short of refactoring the entire application?

Any help would be greatly appreciated. Thanks!

Chris

-Original Message-
From: Chris Loschen 
Sent: Saturday, August 13, 2005 3:08 PM
To: Struts Users Mailing List
Subject: Displaying errors for all except one key

Hi all,

The app I'm working on (using Struts 1.1) has handled errors pretty
simply: they all used to display in one place. However, now we want to
display some errors separately. We've already set up the errors we want
to display separately with their own key, like this:

errors.add(RIGHT_PANE_THRESHOLD_PROPERTY, new
ActionError(RIHierarchyMessages.RIGHT_PANE_THRESHOLD_EXCEEDED));

And then we set up the main error display JSP like this:

%-- Display Error Messages if the showErrors parameter is true --%
logic:equal name=showErrors value=true
%String global_key=ActionErrors.GLOBAL_ERROR; %
logic:messagesPresent message=false
property=%=global_key%
div class=errorMsgul
html:messages id=message message=false
property=%=global_key% 
libean:write name=message//li
/html:messages
/ul/div
/logic:messagesPresent
/logic:equal

That works fine as long as the errors are coming through with the
GLOBAL_ERROR key. The special error with its special key doesn't get
displayed, and gets displayed where we want it instead. However, we're
now discovering that we're not getting other errors, specifically the
errors thrown by the Validator. I'm guessing that these are not being
sent with the GLOBAL_ERROR key but some other key, though my Googling
and other research hasn't yet told me which one.

I'd be curious to know what key the validator errors are sent with, but
more importantly, I need to figure out how to display some keys but not
others in my main error display. My best choice would be to do something
like display any errors with properties that are NOT ... At the
moment, there is just one property which we need to exclude, but that
could possibly grow down the road.

Does anyone have any ideas? Thank you!

Chris Loschen


___
Siebel
IT'S ALL ABOUT THE CUSTOMER
Visit www.siebel.com

This e-mail message is for the sole use of the intended recipient(s) and
contains confidential and/or privileged information belonging to Siebel
Systems, Inc. or its customers or partners. Any unauthorized review,
use, copying, disclosure or distribution of this message is strictly
prohibited. If you are not an intended recipient of this message, please
contact the sender by reply e-mail and destroy all soft and hard copies
of the message and any attachments. Thank you for your cooperation.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: actionForm class

2005-08-13 Thread Nafise Dianatizade
at the whole you need a DTO(Data Transfer Object) for transferring the student 
fetched data to the jsp page. So you could specify an object for this purpose 
or use your predefine actionForm object.
 
you could use bean:write for both specified DTO and ActionForm object to 
display the information on the page. but if you are using ActionForm object, 
there's another option using form tag and the inner tags such as html:text to 
display its properties.
 
Nafise
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Configure URL

2005-08-13 Thread Nafise Dianatizade
 http://localhost:8080/yourLoginActionName.do

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

RE: Struts SSL (SSLEXT)

2005-08-13 Thread Albrecht Leiprecht
I will answer myself to have answers in the mailing list archive for the
ones to come after me ;)

do I understand that correct, that in order to use SSLEXT, I have to use a
specialized Version of RequestProcessor? 

Yes, as this RequestProcesser checks in processPreprocess if the current
request is a secure actionmapping ;)

What if I use Tiles? Or worse, what if I extended 
TilesRequestProcessor (processRoles)? 

Simply extend SecureTilesRequestProcessor instead

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]