Re: Tags creating Tags

2003-10-26 Thread Mark Mahieu
I said,

> Hi Lukas,
>
> If I understand you correctly ...
But I didn't (understand that is).  I guess my reading comprehension 
skills at 6am just aren't up to it ;)

So just disregard my last 

Mark

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


Dynamic Layouts in Tiles

2003-10-26 Thread [EMAIL PROTECTED]
Is there any reason why I cannot use the names in tiles definitions in 
tiles-def.xml as the reference in forwards inside Action subclasses?

Can I just use  "return (new ActionForward([NAME OF TILES DEFINITION]));" 
rather than, e.g., " return (new ActionForward(mapping.getInput()));"?

Thanks,

Micael



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


Help on ---------> comons apache XML Digester along with weblogic

2003-10-26 Thread Makarand . Sonawane
Hi All,

  I am reposting the same question, can any one help me out on this...

  I am using commons-digester1.5 , I am digesting a xml file using xml
rules. When I run the Parsing in a stand alone mode it works fine. But when
the same parser is used along with Weblogic I am getting following error


org.apache.commons.digester.xmlrules.XmlLoadException: Error at (3, 142:
null
at
org.apache.commons.digester.xmlrules.FromXmlRuleSet.addRuleInstances(
FromXmlRuleSet.java:151)
at
org.apache.commons.digester.Digester.addRuleSet(Digester.java:1663)
at
org.apache.commons.digester.xmlrules.DigesterLoader.createDigester(Di
gesterLoader.java:91)
at
com.marsh.cansys.accounting.utility.lockbox.bankfileparser.utility.Ru
leReader.digestRuleXML(RuleReader.java:66)
at
com.marsh.cansys.accounting.utility.lockbox.bankfileparser.utility.Ru
leReader.(RuleReader.java:36)
at
com.marsh.cansys.accounting.domain.helper.LockboxDataTransmissionFile
Loader.load(LockboxDataTransmissionFileLoader.java:134)
at
com.marsh.cansys.accounting.controller.impl.ProcessLockboxImpl.loadDa
taTransmissionFile(ProcessLockboxImpl.java:116)
at
com.marsh.cansys.accounting.controller.ejb.ProcessLockboxEJB_cmomav_E
OImpl.loadDataTransmissionFile(ProcessLockboxEJB_cmomav_EOImpl.java:405)
at
com.marsh.cansys.accounting.controller.proxy.ProcessLockboxProxy.load
DataTransmissionFile(ProcessLockboxProxy.java:88)
at
com.marsh.cansys.accounting.web.controller.lockbox.LoadTransmissionFi
leAction.loadFile(LoadTransmissionFileAction.java:129)
at
com.marsh.cansys.accounting.web.controller.lockbox.LoadTransmissionFi
leAction.handlePerform(LoadTransmissionFileAction.java:52)
at
com.marsh.cansys.accounting.web.controller.lockbox.AbstractBaseAction
.perform(AbstractBaseAction.java:65)
at
org.apache.struts.action.ActionServlet.processActionPerform(ActionSer
vlet.java:1787)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:158
6)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:265)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:200)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:2546)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm

=
The Source code is

strRuleFileName = "LockBoxRules.xml";
strMsgTypeFileName ="lockbox.xml";

//Read URL String from config.
URL ruleURL = RuleReader.class
.getClassLoader().getResource(strRuleFileName);
Digester digester = DigesterLoader.createDigester(ruleURL);

inputStream = RuleReader.class
.getClassLoader().getResourceAsStream(strMsgTypeFileName);
boxSummaryRuleDVO = (LockBoxSummaryRuleDVO)digester.parse(inputStream);

===

I have also attached the XML file and the XML rule file used to digest the
XML



When digged more into the Digester class, I could find out exception thrown
from the  parse(Reader reader) method. The exception is
NullpointerException( SAXParserException) because of
com.sun.jdi.ClassNotPreparedException occurred while performing method
lookup for selector "toString" with signature "()Ljava/lang/String;"












Regards,
Makarand Sonawane
Insurance SBU
L&T Infotech Limited
Tel - 91-20-5511262 Ext 547
(See attached file: LockBoxRules.xml)(See attached file: lockbox.xml)





























This email may contain confidential or privileged information for the
intended recipient(s). If you are not the intended recipient, please do not
use or disseminate the information, notify the sender and delete it from
your system. Thanks

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

Re: Tags creating Tags

2003-10-26 Thread Mark Mahieu
Hi Lukas,

If I understand you correctly you need to look into the pushBody and 
popBody methods on PageContext.  Basically, in doStartTag(), call 
pageContext.pushBody() then in doEndTag() you call 
pageContext.popBody(), retrieve the BodyContent's value, muck about with 
it to your heart's content, then output your transformed markup to the 
current JspWriter.

Something like that anyway.  This is off the top of my head so I may be 
remembering the semantics slightly wrong, but I've definitely done this 
before

class MyTag extends BodyTagSupport {

   public int doStartTag() {

   pageContext.pushBody();

   return EVAL_BODY_INCLUDE;
   }
   public int doEndTag() {

   pageContext.popBody();
   String transformedMarkup =
   doSomeTransformations(getBodyContent().getString());
   pageContext.getOut().print(transformedMarkup);
   return EVAL_PAGE;
   }
}

Hope that helps,

Mark



Lukas Bradley wrote:

Hi all,

Maybe I'm just tired, but the answer to this is not to be found.  I could me
making this harder than it is, or something might be right in front of me,
and I don't see it.
What I want is a custom tag that creates other custom tags.  Here is a
simple example:


Should produce something like this:


 English
 
  

Which should then evaluate to:


 English
 
  

I've thought about trying to extend BodyTagSupport, return
EVAL_BODY_BUFFERED in doStartTag(), modify the bodyContent in doAfterBody(),
then return EVAL_PAGE() in doEndTag().  However, BodyContent has a protected
constructor, and no way to set its content.
I want to maintain the functionality gained from Struts-like custom tags,
while extracting the creation of them in a super-duper momma tag.  Any help?
Lukas



-
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]


Index properties (once again)

2003-10-26 Thread Rajat Pandit
Hello sorry for posting the same question again and again. But I seem to
have gained something on this. Now I have a few (more) questions. Maybe
someone could help me figure out what or where I am getting it wrong. 


This is the case. I have a product, with different states(checbox) and
each state has to have a bidAmount (text area) and a transaction
type(radio button). I want the form to be generated such that for
validation.

a. I can check If the checkbox(for the state) has been checked the
bidAmount and transaction type has been selected.

Now my question is, 
a. in the action form. Do I need to defind the bidAmount as an array 
b. I didn't know about this until know, but are only String type allowed
in actionform ( ihavent read about this anywhere except on one of the
posts in this mailing list)
c. I have set the setter and getter for (lets take the example of
bidAmount only) like this.

public String getBidAmount(int index) {
String tmp = new String();
System.err.println("Value of index: " + index);
try {
tmp = bidAmount[index];
} catch (Exception e) {
System.err.println("Error: " + e.getMessage());
}
return tmp;

}

public void setBidAmount(int index, String value) {
System.err.println("index: " + index);
System.err.println("Value: " + value);
System.err.println("--");
this.bidAmount[index] = value;
}



And the corresponding jsp tags as follows.




  


 
  
  

  

  
BC 
| SC 
  

  

  
  

   






I know the the inline scriptlet is very ugly, but this was the only way
I could get it to call the index number in the getter method. However
the desperate attempt (try and catch) makes the form work (not much use)
I cant get the the setter to set the values in the individual array, and
get a stack trace error instead.

I am not really sure where Is wrong and non or the documentataion define
things very clearly (or maybe I am poor in comprehension)
Apologies again to people who think I am bothering them by posting again
and again, but this is my last hope!!

Hope someone helps!
(ps: once I am through with this, I shall write my own HOW TO for the
indexed properties and its use)

Rajat Pandit | [EMAIL PROTECTED]
+91 612 3117606
[ Developer and Part Time Human Being]


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



Re: Tags creating Tags

2003-10-26 Thread Craig R. McClanahan
Lukas Bradley wrote:

Ruth, Craig, and lurkers,

I think what I'm after boils down to a method like this:

public String renderTag(PageContext pPageContext, Tag pTagToRender) throws
JspException
 

A look at the JSP Specification will tell you that this would not work 
at all for a classic tag handler (i.e. implements Tag or implements 
BodyTag).

After creating the tag manually, you could pass it to this method, and have
it rendered.  The return value of a String should be the final output of the
Tag.  The method would check for BodyTag, IterationTag, etc support, and
react to it.  This way, the user could embed custom tags (Struts or
otherwise) within their own custom tags.
I'm surprised a method like this doesn't already exist.  This wouldn't be
recursive, nor would it recompile on each shot.  You may be right in calling
this a tad "hackish," but it would be useful, no?  I can even think of
another method that would be the incredi-hack:
public String renderTag(PageContext pPageContext, Tag pTagToRender) throws
JspException
Where you pass in "" instead of the Tag object itself.
Now that would be aggressive.
For another approach, the JspFragment interface looks promising.  However,
I'm stuck with Tomcat 4.1 for now, so JSP 2.0 is out.
 

I think the approach you suggest is problematic, for many of the reasons 
that Action chaining is problematic.  The most serious issue is that 
you're trying to use a JSP artifact (a custom tag implementation class) 
for something it was never designed to do (be a reusable "output 
generator" outside the context of the very strict and complex lifecycle 
for tag instances described in the JSP specfiication).  "Hackish" does 
not begin to describe how much trouble this kind of anti-object-oriented 
approach will lead you to in the long run.

The right answer would be to create your own tag class that does exactly 
what you want.  If your tag wants to leverage functionality from 
existing tag classes (and you don't want to cut-n-paste), either make 
your class a subclass of the existing one (presuming the stuff you need 
is already abstracted into useful protected methods), or abstract the 
stuff you need into utility classes that can be shared between your tag 
and the standard ones, and then lobby to have the same factoring done in 
the standard classes.

This is the foundational basis on which all Struts tag classes are 
organized, and has proven to support a pretty rich library of tag class 
implementations that (in many cases) reuse or specialize protected 
methods in their subclasses.  In no case was a "generate a tag" type of 
hack considered, because it's not necessary.  All that's necessary is 
applying sound design practices for factoring reusable code into 
reusable chunks.  I won't try to claim that we've done a perfect job at 
the current factoring, but the existence of something like struts-el 
(which was basically built on top of the existing tags, without having 
to rip them apart) is pretty good evidence that we're on the right track.

Trying to interfere with the tag instance lifecycle that the JSP page 
compiler assumes pretty much guarantees you'll end up with disaster.

Lukas

 

Craig



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


Re: Tags creating Tags

2003-10-26 Thread Lukas Bradley
I apologize for the original cross-post.  I was hoping there might be a
Struts method to do what I wanted.

Here is something I wrote to the other group, after a post from Felipe Leme.

> I think you can accomplish what you're looking for using JSP 2.0 and tag
> files.

Yep.  That's exactly what I'm looking for.  Now Tomcat 5 just needs to be
released, because I'm stuck with JSP 1.2 for now.  *sniff*

Thanks for the help everyone.  I'm including a snippet from the JSP 2.0 PFD
3.

Lukas

JSP.8.1 Overview

As of JSP version 2.0, the JSP Compiler is required to recognize tag files.
A tag file is a source file that provides a way for a page author to
abstract a segment of JSP code and make it reusable via a custom action.

Tag files allow a JSP page author to create tag libraries using JSP syntax.
This means that page authors no longer need to know Java or ask someone who
knows Java to write a tag extension. Even for page authors or tag library
developers who know Java, writing tag files is more convenient when
developing tags that primarily output template text.







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



Re: Multiple parameters

2003-10-26 Thread Richard Yee
Rajat,
Perhaps I'm missing something here, but by definition, one of your radio 
buttons should be checked. If you display your form without having any of 
your radio buttons checked, then it amounts to a checkbox. If you 
initialize your form bean correctly, one will be checked and then, you 
shouldn't need to validate the radio button at all.

Regards,

Richard

At 10:30 PM 10/25/2003 -0700, you wrote:
Hello,
 I am still stuck with the multiple parameter problem. I shall try to
explain the problem again. Maybe someone could help.
I have a form, which has a number of records to be displayed.
A checkbox, a textbox, two radio buttons with the same name. I have the
following objective.
A. perform validation for the checkbox that is selected. I need to
ensure that textbox contains value greater that zero and either of the
radio buttons where selected
B. I need to iterate though the list of data. Ie for the checkbox that
was selected and then save the information in the database.
I have tried using 
Pls gimme some pointers or help :(((

Really really stuck!





Rajat Pandit | [EMAIL PROTECTED]
+91 612 3117606
[ Developer and Part Time Human Being]
-
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: Tags creating Tags

2003-10-26 Thread Ruth, Brice
I think you'll still end up with a severe performance penalty. If you 
generate JSP dynamically, that JSP will have to be "pre-compiled" each 
time you re-generate it.

[EMAIL PROTECTED] wrote:

Craig R.McClanahan wrote:
 

To accomplish what you are after, you would need another
layer of compilation.
You'll need to come up with a different approach to accomplish what you
are after.
   

I think this link ( an article by Jason Diamon at xml.com) presents an
example of what Craig calls "another layer of compilation"
http://www.xml.com/pub/a/2002/03/27/templatexslt.html
Suppose you define a template language for your own. By that language(a set
of XML elements/attributes name vocabularies), you mark-up the page source
codes with the "super-duper mamma tags" you define. Also you develop a
"MyLang-JSP transformer" by XSLT to produce JSP source codes. You can use
whatever JSP custom tags, including Struts', in the JSP generated by your
preprocessor. In fact I used this method for my application, which proved
good enough.
Kazuaki





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

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


Re: Tags creating Tags

2003-10-26 Thread matsuhashi

Craig R.McClanahan wrote:
>To accomplish what you are after, you would need another
>layer of compilation.
>You'll need to come up with a different approach to accomplish what you
>are after.

I think this link ( an article by Jason Diamon at xml.com) presents an
example of what Craig calls "another layer of compilation"
 http://www.xml.com/pub/a/2002/03/27/templatexslt.html

Suppose you define a template language for your own. By that language(a set
of XML elements/attributes name vocabularies), you mark-up the page source
codes with the "super-duper mamma tags" you define. Also you develop a
"MyLang-JSP transformer" by XSLT to produce JSP source codes. You can use
whatever JSP custom tags, including Struts', in the JSP generated by your
preprocessor. In fact I used this method for my application, which proved
good enough.

 Kazuaki





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



Re: Tags creating Tags

2003-10-26 Thread Lukas Bradley
> One way of accomplishing what you want to do, I think, is simply making
> calls to the appropriate Struts classes that are called when 
> is parsed & compiled. Instead of outputting an  - just call
> those methods with the arguments that you would write out as 
> attributes, and you should get pretty close to what you're trying to
> achieve (without the performance hit ;)

That's EXACTLY what I want to do.  However, I don't want to have to write
all the calls to doStartTag(), then determine what action should be taken
from the return int, etc etc etc.

I was hoping that grunt work was already done for me, or existed within the
Jasper packages.

Lukas




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



Re: Tags creating Tags

2003-10-26 Thread Lukas Bradley
Ruth, Craig, and lurkers,

I think what I'm after boils down to a method like this:

public String renderTag(PageContext pPageContext, Tag pTagToRender) throws
JspException

After creating the tag manually, you could pass it to this method, and have
it rendered.  The return value of a String should be the final output of the
Tag.  The method would check for BodyTag, IterationTag, etc support, and
react to it.  This way, the user could embed custom tags (Struts or
otherwise) within their own custom tags.

I'm surprised a method like this doesn't already exist.  This wouldn't be
recursive, nor would it recompile on each shot.  You may be right in calling
this a tad "hackish," but it would be useful, no?  I can even think of
another method that would be the incredi-hack:

public String renderTag(PageContext pPageContext, Tag pTagToRender) throws
JspException

Where you pass in "" instead of the Tag object itself.
Now that would be aggressive.

For another approach, the JspFragment interface looks promising.  However,
I'm stuck with Tomcat 4.1 for now, so JSP 2.0 is out.

Lukas




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



Re: Tags creating Tags

2003-10-26 Thread Ruth, Brice
One way of accomplishing what you want to do, I think, is simply making 
calls to the appropriate Struts classes that are called when  
is parsed & compiled. Instead of outputting an  - just call 
those methods with the arguments that you would write out as  
attributes, and you should get pretty close to what you're trying to 
achieve (without the performance hit ;)

Brice

Craig R. McClanahan wrote:

Lukas Bradley wrote:

Hi all,

Maybe I'm just tired, but the answer to this is not to be found.  I 
could me
making this harder than it is, or something might be right in front 
of me,
and I don't see it.

What I want is a custom tag that creates other custom tags.  Here is a
simple example:


Should produce something like this:


 English
 
  


Which should then evaluate to:


 English
 
  

I've thought about trying to extend BodyTagSupport, return
EVAL_BODY_BUFFERED in doStartTag(), modify the bodyContent in 
doAfterBody(),
then return EVAL_PAGE() in doEndTag().  However, BodyContent has a 
protected
constructor, and no way to set its content.

I want to maintain the functionality gained from Struts-like custom 
tags,
while extracting the creation of them in a super-duper momma tag.  
Any help?

 

It's not much help, except in the sense that it will put your search 
for the answer out of it's misery :-).  What you are trying to do is 
not supported by JSP -- the reason is that custom tags are converted 
into appropriate method calls at page compile time.  After that, they 
are just executed.  To accomplish what you are after, you would need 
another layer of compilation.

You'll need to come up with a different approach to accomplish what 
you are after.

Lukas

 

Craig



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


Re: Tags creating Tags

2003-10-26 Thread Craig R. McClanahan
Lukas Bradley wrote:

Hi all,

Maybe I'm just tired, but the answer to this is not to be found.  I could me
making this harder than it is, or something might be right in front of me,
and I don't see it.
What I want is a custom tag that creates other custom tags.  Here is a
simple example:


Should produce something like this:


 English
 
  

Which should then evaluate to:


 English
 
  

I've thought about trying to extend BodyTagSupport, return
EVAL_BODY_BUFFERED in doStartTag(), modify the bodyContent in doAfterBody(),
then return EVAL_PAGE() in doEndTag().  However, BodyContent has a protected
constructor, and no way to set its content.
I want to maintain the functionality gained from Struts-like custom tags,
while extracting the creation of them in a super-duper momma tag.  Any help?
 

It's not much help, except in the sense that it will put your search for 
the answer out of it's misery :-).  What you are trying to do is not 
supported by JSP -- the reason is that custom tags are converted into 
appropriate method calls at page compile time.  After that, they are 
just executed.  To accomplish what you are after, you would need another 
layer of compilation.

You'll need to come up with a different approach to accomplish what you 
are after.

Lukas

 

Craig



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


Re: Indexed properties help!

2003-10-26 Thread Frederic Dernbach
Rajat,

Here is an example of an indexed property called 'signal' (in my
application it holds complex objects, not simple strings or integers):

public OrderedSignalBean getSignal(int index) {
while( index >= this.getSignals().size() ){
this.getSignals().add(new OrderedSignalBean());
}
return (OrderedSignalBean) this.getSignals().get(index);
}

public void setSignal(int index, OrderedSignalBean signal) {
while ( index >= signals.size() ){
signals.add(new OrderedSignalBean());
}
signals.set(index, signal);
}

The 'signals' member is private and is of type 'ArrayList'. It is
created in the form's contructor and the reset method of the form :
signals = new ArrayList().

The setter and getter methods of the indexed property perform so-clled
"lazy-initialization" so you do not have to worry about the siez of the
array list.

Hope this helps.

Fred 


Le dim 26/10/2003 Ã 16:54, Rajat Pandit a Ãcrit :
> Hello,
> I am pasting some excepts from the struts documentation. It would be
> really great if someone could help me clear this.
> 
> Question 1:
> 
>  The "indexed tags" feature is provided by several tags that have an
> optional boolean "indexed" attribute. This is only legal when inside a
> "" tag. When the "indexed" attribute is true, then the
> tag will incorporate the loop index into the resulting HTML component.
> 
> The several tags that support the "indexed" attribute can be broken into
> three groups, split by what they do to incorporate the loop index into
> the resulting HTML component.
> Group 1   Group 2 Group 3
> checkbox  button  link
> file  image
> hiddensubmit   
> password   
> radio  
> select 
> text   
> textarea   
> 
> In Group 1, all of these tags will generate an HTML "name" attribute of
> "name[nn].property". The value of each tag will also be initialized by
> the getter method corresponding to that property specification. 
> 
> 
> 
> So if I have name[nn].property, that essentially means I am creating an
> array of the form. But what I really need is an array of property,
> instead of the bean.
> 
> Question 2:
> 
> How should the property be declared in the the actionForm if it has to
> receive an array of information.
> 
> 
> thanks
> 
> 
> 
> 
> Rajat Pandit | [EMAIL PROTECTED]
> +91 612 3117606
> [ Developer and Part Time Human Being]
> 
> 
> -
> 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: How to do Confirmation page.

2003-10-26 Thread Geeta Ramani
Hi DN!  Seems like the specs just changed..;)  Please see inline
comments..

Dinh Nguyen wrote:

> Geeta,
>
> thanks for pointing out the issue, however, we take care of that in
> the validation form.  Either way if the user misses some fields,
> he/she'll be redirected back to the registration form asks them to
> fill-in the required fields.
> I am sorry I was confusing myself too:  Below is the instructions:
>
> 1) Fill-out the registration form
> 2) Click on Submit button on registration form
> 3) User is redirected to Confirmation page "Your information is
> submitted"

What is the purpose of this confirmation page?  Is this just a display of
what the user has just entered and asking the user if it is ok to submit
now? If the user is happy with the input, (s)he is supposed to click on a
"Done" button and if not, (s)he clicks on a "Cancel" button.  Is this
correct?  If so, forget about the Javascript, use ordinary Actions to
direct the user to the correct place. and you can just use the

> 4) On confirmation page, the user clicks "Done" button
> 5) Redirects to index.jsp

I assume the user is redirected to index.jsp only if there are no errors?
and you are using the form bean validate for checking input errors and so
on.  What do you mean to do if there are no input errors but for some
reason the registration is a failure (as in database is done etc.?)

>
>
> On the registration form (register.jsp) I code like this:
>
> 
> 
>  function confirmSubmit(){
>  if (confirm("are you sure you want to submit
> information?") {
>window.location.href ="  page="/register.do" />";
>   }
> } //end method confirmPrint
>  
>  
>
> 
> 
> 
>
> 
> .
> When I filled out (correctly) the form, click on submit button, then
> it took me directly to register.do page. 

This is wierd.  Seems like your onClick method isn't working correctly.
Have you looked at the source of the regisration page? Have you checked
for javascript errors? You could change you confirmSubmit() function so
that all it does is throw an alert so that you know that onClick is
working if you really want to dig into this.  On the other hand, if your
specs are such that (as I suspect) Javascript will not even be needed any
more, maybe you can do away with this whole code anyway..

>
> I guess that there is some logics behind this, but I don't know.
>
> Thanks,
> DN

Regards,
Geeta


RE: Multiple parameters

2003-10-26 Thread Rajat Pandit
I seriously have other issues right now! But I guess it does work. Tht's
how you get the validate function to check if you entered a float value
or not.

-Original Message-
From: Todor Sergueev Petkov [mailto:[EMAIL PROTECTED] 
Sent: Sunday, October 26, 2003 7:02 AM
To: Struts Users Mailing List
Subject: Re: Multiple parameters


Are you sure you can use float arrays in an ActionForm.
I think ActionForm beans accept only String values. It's up to you to do
conversion from/to Float.

Rajat Pandit wrote:
> Hello mark,
> This is my situtation
> 
> This is an extract from my action form
> 
> private float[] bidAmount;
> 
> public float[] getBidAmount() {
> return bidAmount;
> }
> 
> public void setBidAmount(float[] bidAmount) {
> this.bidAmount = bidAmount;
> }
> 
> 
> In my jsp I want this to store bidAmounts for different products and 
> hence an array implementation. This is what I wrote in my jsp.
> 
>  indexed="true"/>
> 
> I want it to print something like this for the multiple bidAmount 
>   name="bidAmount[1]" > 
> 
> 
> But instead thisis what iam getting.
>  name="org.apache.struts.taglib.html.BEAN[0].bidAmount" size="3" 
> value="" class="flat" />
> 
> I don't know if this is right or wrong(nor do I care right now!!!) but

> whichever way I need to know how to iterate the data and also in case 
> of an error, it should re populate the html:text with the data from 
> the array.
> 
> Somebody help!! :(((99
> 
> 
> -Original Message-
> From: Mark Lowe [mailto:[EMAIL PROTECTED]
> Sent: Sunday, October 26, 2003 4:47 AM
> To: Struts Users Mailing List
> Subject: Re: Multiple parameters
> 
> 
> Need to know what your validator.xml looks like and form-bean stuff in
> your struts-config.
> 
> Just sticking  and
> just because its displayed doesn't mean its working..
> 
> So give more detail have read the documents. Forget about databases 
> for
> now and just think about getting your form properties into your
action.
> 
> is the form property an indexed property? How are they defined
> (actionForm or dynaactionform?)
> 
> 
> 
> On Sunday, October 26, 2003, at 05:30 AM, Rajat Pandit wrote:
> 
> 
>>Hello,
>> I am still stuck with the multiple parameter problem. I shall try to
>>explain the problem again. Maybe someone could help. I have a form, 
>>which has a number of records to be displayed. A checkbox, a textbox, 
>>two radio buttons with the same name. I have the following objective.
>>
>>A. perform validation for the checkbox that is selected. I need to
>>ensure that textbox contains value greater that zero and either of the
> 
> 
>>radio buttons where selected B. I need to iterate though the list of
>>data. Ie for the checkbox that was selected and then save the 
>>information in the database.
>>
>>I have tried using >I still cant figure out how to iterate though it as I will need to do
>>that
>>in the validate() and execute() method.
>>
>>Pls gimme some pointers or help :(((
>>
>>Really really stuck!
>>
>>
>>
>>
>>
>>Rajat Pandit | [EMAIL PROTECTED]
>>+91 612 3117606
>>[ Developer and Part Time Human Being]
>>
>>
>>-
>>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]
> 
> 
> -
> 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]


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



Indexed properties help!

2003-10-26 Thread Rajat Pandit
Hello,
I am pasting some excepts from the struts documentation. It would be
really great if someone could help me clear this.

Question 1:

 The "indexed tags" feature is provided by several tags that have an
optional boolean "indexed" attribute. This is only legal when inside a
"" tag. When the "indexed" attribute is true, then the
tag will incorporate the loop index into the resulting HTML component.

The several tags that support the "indexed" attribute can be broken into
three groups, split by what they do to incorporate the loop index into
the resulting HTML component.
Group 1 Group 2 Group 3
checkboxbutton  link
fileimage
hidden  submit   
password 
radio
select   
text 
textarea 

In Group 1, all of these tags will generate an HTML "name" attribute of
"name[nn].property". The value of each tag will also be initialized by
the getter method corresponding to that property specification. 



So if I have name[nn].property, that essentially means I am creating an
array of the form. But what I really need is an array of property,
instead of the bean.

Question 2:

How should the property be declared in the the actionForm if it has to
receive an array of information.


thanks




Rajat Pandit | [EMAIL PROTECTED]
+91 612 3117606
[ Developer and Part Time Human Being]


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



Re: Multiple parameters

2003-10-26 Thread Mark Lowe
Its certainly the case with dynaforms, that life is easier just to have 
everything as strings including any nested beans..




I'd stick to strings, and perhaps organise things so you have a bid 
object that you nest in your form.

this would result you being less confused.




By your question I guess that your bid object class is part of you 
object model (stuff from db in this case)

If you using 1.1 here's how i'd be thinking about the problem..



[if you know how big you array is going to be define here, else just 
scope the form to session.



..
a bid bean
..
public class BidBean {
private String amount;

public String getAmount() {
return amount;
}
public void setAmount(String str) {
this.amount = str;
}
}
..
ArrayList bidList = new ArrayList();
bidList.add(new BidBean());
theForm.set("bid",bidList);

request.setAttribute("bid",bidList.toArray());

..




..
Assuming you've an existing om and thats why you seem a little concrete 
in your thinking, here's where to think about bringing stuff together.
..

DynaActionForm theForm = (DynaActionForm) form;

ArrayList bidList = (ArrayList) theForm.get("bid");

for(int i = 0;i < bidList.szie();i++) {
BidBean bid = (BidBean) bidList.get(i);

.. now copy the properties to your model classes. You'll need to change 
strings to floats etc. and set the values accordingly

}

..

when your action servlets get kinda long, you start moving this sort of 
thing out to your model layer.

Cheers Mark

On Sunday, October 26, 2003, at 03:01 PM, Todor Sergueev Petkov wrote:

Are you sure you can use float arrays in an ActionForm.
I think ActionForm beans accept only String values. It's up to you
to do conversion from/to Float.
Rajat Pandit wrote:
Hello mark,
This is my situtation This is an extract from my action form
private float[] bidAmount;
public float[] getBidAmount() {
return bidAmount;
}
public void setBidAmount(float[] bidAmount) {
this.bidAmount = bidAmount;
}
In my jsp I want this to store bidAmounts for different products and
hence an array implementation.
This is what I wrote in my jsp.

indexed="true"/>
I want it to print something like this for the multiple bidAmount



But instead thisis what iam getting.

name="org.apache.struts.taglib.html.BEAN[0].bidAmount" size="3" 
value=""
class="flat" />
I don't know if this is right or wrong(nor do I care right now!!!) but
whichever way I need to know how to iterate the data and also in case 
of
an error, it should re populate the html:text with the data from the
array.
Somebody help!! :(((99
-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Sunday, October 
26, 2003 4:47 AM
To: Struts Users Mailing List
Subject: Re: Multiple parameters
Need to know what your validator.xml looks like and form-bean stuff 
in your struts-config.
Just sticking 
So give more detail have read the documents. Forget about databases 
for now and just think about getting your form properties into your 
action.
is the form property an indexed property? How are they defined 
(actionForm or dynaactionform?)
On Sunday, October 26, 2003, at 05:30 AM, Rajat Pandit wrote:
Hello,
I am still stuck with the multiple parameter problem. I shall try to 
explain the problem again. Maybe someone could help. I have a form, 
which has a number of records to be displayed. A checkbox, a 
textbox, two radio buttons with the same name. I have the following 
objective.

A. perform validation for the checkbox that is selected. I need to 
ensure that textbox contains value greater that zero and either of 
the
radio buttons where selected B. I need to iterate though the list of 
data. Ie for the checkbox that was selected and then save the 
information in the database.

I have tried using 
I
still cant figure out how to iterate though it as I will need to do 
that
in the validate() and execute() method.

Pls gimme some pointers or help :(((

Really really stuck!





Rajat Pandit | [EMAIL PROTECTED]
+91 612 3117606
[ Developer and Part Time Human Being]
-
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]
-
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]


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


RE: Indexed properties help!

2003-10-26 Thread Frederic Dernbach
Looks OK.

However, I would not use a basic array  (private members) but ArrayList,
HashMap or LinkedList, etc.

I did not manage to have arrays working (the lazy initialization
failed).

You will have problems in JSPs.


Le dim 26/10/2003 Ã 18:04, Rajat Pandit a Ãcrit :
> Hello fred,
> Thanks for the  reply, so just for clarifiation, if I am using a
> property which will be "indexed" then the getters and setters will be a
> little different from the usual set and get
> Ie
> 
> public String getBidAmount(int index) {
>   return bidAmount[index];
> }
> 
> And 
> public  void setBidAmount(int index, String val) {
>   bidAmount[index] = val;
> }
> 
> And have to implement the bidAmoutn as an array?
> Protected String[] bidAmount;
> 
> Do confirm if igot that right?
> Thanks once again for ur time.
> 
> 
> -Original Message-
> From: Frederic Dernbach [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, October 26, 2003 8:23 AM
> To: Struts Users Mailing List
> Subject: Re: Indexed properties help!
> 
> 
> Rajat,
> 
> Here is an example of an indexed property called 'signal' (in my
> application it holds complex objects, not simple strings or integers):
> 
>   public OrderedSignalBean getSignal(int index) {
>   while( index >= this.getSignals().size() ){
>   this.getSignals().add(new OrderedSignalBean());
>   }
>   return (OrderedSignalBean) this.getSignals().get(index);
>   }
> 
>   public void setSignal(int index, OrderedSignalBean signal) {
>   while ( index >= signals.size() ){
>   signals.add(new OrderedSignalBean());
>   }
>   signals.set(index, signal);
>   }
> 
> The 'signals' member is private and is of type 'ArrayList'. It is
> created in the form's contructor and the reset method of the form :
> signals = new ArrayList().
> 
> The setter and getter methods of the indexed property perform so-clled
> "lazy-initialization" so you do not have to worry about the siez of the
> array list.
> 
> Hope this helps.
> 
> Fred 
> 
> 
> Le dim 26/10/2003 Ã 16:54, Rajat Pandit a Ãcrit :
> > Hello,
> > I am pasting some excepts from the struts documentation. It would be 
> > really great if someone could help me clear this.
> > 
> > Question 1:
> > 
> >  The "indexed tags" feature is provided by several tags that have an 
> > optional boolean "indexed" attribute. This is only legal when inside a
> 
> > "" tag. When the "indexed" attribute is true, then the 
> > tag will incorporate the loop index into the resulting HTML component.
> > 
> > The several tags that support the "indexed" attribute can be broken 
> > into three groups, split by what they do to incorporate the loop index
> 
> > into the resulting HTML component.
> > Group 1 Group 2 Group 3
> > checkboxbutton  link
> > fileimage
> > hidden  submit   
> > password 
> > radio
> > select   
> > text 
> > textarea 
> > 
> > In Group 1, all of these tags will generate an HTML "name" attribute 
> > of "name[nn].property". The value of each tag will also be initialized
> 
> > by the getter method corresponding to that property specification. 
> > 
> > 
> > 
> > So if I have name[nn].property, that essentially means I am creating 
> > an array of the form. But what I really need is an array of property, 
> > instead of the bean.
> > 
> > Question 2:
> > 
> > How should the property be declared in the the actionForm if it has to
> 
> > receive an array of information.
> > 
> > 
> > thanks
> > 
> > 
> > 
> > 
> > Rajat Pandit | [EMAIL PROTECTED]
> > +91 612 3117606
> > [ Developer and Part Time Human Being]
> > 
> > 
> > -
> > 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]
> 
> 
> -
> 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]



Tags creating Tags

2003-10-26 Thread Lukas Bradley
Hi all,

Maybe I'm just tired, but the answer to this is not to be found.  I could me
making this harder than it is, or something might be right in front of me,
and I don't see it.

What I want is a custom tag that creates other custom tags.  Here is a
simple example:



Should produce something like this:


  English
  
   


Which should then evaluate to:


  English
  
   


I've thought about trying to extend BodyTagSupport, return
EVAL_BODY_BUFFERED in doStartTag(), modify the bodyContent in doAfterBody(),
then return EVAL_PAGE() in doEndTag().  However, BodyContent has a protected
constructor, and no way to set its content.

I want to maintain the functionality gained from Struts-like custom tags,
while extracting the creation of them in a super-duper momma tag.  Any help?

Lukas




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



Re: Tiles And Images

2003-10-26 Thread Ruth, Brice
Using the  tag is powerful, though, as it allows you to use 
relative (to page) references for links/images/etc. - if needed, and 
module relative references are still supported by , 
, and of course,  tags. 
That's how our application is structured - this way, when we put things 
in different directories, and each of those directories has its own 
images directory, so we can use the same tile or JSP in each of those 
directories and have them use relative image paths, when necessary 
(specific to the hierarchy they're in), and *also* use module relative 
paths by using the other Struts tags.

Makes code re-use in HTML a lot more attractive :)

Brice

Holman, Cal wrote:

Ruth>> I don't think so.  They were thinking of this option.  The HTML:BASE renders a  tag reference relative to the page request.  So if your template is in the app root then the effect is the same.  I use templates that are actually in different directories so in order to ensure all relative references are to the root I use the scriplet.  Not sure this is a best practice.  But I do not need to worry what jsp I am coding on - all references are relative to the root.  This simplifies the html and if I reorganize the site there are no links/img changes necessary.  It does make IDE rendering harder since they typically do best with relative urls and no base tag.

Cal 

http://www.calandva.com/Last update 08/01/03

-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED]
Sent: Saturday, October 25, 2003 18:59
To: Struts Users Mailing List
Subject: Re: Tiles And Images
Just an FYI (and correct me if I'm wrong), but just doing 
will pretty much do what all the stuff you have below there does - what
you have in there is the default behavior of the Struts-HTML base tag.
Holman, Cal wrote:

 

Try searching the archives this is a common issue.  The requests for images are based on where the template tiles is using is located - not the location of the jsp being inserted in the template.  One approach is to use the base tag - I do the following to ensure all images and links are rooted at the same level in the application - the root.  This is the simplest, but there are other suggestions as well.

This line is in the base template - or any template.

Images then are referenced from the root of the web app - this is from the footer jsp



My directory structure is

App
--> web (web stuff)
-->WEB-INF
Others like the WEB-INF capability to protect resources.

Cal

http://www.calandva.com/Last update 08/01/03

-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED]
Sent: Friday, October 24, 2003 14:42
To: [EMAIL PROTECTED]
Subject: Tiles And Images
I use tiles and stylesheet to display my web pages.  I
also try to insert some images in those pages.
The tiles work fine.  I have header, footer, navbar,
content, etc. displayed without problem.  But, I am
curious to know if anybody has had difficulties in
inserting images.  I have tried various ways and
cannot succeed.
__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Learn more about Paymentech's payment processing services at www.paymentech.com
THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are proprietary 
and confidential information intended only for the use of the recipient(s) named 
above.  If you are not the intended recipient, you may not print, distribute, or copy 
this message or any attachments.  If you have received this communication in error, 
please notify the sender by return e-mail and delete this message and any attachments 
from your computer.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


   

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 
Learn more about Paymentech's payment processing services at www.paymentech.com
THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above.  If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments.  If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer.

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

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


---

Re: Multiple parameters

2003-10-26 Thread Mark Lowe
my response was about indexed properties. and the next man was just 
suggesting you use strings rather than float.

fred's answer looks like it will work, in principle its along the same 
lines as mine, just he's not nesting a bean in the form bean. So its 
more along what you've got already.

there's been a few responses that put you on the right track.. even if 
they're not the exactly what you're looking for, they'll give you some 
insight..

i wouldn't worry about upsetting or hurting anyone, its just 
frustrating when you see a whole list of answers and you obviously 
haven't taken the time to read them. the docs are good as well.

Cheers Mark

On Sunday, October 26, 2003, at 05:04 PM, Rajat Pandit wrote:

Sorry mark, that wasn't addressed to you. I was more concenred about 
the
indexed properties, and not about the data type.  I am really sorry if 
I
conveyed the wrong message. Hope you will forgive me, I didn't mean to
hurt or upset anyone.

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Sunday, October 26, 2003 8:19 AM
To: Struts Users Mailing List
Subject: Re: Multiple parameters
Look man I know what its like being up against the wire, but you're
demanding that someone else bails you out the chaos. don't try and
build apps around validator you'll run into trouble.
If you took a proper look at the responses instead of wetting your
pants you might make some progress.
http://jakarta.apache.org/struts/

I agree, you have issues.. Bye..

On Sunday, October 26, 2003, at 03:56 PM, Rajat Pandit wrote:

I seriously have other issues right now! But I guess it does work.
Tht's
how you get the validate function to check if you entered a float
value
or not.

-Original Message-
From: Todor Sergueev Petkov [mailto:[EMAIL PROTECTED]
Sent: Sunday, October 26, 2003 7:02 AM
To: Struts Users Mailing List
Subject: Re: Multiple parameters
Are you sure you can use float arrays in an ActionForm.
I think ActionForm beans accept only String values. It's up to you to
do
conversion from/to Float.
Rajat Pandit wrote:
Hello mark,
This is my situtation
This is an extract from my action form

private float[] bidAmount;

public float[] getBidAmount() {
return bidAmount;
}
public void setBidAmount(float[] bidAmount) {
this.bidAmount = bidAmount;
}
In my jsp I want this to store bidAmounts for different products and
hence an array implementation. This is what I wrote in my jsp.

I want it to print something like this for the multiple bidAmount
  
But instead thisis what iam getting.

I don't know if this is right or wrong(nor do I care right now!!!)
but

whichever way I need to know how to iterate the data and also in case

of an error, it should re populate the html:text with the data from
the array.
Somebody help!! :(((99

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Sunday, October 26, 2003 4:47 AM
To: Struts Users Mailing List
Subject: Re: Multiple parameters
Need to know what your validator.xml looks like and form-bean stuff
in your struts-config.
Just sticking 
So give more detail have read the documents. Forget about databases
for now and just think about getting your form properties into your
action.
is the form property an indexed property? How are they defined
(actionForm or dynaactionform?)


On Sunday, October 26, 2003, at 05:30 AM, Rajat Pandit wrote:


Hello,
I am still stuck with the multiple parameter problem. I shall try to

explain the problem again. Maybe someone could help. I have a form,
which has a number of records to be displayed. A checkbox, a
textbox, two radio buttons with the same name. I have the following
objective.
A. perform validation for the checkbox that is selected. I need to
ensure that textbox contains value greater that zero and either of
the


radio buttons where selected B. I need to iterate though the list of

data. Ie for the checkbox that was selected and then save the
information in the database.
I have tried using 
I still cant figure out how to iterate though it as I will need to
do that in the validate() and execute() method.
Pls gimme some pointers or help :(((

Really really stuck!





Rajat Pandit | [EMAIL PROTECTED]
+91 612 3117606
[ Developer and Part Time Human Being]

-
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]
-
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: Multiple parameters

2003-10-26 Thread Rajat Pandit
Sorry mark, that wasn't addressed to you. I was more concenred about the
indexed properties, and not about the data type.  I am really sorry if I
conveyed the wrong message. Hope you will forgive me, I didn't mean to
hurt or upset anyone. 


-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED] 
Sent: Sunday, October 26, 2003 8:19 AM
To: Struts Users Mailing List
Subject: Re: Multiple parameters


Look man I know what its like being up against the wire, but you're 
demanding that someone else bails you out the chaos. don't try and 
build apps around validator you'll run into trouble.

If you took a proper look at the responses instead of wetting your 
pants you might make some progress.

http://jakarta.apache.org/struts/

I agree, you have issues.. Bye..

On Sunday, October 26, 2003, at 03:56 PM, Rajat Pandit wrote:

> I seriously have other issues right now! But I guess it does work.
> Tht's
> how you get the validate function to check if you entered a float
value
> or not.
>
> -Original Message-
> From: Todor Sergueev Petkov [mailto:[EMAIL PROTECTED]
> Sent: Sunday, October 26, 2003 7:02 AM
> To: Struts Users Mailing List
> Subject: Re: Multiple parameters
>
>
> Are you sure you can use float arrays in an ActionForm.
> I think ActionForm beans accept only String values. It's up to you to
> do
> conversion from/to Float.
>
> Rajat Pandit wrote:
>> Hello mark,
>> This is my situtation
>>
>> This is an extract from my action form
>>
>> private float[] bidAmount;
>>
>> public float[] getBidAmount() {
>> return bidAmount;
>> }
>>
>> public void setBidAmount(float[] bidAmount) {
>> this.bidAmount = bidAmount;
>> }
>>
>>
>> In my jsp I want this to store bidAmounts for different products and 
>> hence an array implementation. This is what I wrote in my jsp.
>>
>> > indexed="true"/>
>>
>> I want it to print something like this for the multiple bidAmount 
>>  > name="bidAmount[1]" > 
>>
>>
>> But instead thisis what iam getting.
>> > name="org.apache.struts.taglib.html.BEAN[0].bidAmount" size="3" 
>> value="" class="flat" />
>>
>> I don't know if this is right or wrong(nor do I care right now!!!) 
>> but
>
>> whichever way I need to know how to iterate the data and also in case

>> of an error, it should re populate the html:text with the data from 
>> the array.
>>
>> Somebody help!! :(((99
>>
>>
>> -Original Message-
>> From: Mark Lowe [mailto:[EMAIL PROTECTED]
>> Sent: Sunday, October 26, 2003 4:47 AM
>> To: Struts Users Mailing List
>> Subject: Re: Multiple parameters
>>
>>
>> Need to know what your validator.xml looks like and form-bean stuff 
>> in your struts-config.
>>
>> Just sticking > and just because its displayed doesn't mean its working..
>>
>> So give more detail have read the documents. Forget about databases 
>> for now and just think about getting your form properties into your
> action.
>>
>> is the form property an indexed property? How are they defined 
>> (actionForm or dynaactionform?)
>>
>>
>>
>> On Sunday, October 26, 2003, at 05:30 AM, Rajat Pandit wrote:
>>
>>
>>> Hello,
>>> I am still stuck with the multiple parameter problem. I shall try to

>>> explain the problem again. Maybe someone could help. I have a form, 
>>> which has a number of records to be displayed. A checkbox, a 
>>> textbox, two radio buttons with the same name. I have the following 
>>> objective.
>>>
>>> A. perform validation for the checkbox that is selected. I need to 
>>> ensure that textbox contains value greater that zero and either of 
>>> the
>>
>>
>>> radio buttons where selected B. I need to iterate though the list of

>>> data. Ie for the checkbox that was selected and then save the 
>>> information in the database.
>>>
>>> I have tried using >> but
>
>>> I still cant figure out how to iterate though it as I will need to 
>>> do that in the validate() and execute() method.
>>>
>>> Pls gimme some pointers or help :(((
>>>
>>> Really really stuck!
>>>
>>>
>>>
>>>
>>>
>>> Rajat Pandit | [EMAIL PROTECTED]
>>> +91 612 3117606
>>> [ Developer and Part Time Human Being]
>>>
>>>
>>> 
>>> -
>>> 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]
>>
>>
>> -
>> 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]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail

RE: Indexed properties help!

2003-10-26 Thread Rajat Pandit
Hello fred,
Thanks for the  reply, so just for clarifiation, if I am using a
property which will be "indexed" then the getters and setters will be a
little different from the usual set and get
Ie

public String getBidAmount(int index) {
return bidAmount[index];
}

And 
public  void setBidAmount(int index, String val) {
bidAmount[index] = val;
}

And have to implement the bidAmoutn as an array?
Protected String[] bidAmount;

Do confirm if igot that right?
Thanks once again for ur time.


-Original Message-
From: Frederic Dernbach [mailto:[EMAIL PROTECTED] 
Sent: Sunday, October 26, 2003 8:23 AM
To: Struts Users Mailing List
Subject: Re: Indexed properties help!


Rajat,

Here is an example of an indexed property called 'signal' (in my
application it holds complex objects, not simple strings or integers):

public OrderedSignalBean getSignal(int index) {
while( index >= this.getSignals().size() ){
this.getSignals().add(new OrderedSignalBean());
}
return (OrderedSignalBean) this.getSignals().get(index);
}

public void setSignal(int index, OrderedSignalBean signal) {
while ( index >= signals.size() ){
signals.add(new OrderedSignalBean());
}
signals.set(index, signal);
}

The 'signals' member is private and is of type 'ArrayList'. It is
created in the form's contructor and the reset method of the form :
signals = new ArrayList().

The setter and getter methods of the indexed property perform so-clled
"lazy-initialization" so you do not have to worry about the siez of the
array list.

Hope this helps.

Fred 


Le dim 26/10/2003 à 16:54, Rajat Pandit a écrit :
> Hello,
> I am pasting some excepts from the struts documentation. It would be 
> really great if someone could help me clear this.
> 
> Question 1:
> 
>  The "indexed tags" feature is provided by several tags that have an 
> optional boolean "indexed" attribute. This is only legal when inside a

> "" tag. When the "indexed" attribute is true, then the 
> tag will incorporate the loop index into the resulting HTML component.
> 
> The several tags that support the "indexed" attribute can be broken 
> into three groups, split by what they do to incorporate the loop index

> into the resulting HTML component.
> Group 1   Group 2 Group 3
> checkbox  button  link
> file  image
> hiddensubmit   
> password   
> radio  
> select 
> text   
> textarea   
> 
> In Group 1, all of these tags will generate an HTML "name" attribute 
> of "name[nn].property". The value of each tag will also be initialized

> by the getter method corresponding to that property specification. 
> 
> 
> 
> So if I have name[nn].property, that essentially means I am creating 
> an array of the form. But what I really need is an array of property, 
> instead of the bean.
> 
> Question 2:
> 
> How should the property be declared in the the actionForm if it has to

> receive an array of information.
> 
> 
> thanks
> 
> 
> 
> 
> Rajat Pandit | [EMAIL PROTECTED]
> +91 612 3117606
> [ Developer and Part Time Human Being]
> 
> 
> -
> 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]


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



Re: Multiple parameters

2003-10-26 Thread Todor Sergueev Petkov
Are you sure you can use float arrays in an ActionForm.
I think ActionForm beans accept only String values. It's up to you
to do conversion from/to Float.
Rajat Pandit wrote:
Hello mark,
This is my situtation 

This is an extract from my action form

private float[] bidAmount;

public float[] getBidAmount() {
return bidAmount;
}
public void setBidAmount(float[] bidAmount) {
this.bidAmount = bidAmount;
}
In my jsp I want this to store bidAmounts for different products and
hence an array implementation.
This is what I wrote in my jsp.

I want it to print something like this for the multiple bidAmount



But instead thisis what iam getting.

I don't know if this is right or wrong(nor do I care right now!!!) but
whichever way I need to know how to iterate the data and also in case of
an error, it should re populate the html:text with the data from the
array.
Somebody help!! :(((99

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED] 
Sent: Sunday, October 26, 2003 4:47 AM
To: Struts Users Mailing List
Subject: Re: Multiple parameters

Need to know what your validator.xml looks like and form-bean stuff in 
your struts-config.

Just sticking 

So give more detail have read the documents. Forget about databases for 
now and just think about getting your form properties into your action.

is the form property an indexed property? How are they defined 
(actionForm or dynaactionform?)



On Sunday, October 26, 2003, at 05:30 AM, Rajat Pandit wrote:


Hello,
I am still stuck with the multiple parameter problem. I shall try to 
explain the problem again. Maybe someone could help. I have a form, 
which has a number of records to be displayed. A checkbox, a textbox, 
two radio buttons with the same name. I have the following objective.

A. perform validation for the checkbox that is selected. I need to 
ensure that textbox contains value greater that zero and either of the


radio buttons where selected B. I need to iterate though the list of 
data. Ie for the checkbox that was selected and then save the 
information in the database.

I have tried using 
I
still cant figure out how to iterate though it as I will need to do 
that
in the validate() and execute() method.

Pls gimme some pointers or help :(((

Really really stuck!





Rajat Pandit | [EMAIL PROTECTED]
+91 612 3117606
[ Developer and Part Time Human Being]
-
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]
-
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: Multiple parameters

2003-10-26 Thread Mark Lowe
Look man I know what its like being up against the wire, but you're 
demanding that someone else bails you out the chaos. don't try and 
build apps around validator you'll run into trouble.

If you took a proper look at the responses instead of wetting your 
pants you might make some progress.

http://jakarta.apache.org/struts/

I agree, you have issues.. Bye..

On Sunday, October 26, 2003, at 03:56 PM, Rajat Pandit wrote:

I seriously have other issues right now! But I guess it does work. 
Tht's
how you get the validate function to check if you entered a float value
or not.

-Original Message-
From: Todor Sergueev Petkov [mailto:[EMAIL PROTECTED]
Sent: Sunday, October 26, 2003 7:02 AM
To: Struts Users Mailing List
Subject: Re: Multiple parameters
Are you sure you can use float arrays in an ActionForm.
I think ActionForm beans accept only String values. It's up to you to 
do
conversion from/to Float.

Rajat Pandit wrote:
Hello mark,
This is my situtation
This is an extract from my action form

private float[] bidAmount;

public float[] getBidAmount() {
return bidAmount;
}
public void setBidAmount(float[] bidAmount) {
this.bidAmount = bidAmount;
}
In my jsp I want this to store bidAmounts for different products and
hence an array implementation. This is what I wrote in my jsp.

I want it to print something like this for the multiple bidAmount
  
But instead thisis what iam getting.

I don't know if this is right or wrong(nor do I care right now!!!) but

whichever way I need to know how to iterate the data and also in case
of an error, it should re populate the html:text with the data from
the array.
Somebody help!! :(((99

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Sunday, October 26, 2003 4:47 AM
To: Struts Users Mailing List
Subject: Re: Multiple parameters
Need to know what your validator.xml looks like and form-bean stuff in
your struts-config.
Just sticking 
So give more detail have read the documents. Forget about databases
for
now and just think about getting your form properties into your
action.
is the form property an indexed property? How are they defined
(actionForm or dynaactionform?)


On Sunday, October 26, 2003, at 05:30 AM, Rajat Pandit wrote:


Hello,
I am still stuck with the multiple parameter problem. I shall try to
explain the problem again. Maybe someone could help. I have a form,
which has a number of records to be displayed. A checkbox, a textbox,
two radio buttons with the same name. I have the following objective.
A. perform validation for the checkbox that is selected. I need to
ensure that textbox contains value greater that zero and either of 
the


radio buttons where selected B. I need to iterate though the list of
data. Ie for the checkbox that was selected and then save the
information in the database.
I have tried using 
I still cant figure out how to iterate though it as I will need to do
that
in the validate() and execute() method.
Pls gimme some pointers or help :(((

Really really stuck!





Rajat Pandit | [EMAIL PROTECTED]
+91 612 3117606
[ Developer and Part Time Human Being]
-
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]
-
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]
-
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: Multiple parameters

2003-10-26 Thread Rajat Pandit
Hello mark,
This is my situtation 

This is an extract from my action form

private float[] bidAmount;

public float[] getBidAmount() {
return bidAmount;
}

public void setBidAmount(float[] bidAmount) {
this.bidAmount = bidAmount;
}


In my jsp I want this to store bidAmounts for different products and
hence an array implementation.
This is what I wrote in my jsp.



I want it to print something like this for the multiple bidAmount





But instead thisis what iam getting.


I don't know if this is right or wrong(nor do I care right now!!!) but
whichever way I need to know how to iterate the data and also in case of
an error, it should re populate the html:text with the data from the
array.

Somebody help!! :(((99


-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED] 
Sent: Sunday, October 26, 2003 4:47 AM
To: Struts Users Mailing List
Subject: Re: Multiple parameters


Need to know what your validator.xml looks like and form-bean stuff in 
your struts-config.

Just sticking  Hello,
>  I am still stuck with the multiple parameter problem. I shall try to 
> explain the problem again. Maybe someone could help. I have a form, 
> which has a number of records to be displayed. A checkbox, a textbox, 
> two radio buttons with the same name. I have the following objective.
>
> A. perform validation for the checkbox that is selected. I need to 
> ensure that textbox contains value greater that zero and either of the

> radio buttons where selected B. I need to iterate though the list of 
> data. Ie for the checkbox that was selected and then save the 
> information in the database.
>
> I have tried using  I
> still cant figure out how to iterate though it as I will need to do 
> that
> in the validate() and execute() method.
>
> Pls gimme some pointers or help :(((
>
> Really really stuck!
>
>
>
>
>
> Rajat Pandit | [EMAIL PROTECTED]
> +91 612 3117606
> [ Developer and Part Time Human Being]
>
>
> -
> 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]


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



Re: How to validate is selected on a JSP page?

2003-10-26 Thread ZYD
I found this:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg79778.html

but it seem the problem is still not solved, right?

- Original Message - 
From: "Rajat Pandit" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Sunday, October 26, 2003 3:01 PM
Subject: RE: How to validate  is selected on a JSP page?


> Lets hope for someone to reply to this! :D 
> 
> -Original Message-
> From: ZYD [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, October 25, 2003 10:50 AM
> To: Struts Users Mailing List
> Subject: Re: How to validate  is selected on a JSP page?
> 
> 
> Yes,  that works. But that's not decent like you said.
> Is there really no way to do a client-side validation using validator
> framework?
> 
> - Original Message - 
> From: "Rajat Pandit" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Sunday, October 26, 2003 1:37 PM
> Subject: RE: How to validate  is selected on a JSP page?
> 
> 
> > I couldn't find a workaround for that so far. I use the validate() 
> > method of the actionform. Pretty lame! Eh!
> > 
> > -Original Message-
> > From: ZYD [mailto:[EMAIL PROTECTED]
> > Sent: Saturday, October 25, 2003 10:33 AM
> > To: Struts Users Mailing List
> > Subject: How to validate  is selected on a JSP page?
> > 
> > 
> > Hi friends,
> > 
> > How to make sure a radiobox is selected on a JSP page using validator?
> > 
> > I cannot use:
> > 
> >
> > 
> > 
> > Thanks
> > 
> > -bruce
> > 
> > 
> > -
> > 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: Tiles And Images

2003-10-26 Thread Holman, Cal
Ruth>> I don't think so.  They were thinking of this option.  The HTML:BASE renders a 
 tag reference relative to the page request.  So if your template is in the app 
root then the effect is the same.  I use templates that are actually in different 
directories so in order to ensure all relative references are to the root I use the 
scriplet.  Not sure this is a best practice.  But I do not need to worry what jsp I am 
coding on - all references are relative to the root.  This simplifies the html and if 
I reorganize the site there are no links/img changes necessary.  It does make IDE 
rendering harder since they typically do best with relative urls and no base tag.

Cal 

http://www.calandva.com/Last update 08/01/03


-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED]
Sent: Saturday, October 25, 2003 18:59
To: Struts Users Mailing List
Subject: Re: Tiles And Images

Just an FYI (and correct me if I'm wrong), but just doing 
will pretty much do what all the stuff you have below there does - what
you have in there is the default behavior of the Struts-HTML base tag.

Holman, Cal wrote:

>Try searching the archives this is a common issue.  The requests for images are based 
>on where the template tiles is using is located - not the location of the jsp being 
>inserted in the template.  One approach is to use the base tag - I do the following 
>to ensure all images and links are rooted at the same level in the application - the 
>root.  This is the simplest, but there are other suggestions as well.
>
>This line is in the base template - or any template.
>
>
>Images then are referenced from the root of the web app - this is from the footer jsp
>
>alt="struts"/>
>
>My directory structure is
>
>App
>--> web (web stuff)
>-->WEB-INF
>
>Others like the WEB-INF capability to protect resources.
>
>Cal
>
>http://www.calandva.com/Last update 08/01/03
>
>-Original Message-
>From: Caroline Jen [mailto:[EMAIL PROTECTED]
>Sent: Friday, October 24, 2003 14:42
>To: [EMAIL PROTECTED]
>Subject: Tiles And Images
>
>I use tiles and stylesheet to display my web pages.  I
>also try to insert some images in those pages.
>
>The tiles work fine.  I have header, footer, navbar,
>content, etc. displayed without problem.  But, I am
>curious to know if anybody has had difficulties in
>inserting images.  I have tried various ways and
>cannot succeed.
>
>__
>Do you Yahoo!?
>The New Yahoo! Shopping - with improved product search
>http://shopping.yahoo.com
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
> 
>Learn more about Paymentech's payment processing services at www.paymentech.com
>THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are 
>proprietary and confidential information intended only for the use of the 
>recipient(s) named above.  If you are not the intended recipient, you may not print, 
>distribute, or copy this message or any attachments.  If you have received this 
>communication in error, please notify the sender by return e-mail and delete this 
>message and any attachments from your computer.
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
> 
>

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.



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

  
Learn more about Paymentech's payment processing services at www.paymentech.com
THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are proprietary 
and confidential information intended only for the use of the recipient(s) named 
above.  If you are not the intended recipient, you may not print, distribute, or copy 
this message or any attachments.  If you have received this communication in error, 
please notify the sender by return e-mail and delete this message and any attachments 
from your computer.

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



RE: Tiles And Images

2003-10-26 Thread Holman, Cal
I think images need to be relative to the stylesheet.

Cal

-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED]
Sent: Saturday, October 25, 2003 23:25
To: Struts Users Mailing List
Subject: Re: Tiles And Images

Hi, everybody.  I have my problem solved.  The images
should be relative to the application root (it is
where my mistake was).

Nonetheless, if you do not mind, why it does not work
at all when I tried to put image in the style sheet:

td.bar {
  background:
url('http://localhost:8080/PracticeVersion/article/assets/styles/images/goldbrush.gif');
}

and I did the following in my JSP:



--- "Ruth, Brice" <[EMAIL PROTECTED]> wrote:
> Just an FYI (and correct me if I'm wrong), but just
> doing 
> will pretty much do what all the stuff you have
> below there does - what
> you have in there is the default behavior of the
> Struts-HTML base tag.
>
> Holman, Cal wrote:
>
> >Try searching the archives this is a common issue.
> The requests for images are based on where the
> template tiles is using is located - not the
> location of the jsp being inserted in the template.
> One approach is to use the base tag - I do the
> following to ensure all images and links are rooted
> at the same level in the application - the root.
> This is the simplest, but there are other
> suggestions as well.
> >
> >This line is in the base template - or any
> template.
> >
> >
> >Images then are referenced from the root of the web
> app - this is from the footer jsp
> >
> > width="95" height="37" border="0" alt="struts"/>
> >
> >My directory structure is
> >
> >App
> >--> web (web stuff)
> >-->WEB-INF
> >
> >Others like the WEB-INF capability to protect
> resources.
> >
> >Cal
> >
> >http://www.calandva.com/Last update
> 08/01/03
> >
> >-Original Message-
> >From: Caroline Jen [mailto:[EMAIL PROTECTED]
> >Sent: Friday, October 24, 2003 14:42
> >To: [EMAIL PROTECTED]
> >Subject: Tiles And Images
> >
> >I use tiles and stylesheet to display my web pages.
>  I
> >also try to insert some images in those pages.
> >
> >The tiles work fine.  I have header, footer,
> navbar,
> >content, etc. displayed without problem.  But, I am
> >curious to know if anybody has had difficulties in
> >inserting images.  I have tried various ways and
> >cannot succeed.
> >
> >__
> >Do you Yahoo!?
> >The New Yahoo! Shopping - with improved product
> search
> >http://shopping.yahoo.com
> >
>
>-
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> > 
> >Learn more about Paymentech's payment processing
> services at www.paymentech.com
> >THIS MESSAGE IS CONFIDENTIAL.  This e-mail message
> and any attachments are proprietary and confidential
> information intended only for the use of the
> recipient(s) named above.  If you are not the
> intended recipient, you may not print, distribute,
> or copy this message or any attachments.  If you
> have received this communication in error, please
> notify the sender by return e-mail and delete this
> message and any attachments from your computer.
> >
>
>-
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> > 
> >
>
> --
> Brice D. Ruth
> Sr. IT Analyst
> Fiskars Brands, Inc.
>
>
>
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>


__
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

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

  
Learn more about Paymentech's payment processing services at www.paymentech.com
THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are proprietary 
and confidential information intended only for the use of the recipient(s) named 
above.  If you are not the intended recipient, you may not print, distribute, or copy 
this message or any attachments.  If you have received this communication in error, 
please notify the sender by return e-mail and delete this message and any attachments 
from your computer.

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



Re: Multiple parameters

2003-10-26 Thread Mark Lowe
Need to know what your validator.xml looks like and form-bean stuff in 
your struts-config.

Just sticking 

So give more detail have read the documents. Forget about databases for 
now and just think about getting your form properties into your action.

is the form property an indexed property? How are they defined 
(actionForm or dynaactionform?)



On Sunday, October 26, 2003, at 05:30 AM, Rajat Pandit wrote:

Hello,
 I am still stuck with the multiple parameter problem. I shall try to
explain the problem again. Maybe someone could help.
I have a form, which has a number of records to be displayed.
A checkbox, a textbox, two radio buttons with the same name. I have the
following objective.
A. perform validation for the checkbox that is selected. I need to
ensure that textbox contains value greater that zero and either of the
radio buttons where selected
B. I need to iterate though the list of data. Ie for the checkbox that
was selected and then save the information in the database.
I have tried using 
still cant figure out how to iterate though it as I will need to do 
that
in the validate() and execute() method.

Pls gimme some pointers or help :(((

Really really stuck!





Rajat Pandit | [EMAIL PROTECTED]
+91 612 3117606
[ Developer and Part Time Human Being]
-
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: browser cache.

2003-10-26 Thread kimbuba
thnx Steve!

"Steve Raeburn" <[EMAIL PROTECTED]> ha scritto nel messaggio
news:[EMAIL PROTECTED]
> There is.
> http://jakarta.apache.org/struts/userGuide/configuration.html#controll
> er_config
>
> Steve
>




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



Multiple properties (yetagain)

2003-10-26 Thread Rajat Pandit
Hi,
Can someone help me with this. I want to iterate though form field
values, something like this org.apache.struts.taglib.html.BEAN[0].mode,
mode being one of the field values of the form
Thanks




Rajat Pandit | [EMAIL PROTECTED]
+91 612 3117606
[ Developer and Part Time Human Being]


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



ActionMessage and the Validator

2003-10-26 Thread nn
I read that the ActionErrors and ActionError classes will be deprecated by 
ActionMessage and ActionMessages..

Question 1:
How will this influence the signature for a validator which today has ActionErrors as 
one of the parameters:

(java.lang.Object,
 org.apache.commons.validator.ValidatorAction,
 org.apache.commons.validator.Field,
 org.apache.struts.action.ActionErrors,
 javax.servlet.http.HttpServletRequest,
 javax.servlet.ServletContext)

Question 2:
Since all the predefined validators use the ActionError(s) classes, I'd still have to 
handle the ActionError queue in my jsp-pages, even if I start writing my own 
validations using ActionMessage(s).
Since I'd only like to handle one queue in my jsp-pages I feel we have a problem here.
 
Did I misunderstand something? Comments are very welcome. 

/Keld

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



RE: How to validate is selected on a JSP page?

2003-10-26 Thread Rajat Pandit
Lets hope for someone to reply to this! :D 

-Original Message-
From: ZYD [mailto:[EMAIL PROTECTED] 
Sent: Saturday, October 25, 2003 10:50 AM
To: Struts Users Mailing List
Subject: Re: How to validate  is selected on a JSP page?


Yes,  that works. But that's not decent like you said.
Is there really no way to do a client-side validation using validator
framework?

- Original Message - 
From: "Rajat Pandit" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Sunday, October 26, 2003 1:37 PM
Subject: RE: How to validate  is selected on a JSP page?


> I couldn't find a workaround for that so far. I use the validate() 
> method of the actionform. Pretty lame! Eh!
> 
> -Original Message-
> From: ZYD [mailto:[EMAIL PROTECTED]
> Sent: Saturday, October 25, 2003 10:33 AM
> To: Struts Users Mailing List
> Subject: How to validate  is selected on a JSP page?
> 
> 
> Hi friends,
> 
> How to make sure a radiobox is selected on a JSP page using validator?
> 
> I cannot use:
> 
>
> 
> 
> Thanks
> 
> -bruce
> 
> 
> -
> 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]