RE: Form Bean not able to read form rendered from xml/xsl

2006-12-26 Thread Chris Loschen
Hi Rajeev,

People here have mostly been away from their desks for the last few days, so 
you might see some more replies soon.

My first impression is that you're mixing up what XSLT does and what Struts 
does. XSLT does a transformation from an XML document to some other form: in 
this case, it appears that you're creating HTML. XSLT does nothing that would 
have anything to do with whether or not Struts can handle your form bean 
correctly.

So the first thing I'd look at is what the result of the XSLT transformation 
is. If you're getting the results you expect there, which would be something 
like your second example, then you need to look at why Struts isn't able to 
handle the setter/getter properly (my first guess would be that you have a 
problem with your cases, but you'd have to check that). If you're not getting 
the results you expect from your XSLT, then there's a problem with the XSLT.

If it's an XSLT problem, you'd have more luck asking the XSLT list at [EMAIL 
PROTECTED]

Good luck!

Chris Loschen 

-Original Message-
From: Rajeev Kumar Pandey [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 26, 2006 4:38 AM
To: user@struts.apache.org
Subject: RE: Form Bean not able to read form rendered from xml/xsl


Hi All,

 
Resending my query since I did not receive any replies to the same.
Kindly help.

 
Regards,

Rajeev

 


From: Rajeev Kumar Pandey Sent: Friday, December 22, 2006 8:00 PM
To: 'user@struts.apache.org'
Subject: Form Bean not able to read form rendered from xml/xsl

 
Hi All,

 
I am new to this mailing list, so might not be able to pose my question 
appropriately. Kindly bear with me.

 
I am facing an issue with use of form beans in my project to read html forms 
rendered through xml/xsl.

 
When I use xsl:element name=input

 xsl:attribute name=nameUserId/xsl:attribute

 xsl:attribute name=typehidden/xsl:attribute

 xsl:attribute name=valuexsl:value-of 
select=//Node/UserId//xsl:attribute

 /xsl:element

 
the formbean is not able to pick the value from the form. But in the other part 
of the code where I use 
 
xsl:when test=//TIMERADIO[.='monthdate']

input type=radio value=monthdate name=time checked=true/

/xsl:when

the getter and setter method is called for the above parameter. Is there an 
equivalent for xsl:element so that my action class can read UserId from the 
formbean? 
 
Thanks and Regards

Rajeev Kumar Pandey

 
 


 CAUTION - Disclaimer * This e-mail contains 
PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the 
addressee(s). If you are not the intended recipient, please notify the sender 
by e-mail and delete the original message. Further, you are not to copy, 
disclose, or distribute this e-mail or its contents to any other person and any 
such actions are unlawful. This e-mail may contain viruses. Infosys has taken 
every reasonable precaution to minimize this risk, but is not liable for any 
damage you may sustain as a result of any virus in this e-mail. You should 
carry out your own virus checks before opening the e-mail or attachment. 
Infosys reserves the right to monitor and review the content of all messages 
sent to or from this e-mail address. Messages sent to or from this e-mail 
address may be stored on the Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***


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



RE: Struts, AJAX, JSP, and JavaScript question

2006-11-29 Thread Chris Loschen
Perhaps I'm missing something -- I don't know that much about JS and less about 
Ajax -- but these error messages look like they're exactly right to me. In the 
first case, you're starting element foo, then element bar, then ending element 
foo before you end the child element bar. That's ill-formed XML, and one way of 
describing that is as an XML tag name mismatch. In the second case, you've 
got a start element tag but no end element tag, so the XML parser would reach 
the end of the evaluated document without the close to element foo and you'd 
get exactly what you did get -- unexpected end of XML source.

I wonder about what Frank wrote -- his example would have been well-formed XML, 
but its root element was html, so it wouldn't have been valid in the place in 
the document where it was being evaluated because the DTD for HTML and/or XHTML 
only allows a single html root element, not a child html element under that. 
I'm not sure if eval is supposed to be producing an entire page of html 
separate from the surrounding document, but it doesn't look that way since you 
can also eval fragments and code which doesn't include any tags at all. If 
you're not supposed to be evaluating an entirely separate page, I would guess 
that you would need to eval the code which needs to appear in the head section 
of the document and the code which needs to appear in the body separately.

Not sure if that makes sense -- still waking up this morning. Hope it helps.

Chris

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 29, 2006 7:49 AM
To: Struts Users Mailing List
Subject: RE: Struts, AJAX, JSP, and JavaScript question

From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
 (interestingly, in IE I get a syntax error, because it's trying to 
 interpret the markup as script, but in FF it just quietly doesn't 
 work, not even a notice in Firebug).

Something else interesting in FF:

eval(foobar/foo/bar)

XML tag name mismatch

eval(foo)

unexpected end of XML source

Dave


-
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: bean:write not displaying the intended values

2006-11-16 Thread Chris Loschen
Did you include the taglib reference in your JSP page? Something like this:

%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %

Without it, the JSP can't find the custom tag and you get the behavior you're 
describing.

Hope that helps.

Chris Loschen 

-Original Message-
From: robin bajaj [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 16, 2006 3:38 PM
To: Struts Users Mailing List
Subject: bean:write not displaying the intended values

Hi Folks,

At Struts 1.x level,
I am writing the value of bean's property on a jsp page using bean:write 
name=bean property=bean-property scope=request/
  tag , but nothing gets displayed on the web page.

Infact the generated HTML (view source in the browser), shows the tag's code 
as-is. bean:write name=bean property=bean-property
scope=request/

However,
I can display the value of bean's property using a scriptlet.

%LoyaltyProfileDto loyaltyProfileDTO =
(LoyaltyProfileDto)request.getAttribute(loyaltyProfileDTO);
out.println(loyaltyProfileDTO.getEMail());  %

This scriptlet works fine and displays the bean property's value correctly.

I dont know what's wrong,
Any ideas ?
regards,
- R

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



Junit tests on remote Struts application in Eclipse

2006-07-10 Thread Chris Loschen
Hi all,

This is admittedly tangential to our topic, but some other questions on Eclipse 
came up last week, and people here seem knowledgeable on all sorts of 
subjects... If you know of a better list on which I could ask this question, 
please let me know: I should probably be on it.

I have a struts application deployed on a localhost app server (the stack is 
Windows/Oracle/WebLogic), and I'm using the new Eclipse 3.2 IDE (downloaded 
last week, at least partly to try to solve the current problem). I've set up 
the project as a regular Java project, which I did before WTP came out. I 
haven't yet been able to figure out how to use the WTP tools, or if there's 
something I need to do with my project to enable those, but that's another 
issue. I've been able to debug the application in Eclipse just fine for several 
months by connecting to my localhost app and setting breakpoints in my source 
code etc. 

Now I'm trying to get some Junit tests running. The tests themselves already 
exist, though eventually I'll be writing some new ones to test some new 
functionality I'm working on. But I haven't been able to run the tests at all 
yet. I keep getting a null pointer exception on the tests which try to actually 
connect to the DB. All the DB connections are handled in my app server setup, 
so I think the difficulty is that I'm just connecting to the code but not to 
the running application.

I've got TPTP in this new version of Eclipse but haven't totally figured it out 
yet. Does anyone have any suggestions to get me started or for some references 
on how to make this work?

Thanks for your help!

Chris


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



RE: Junit tests on remote Struts application in Eclipse

2006-07-10 Thread Chris Loschen
Yes, it does help -- thank you! I'll look into cactus and (probably better) if 
there's some way I can rearrange my testing strategy. TPTP seems to have some 
sort of datapooling arrangement which might help me.

Eventually, I'm going to need to set up some multiple thread tests and confirm 
that correct values get written to the DB, so I do need to have some of the 
persistence layer strategies you mention. I'm not sure I'll be able to get away 
from running it in the container, though -- some of what I'm concerned about is 
the interaction of multiple threads with Hibernate, Spring, ThreadLocal, etc. 
-- is there a way to look at all that without being in the container?

More specifically, we had a problem where we were using a ThreadLocal variable 
to store the operator id in a Spring-enabled stateless class. The operator id 
was (potentially at least) getting saved back to the thread pool where it could 
be applied to another thread picking up the same class. Instead, we've saved 
the operator id to a stateful class and passed it to the original class as 
method arguments. Now we want to test that multiple threads with different 
operator ids persist the correct operator id back to the DB. 

I have a pretty good idea how to write up that test. What I'm less clear about 
is how to actually run the test once it's set up. I had assumed that I needed 
to be in the container that the application normally runs in so that I wouldn't 
have to reproduce all of the configuration details. Is that a wrong assumption?

Chris

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 10, 2006 2:11 PM
To: user@struts.apache.org; [EMAIL PROTECTED]
Subject: RE: Junit tests on remote Struts application in Eclipse

Chris,

It sounds like you're trying to run the tests inside the container.  If so, 
JUnit can't do that on it's own.  You can use Cactus to proxy from the 
testrunner (outside the container) to the tests (inside the container).

I've always found Cactus to be a bit of a PITA, however, and have changed my 
testing strategy to avoid it.  My tests are split into three
groups:

 - POJO JUnit tests which test the java code and run very fast.  These drive 
most of my development via TDD.
 - Tests that involve other systems, principally the database.  I substitute a 
DAO factory that uses a local JDBC Connection instead of getting a datasource 
from the container.  These tests check the Persistence layer.  They're much 
slower than the ordinary JUnit tests (particulary because they use DBUnit to 
set up test data), but they're still faster and easier than in-container tests.
 - Acceptance or System tests that test the application as a whole, running in 
the container, through the normal web interface (using HttpUnit).  These don't 
have to test the edge conditions, because those are tested in the other tests, 
above.

Hope that helps.

 - George
   http://www.idiacomputing.com/

 -Original Message-
 From: Chris Loschen [mailto:[EMAIL PROTECTED]
 Sent: Monday, July 10, 2006 1:25 PM
 To: Struts Users Mailing List
 Subject: Junit tests on remote Struts application in Eclipse
 
 
 Hi all,
 
 This is admittedly tangential to our topic, but some other questions 
 on Eclipse came up last week, and people here seem knowledgeable on 
 all sorts of subjects... If you know of a better list on which I could 
 ask this question, please let me
 know: I should probably be on it.
 
 I have a struts application deployed on a localhost app server (the 
 stack is Windows/Oracle/WebLogic), and I'm using the new Eclipse 3.2 
 IDE (downloaded last week, at least partly to try to solve the current 
 problem). I've set up the project as a regular Java project, which I 
 did before WTP came out. I haven't yet been able to figure out how to 
 use the WTP tools, or if there's something I need to do with my 
 project to enable those, but that's another issue. I've been able to 
 debug the application in Eclipse just fine for several months by 
 connecting to my localhost app and setting breakpoints in my source 
 code etc.
 
 Now I'm trying to get some Junit tests running. The tests themselves 
 already exist, though eventually I'll be writing some new ones to test 
 some new functionality I'm working on.
 But I haven't been able to run the tests at all yet. I keep getting a 
 null pointer exception on the tests which try to actually connect to 
 the DB. All the DB connections are handled in my app server setup, so 
 I think the difficulty is that I'm just connecting to the code but not 
 to the running application.
 
 I've got TPTP in this new version of Eclipse but haven't totally 
 figured it out yet. Does anyone have any suggestions to get me started 
 or for some references on how to make this work?
 
 Thanks for your help!
 
 Chris
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL

Books on JSF

2006-04-19 Thread Chris Loschen
Hi all,

I'd like to start learning more about JSF. I've had a recommendation for _Core 
Java Server Faces_ -- do people here agree that would be a good choice? Any 
other recommendations?

Thanks!

Chris


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



RE: debuging in eclipse

2006-02-23 Thread Chris Loschen
You'd have to look at what actually gets into the java startup command:
you've got two different debug statements in what you quoted, one active
mapped to JAVA_OPTIONS and one commented out mapped to JAVA_OPTS. When
the server actually starts, does the{ startup command include
JAVA_OPTIONS? JAVA_OPTS? Both? Neither? 

I'd debug that statement by setting up a statement in your batch file to
echo the startup command to stdout, something like 

echo {whatever your startup command looks like}

Then you can see what actually gets to the command. You could also
experiment by adding a rem before the first debug statement and removing
the rem before the second one, and see if that works.

I don't usually use JBoss or Tomcat, but if the earlier comment is
correct that you need to use JPDA, then the comment in what you quoted
to uncomment and modify as appropriate to enable remote debugging
indicates that you do need to remove that rem at the start of the set
JAVA_OPTS debug line.

Hope that helps!

Chris

-Original Message-
From: Shasirekha Engala [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 23, 2006 1:00 AM
To: 'Struts Users Mailing List'
Subject: RE: debuging in eclipse

These are the lines in run.bat 

here %JAVA_OPTS% indicates the need information that needs to be set.
Should I still remove rem


rem Setup JBoss specific properties
set JAVA_OPTIONS=-Xdebug-Xnoagent -Djava.compiler=none
-Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n
set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name=%PROGNAME% set
JBOSS_HOME=%DIRNAME%\..

rem Sun JVM memory allocation pool parameters. Modify as appropriate.
set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m

rem JPDA options. Uncomment and modify as appropriate to enable remote
debugging.
rem set JAVA_OPTS=-classic -Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y
%JAVA_OPTS%


Shasi


-Original Message-
From: Chris Loschen [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 23, 2006 10:18 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: debuging in eclipse


Quick question --

The JAVA_OPTS line you have below starts with rem which indicates a
remark in batch files. That would indicate that the line isn't getting
executed. If you remove the rem, does that help?

Chris 

-Original Message-
From: Max Cooper [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 22, 2006 11:37 PM
To: [EMAIL PROTECTED]
Cc: 'Struts Users Mailing List'
Subject: RE: debuging in eclipse

You can use whatever port you want, just make sure the port number in
the script that starts JBoss matches the port that you have in your
Eclipse debug configuration.

I suppose the default port for JBoss is whatever it is set to in the
comment in the run script (8787?). The default in the maven-jboss-plugin
is something different (4142). But again, it really does not matter as
long as you have the same port specified in the script and in Eclipse.

-Max

On Thu, 2006-02-23 at 09:38 +0530, Shasirekha Engala wrote:
 Hi Chandra
 
  I am using Jboss with Eclipse and the operating system I am using is 
 windows XP. In jboss/bin/run.bat file the java options are specified 
 as
 
 rem set JAVA_OPTS=-classic -Xdebug -Xnoagent -Djava.compiler=NONE 
 -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y
 %JAVA_OPTS%
 
 but still I get the same problem
 
 here for address there are different values. In some places I see 
 8787, in some 8000  . Can I get some information about what should

 it actually be?
 
 Thanks and Regards
 Shasi.
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, February 22, 2006 8:44 PM
 To: user@struts.apache.org; [EMAIL PROTECTED]
 Subject: RE: debuging in eclipse
 
 
 
 Is your server(i.e tomcat or Jboss or whatever) running and listening 
 for debugging connections?
 
 here is how I use Tomcat, JBoss and Eclipse to build and debug 
 applications.
 
 Which ever platform you are using (tomcat or JBoss) you need to start 
 them with the JPDA debugging enabled. For tomcat this is very easy. In

 the $CATALINA_HOME/bin directory there is a script catalina.sh. If you

 provide the arguments 'jpda start' tomcat will startup and listen on 
 port 8000 for a debugger connection.
 
 With JBoss its only slightly more complicated. Basically you need to 
 specify the JAVA_OPTS to have java start up listening for debugger 
 connections. I typically copy the $JBOSS_HOME/bin/run.sh to 
 $JBOSS_HOME/bin/run-debug.sh but you can just as easily setup the 
 JAVA_OPTS environment variable and use the run.sh script.
 
 The value of JAVA_OPTS needs have -Xdebug 
 -Xrunjdwp:server=y,transport=dt_socket,address=4142,suspend=n
specified.
 
 
 here is the official info on the connection arguments:
 http://java.sun.com/j2se/1.4.2/docs/guide/jpda/conninv.html
 Once you have JBoss or Tomcat running and listening for debugging 
 connections you are good to go for connectin

RE: How to inject code between HEAD /HEAD of a generated page ?

2006-02-23 Thread Chris Loschen
But you can't do that -- it's not well-formed XML.

Chris 

-Original Message-
From: David Delbecq [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 23, 2006 7:53 AM
To: Struts Users Mailing List
Subject: Re: How to inject code between HEAD /HEAD of a generated page ?

Na, he just asummed the tag was doing additionnal work at a later part:


/html
/yourtag

Dave Newton a écrit :

Leon Rosenberg wrote:
  

headyourtag/head?
  


Ah, see, that won't work.

Try

headyourtag//head instead.

;)

(Hey, it was either this or I would have had to respond to the I want 
to write a fully object-based Java program, how do I do that? thread 
;)

Dave



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





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



RE: How to inject code between HEAD /HEAD of a generated page ?

2006-02-23 Thread Chris Loschen
True to some degree, but the generated page still has to be rendered by the 
browser once the custom tags and scriptlets etc. are resolved. 

head
yourtag
/head
/yourtag

will not render properly (if at all) because it's not well-formed. To that 
degree at least, JSP pages still have to follow XML rules. Even HTML browsers 
(which silently fix most HTML sins) can't make any sense of ill-formed code 
like that.

As Mr. Rosenberg has pointed out, he intended something like

head
yourtag/
/head

or

head
yourtag.../yourtag
/head

Both of which would be fine.

Chris

-Original Message-
From: David Delbecq [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 23, 2006 10:55 AM
To: Struts Users Mailing List
Subject: Re: How to inject code between HEAD /HEAD of a generated page ?

Am pretty sure, JSP is not about xml at all :)

img src=c:url value='blabla'//

and will never fit in a xml parser!


Chris Loschen a écrit :

But you can't do that -- it's not well-formed XML.

Chris

-Original Message-
From: David Delbecq [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 23, 2006 7:53 AM
To: Struts Users Mailing List
Subject: Re: How to inject code between HEAD /HEAD of a generated page ?

Na, he just asummed the tag was doing additionnal work at a later part:


/html
/yourtag

Dave Newton a écrit :

  

Leon Rosenberg wrote:
 



headyourtag/head?
 
   

  

Ah, see, that won't work.

Try

headyourtag//head instead.

;)

(Hey, it was either this or I would have had to respond to the I want 
to write a fully object-based Java program, how do I do that? thread
;)

Dave



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





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






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



RE: debuging in eclipse

2006-02-23 Thread Chris Loschen
I can't answer JBoss questions -- better to ask the list about those. I
don't know if you're supposed to have the classic option or not -- I
don't, but I'm not running JBoss either. I still haven't seen what the
actual app server startup command looks like -- that's where you should
start debugging, I think.

The other thing to check is to make sure you've got Eclipse set up
correctly and that it's looking at the same port (and host of course)
that you've got the server set up on. Several other people on the list
said that too, if I'm not mistaken.

Good luck. Better to ask these questions to the list (which I'll copy)
as they'll likely have answers that I don't.

Chris

-Original Message-
From: Shasirekha Engala [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 23, 2006 9:15 AM
To: Chris Loschen
Subject: RE: debuging in eclipse

I have now modified the statements as

set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name=%PROGNAME% -classic -Xdebug
-Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n

here when the value of suspended=y then my server is suspended and
displaying the message



===
.
  JBoss Bootstrap Environment
.
  JBOSS_HOME: D:\jboss-4.0.2\bin\\..
.
  JAVA: C:\Program Files\Java\jdk1.5.0_04\bin\java .
  JAVA_OPTS:  -Dprogram.name=run.bat -classic -Xdebug -Xnoagent
-Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,
s128m -Xmx512m
.
  CLASSPATH: C:\Program
Files\Java\jdk1.5.0_04\lib\tools.jar;D:\jboss-4.0.2\bin\\run.jar
.

===
.
Warning: classic VM not supported; client VM will be used Listening for
transport dt_socket at address: 8787


but if I modify the suspended=n then it is running properly but when
trying to debug I am getting the error

Launching(Error:Failed to connect to remote VM)

Thanks and Regards,
Shasi





-Original Message-
From: Chris Loschen [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 23, 2006 6:14 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: debuging in eclipse


You'd have to look at what actually gets into the java startup command:
you've got two different debug statements in what you quoted, one active
mapped to JAVA_OPTIONS and one commented out mapped to JAVA_OPTS. When
the server actually starts, does the{ startup command include
JAVA_OPTIONS? JAVA_OPTS? Both? Neither? 

I'd debug that statement by setting up a statement in your batch file to
echo the startup command to stdout, something like 

echo {whatever your startup command looks like}

Then you can see what actually gets to the command. You could also
experiment by adding a rem before the first debug statement and removing
the rem before the second one, and see if that works.

I don't usually use JBoss or Tomcat, but if the earlier comment is
correct that you need to use JPDA, then the comment in what you quoted
to uncomment and modify as appropriate to enable remote debugging
indicates that you do need to remove that rem at the start of the set
JAVA_OPTS debug line.

Hope that helps!

Chris

-Original Message-
From: Shasirekha Engala [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 23, 2006 1:00 AM
To: 'Struts Users Mailing List'
Subject: RE: debuging in eclipse

These are the lines in run.bat 

here %JAVA_OPTS% indicates the need information that needs to be set.
Should I still remove rem


rem Setup JBoss specific properties
set JAVA_OPTIONS=-Xdebug-Xnoagent -Djava.compiler=none
-Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n
set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name=%PROGNAME% set
JBOSS_HOME=%DIRNAME%\..

rem Sun JVM memory allocation pool parameters. Modify as appropriate.
set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m

rem JPDA options. Uncomment and modify as appropriate to enable remote
debugging.
rem set JAVA_OPTS=-classic -Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y
%JAVA_OPTS%


Shasi


-Original Message-
From: Chris Loschen [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 23, 2006 10:18 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: debuging in eclipse


Quick question --

The JAVA_OPTS line you have below starts with rem which indicates a
remark in batch files. That would indicate that the line isn't getting
executed. If you remove the rem, does that help?

Chris 

-Original Message-
From: Max Cooper [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 22, 2006 11:37 PM
To: [EMAIL PROTECTED]
Cc: 'Struts Users Mailing List'
Subject: RE: debuging in eclipse

You can use whatever port you want, just make sure the port number in
the script that starts JBoss matches the port that you have in your
Eclipse debug configuration.

I suppose the default port for JBoss is whatever it is set to in the
comment in the run script (8787?). The default in the maven

RE: debuging in eclipse

2006-02-22 Thread Chris Loschen
Quick question --

The JAVA_OPTS line you have below starts with rem which indicates a
remark in batch files. That would indicate that the line isn't getting
executed. If you remove the rem, does that help?

Chris 

-Original Message-
From: Max Cooper [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 22, 2006 11:37 PM
To: [EMAIL PROTECTED]
Cc: 'Struts Users Mailing List'
Subject: RE: debuging in eclipse

You can use whatever port you want, just make sure the port number in
the script that starts JBoss matches the port that you have in your
Eclipse debug configuration.

I suppose the default port for JBoss is whatever it is set to in the
comment in the run script (8787?). The default in the maven-jboss-plugin
is something different (4142). But again, it really does not matter as
long as you have the same port specified in the script and in Eclipse.

-Max

On Thu, 2006-02-23 at 09:38 +0530, Shasirekha Engala wrote:
 Hi Chandra
 
  I am using Jboss with Eclipse and the operating system I am using is 
 windows XP. In jboss/bin/run.bat file the java options are specified 
 as
 
 rem set JAVA_OPTS=-classic -Xdebug -Xnoagent -Djava.compiler=NONE 
 -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y 
 %JAVA_OPTS%
 
 but still I get the same problem
 
 here for address there are different values. In some places I see 
 8787, in some 8000  . Can I get some information about what should

 it actually be?
 
 Thanks and Regards
 Shasi.
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, February 22, 2006 8:44 PM
 To: user@struts.apache.org; [EMAIL PROTECTED]
 Subject: RE: debuging in eclipse
 
 
 
 Is your server(i.e tomcat or Jboss or whatever) running and listening 
 for debugging connections?
 
 here is how I use Tomcat, JBoss and Eclipse to build and debug 
 applications.
 
 Which ever platform you are using (tomcat or JBoss) you need to start 
 them with the JPDA debugging enabled. For tomcat this is very easy. In

 the $CATALINA_HOME/bin directory there is a script catalina.sh. If you

 provide the arguments 'jpda start' tomcat will startup and listen on 
 port 8000 for a debugger connection.
 
 With JBoss its only slightly more complicated. Basically you need to 
 specify the JAVA_OPTS to have java start up listening for debugger 
 connections. I typically copy the $JBOSS_HOME/bin/run.sh to 
 $JBOSS_HOME/bin/run-debug.sh but you can just as easily setup the 
 JAVA_OPTS environment variable and use the run.sh script.
 
 The value of JAVA_OPTS needs have -Xdebug 
 -Xrunjdwp:server=y,transport=dt_socket,address=4142,suspend=n
specified.
 
 
 here is the official info on the connection arguments:
 http://java.sun.com/j2se/1.4.2/docs/guide/jpda/conninv.html
 Once you have JBoss or Tomcat running and listening for debugging 
 connections you are good to go for connectin with Eclipse. Ofcourse 
 you need have mention the same listen port in your 'debug launch 
 configuration'  of eclipse.
 
 Hope this will help.
 
 Chandra
 
 -Original Message-
 From: Shasirekha Engala [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, February 22, 2006 5:37 PM
 To: user@struts.apache.org
 Subject: Reg: debuging in eclipse
 
 Hi
 
 I have some problem related to eclipse. When I am trying to debug my 
 struts application I am getting the error as Failed to connect to 
 remote VM.
 Can I get solution to this problem.
 
 
 Regards
 Shasi
 
 
 
 -
 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]





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



Using RBAC and tiles to dynamically display menu items

2005-10-12 Thread Chris Loschen
Hi experts!

We're using struts 1.1 and rbac 2.0a.

We have some menu items set up like this in our tiles-defs.xml file:

bean id=Hierarchy
classtype=com.xxx.core.menus.RITilesMenuBean
set-property property=roles
value=ALL_ADMIN/
set-property property=key
value=tiles.tabs.myAccount.Hierarchy/
set-property property=orgTypes
value=/
set-property property=value
value=tiles.subtabs.myAccount.hierarchyTab/
set-property property=link
value=/hierarchy/billing/main.do/
/bean

This used to work, and it would not display the Hierarchy tab if the
user was a User, not an Administrator. The only change I'm sure of is
that we used to have the key and value properties hard-coded as
Hierarchy before implementing i18n in our current version of the
software. It's not working now: we're displaying the Hierarchy tab for
users no matter what their role might be.

I've tried replacing the key so that it matches the value and I've tried
putting Hierarchy back in the key property, and neither of those
seemed to make any difference. I don't have the source code for rbac, so
my debugging hasn't given me much help. I also tried googling for
information, but haven't found anything useful yet.

Does anyone have any ideas for me, or what other information I could
provide? Thanks for your help!

Yours,

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.


RE: Displaying errors for all except one key

2005-08-22 Thread Chris Loschen
Hi again, everybody!

I promised I'd report back with results. I think the tag is working
quite well so far, and it turned out to be pretty simple to extend the
html:messages custom tag. I got the source code and overrode the
doStartTag() method. I left all the original source in place but added
this:

//Were any properties to be excluded?
Configuration config = Configuration.getConfiguration();
String excludedProperties =
config.getValue(excludedProperties);
ArrayList excludedList = new ArrayList();
if(excludedProperties!=null 
excludedProperties.length()0){
String[] excludedArray =
excludedProperties.split(,);
for(int i=0;iexcludedArray.length;i++){
excludedList.add(excludedArray[i]);
}
}

The Configuration class reads a properties file and returns key-value
pairs. I wanted to set it up so that I could exclude more than one
property if I should need to, so I set up the comma-delimited list
structure.

Then a little further down I added this:

//exclude any properties not to be shown
if(excludedList!=null  excludedList.size()0){
ActionMessages tempMessages=new ActionMessages();
Iterator tempIt = messages.get();
while(tempIt.hasNext()){
ActionMessage
tempMessage=(ActionMessage)tempIt.next();
 
if(!excludedList.contains(tempMessage.getKey())){
 
tempMessages.add(tempMessage.getKey(),tempMessage);
}
}
messages=tempMessages;
}

That was it. The JSP code is actually simpler than it was before:

%-- Display Error Messages if the showErrors parameter is true --%
logic:equal name=showErrors value=true
logic:messagesPresent message=false
div class=errorMsgul
tbmtags:messages id=message message=false 
libean:write name=message//li
/tbmtags:messages
/ul/div
/logic:messagesPresent
/logic:equal 

Etc.

So I'm just displaying everything but I'm using my custom tag instead of
the default one from html:messages, and that custom tag does the
exclusions I need.

I do have a problem I should solve: in the case where the only error in
errors is one I need to exclude, it does get excluded but I also get the
empty div which displays a big red box on my page. Fortunately, that
happens very rarely. I guess I could extend messagesPresent as well to
take care of that.

Thanks again for the help. I really appreciate it.

Chris Loschen

-Original Message-
From: Chris Loschen 
Sent: Tuesday, August 16, 2005 9:52 PM
To: 'Struts Users Mailing List'
Subject: RE: Displaying errors for all except one key

Yes, I wouldn't be able to get away with the empty div tag -- it would
create a great big red box on my page which wouldn't be acceptable.

I'm working on extending html:messages, and it's working quite well (and
surprisingly easily) so far. I'll do some more testing tomorrow and if
all goes well, I'll post what I've done.

Again, thank you very much for your help.

Chris 

-Original Message-
From: Kishore Senji [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 16, 2005 1:08 PM
To: Struts Users Mailing List
Subject: Re: Displaying errors for all except one key

On 8/16/05, Chris Loschen [EMAIL PROTECTED] wrote:
 Thank you very much for the idea. I'm starting to wrestle with it.
 
 My first instinct is that I'm going to need to extend html:messages 
 because the JSP solution below wouldn't work (I think!) with the HTML 
 structure -- in other words, I'm going to end up with a new divul 
 for every new error instead of the single div and ul for the whole set

 that I need. But I couldn't rearrange it either because then if I have

 only the error I want to exclude, I still get the (now empty)
divul.
 Does that sound right?

If you have the something like this in your jsp, even if you have only
one error that you would want to exculde you will be left with only a
div/div

div class=errorMsg
  logic:iterate id=property name=errors
 logic:notEqual name=property
value=%=RIGHT_PANE_THRESHOLD_PROPERTY% type=java.lang.String
   ul
 html:messages id=message message=false
property=%=property%
   libean:write name=message//li
 /html:messages
   /ul
 /logic:notEqual
  /logic:iterate
/div

If you don't like to display the empty div when there are no errors, you
would have to do some processing of the properties to see if you have
atleast one other property other than the one that you want to exclude
then only show the div and the errors. But anyway, is showing an empty
div that big of an issue?


 I'm tracking down the appropriate source code so that I can look at 
 the messages tag. I'm thinking that what I need to do is simply

RE: Displaying errors for all except one key

2005-08-16 Thread Chris Loschen
Thank you very much for the idea. I'm starting to wrestle with it.

My first instinct is that I'm going to need to extend html:messages
because the JSP solution below wouldn't work (I think!) with the HTML
structure -- in other words, I'm going to end up with a new divul
for every new error instead of the single div and ul for the whole set
that I need. But I couldn't rearrange it either because then if I have
only the error I want to exclude, I still get the (now empty) divul.
Does that sound right?

I'm tracking down the appropriate source code so that I can look at the
messages tag. I'm thinking that what I need to do is simply iterate
through my errors, copy each one that isn't in my excluded list (for
now, only one, but might grow later) to a new collection, and then pass
that new collection to super along with the appropriate arguments. Does
that sound reasonable, or am I missing something?

Thanks again for your help.

Chris

-Original Message-
From: Kishore Senji [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 15, 2005 6:15 PM
To: Struts Users Mailing List
Subject: Re: Displaying errors for all except one key

I believe the reason that the Validator errors are missing is that
Validator keys the errors with the property name of the form field.
And so, if you say that just show the errors whose property is
ActionErrors.GLOBAL_ERROR you would definitely miss out on the
Validator errors. It has nothing to do with the usage of the deprecated
ActionError and I believe you would still run in to this problem even if
you use ActionMessage

There are two options.

1) Extend html:messages to shown messages for all but a given property
2)
In the JSP you would follow the following steps

ActionErrors actionErrors = (ActionErrors)
RequestUtils.getInstance().getActionErrors(pageContext,
Globals.ERROR_KEY);
Iterator errors = actionErrors.properties();
pageContext.setAttribute(errors, errors); logic:iterate id=property
name=errors
  logic:notEqual name=property
value=%=RIGHT_PANE_THRESHOLD_PROPERTY% type=java.lang.String
div class=errorMsgul
   html:messages id=message message=false
property=%=property%
   libean:write name=message//li
   /html:messages
   /ul/div
  /logic:notEqual
/logic:iterate

Basically, you would be iterating over all the properties and showing
the errors to all but the property that you don't want to show  the
errors for. [Note: one thing to note would be, I don't know if the
ordering of the errors will be the same of that you would get if you
leave the iteration to the html:messages.]

On 8/15/05, Chris Loschen [EMAIL PROTECTED] wrote:
 Does anyone have some ideas for me? Thank you!

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





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



RE: Displaying errors for all except one key

2005-08-16 Thread Chris Loschen
Yes, I wouldn't be able to get away with the empty div tag -- it would
create a great big red box on my page which wouldn't be acceptable.

I'm working on extending html:messages, and it's working quite well (and
surprisingly easily) so far. I'll do some more testing tomorrow and if
all goes well, I'll post what I've done.

Again, thank you very much for your help.

Chris 

-Original Message-
From: Kishore Senji [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 16, 2005 1:08 PM
To: Struts Users Mailing List
Subject: Re: Displaying errors for all except one key

On 8/16/05, Chris Loschen [EMAIL PROTECTED] wrote:
 Thank you very much for the idea. I'm starting to wrestle with it.
 
 My first instinct is that I'm going to need to extend html:messages 
 because the JSP solution below wouldn't work (I think!) with the HTML 
 structure -- in other words, I'm going to end up with a new divul 
 for every new error instead of the single div and ul for the whole set

 that I need. But I couldn't rearrange it either because then if I have

 only the error I want to exclude, I still get the (now empty)
divul.
 Does that sound right?

If you have the something like this in your jsp, even if you have only
one error that you would want to exculde you will be left with only a
div/div

div class=errorMsg
  logic:iterate id=property name=errors
 logic:notEqual name=property
value=%=RIGHT_PANE_THRESHOLD_PROPERTY% type=java.lang.String
   ul
 html:messages id=message message=false
property=%=property%
   libean:write name=message//li
 /html:messages
   /ul
 /logic:notEqual
  /logic:iterate
/div

If you don't like to display the empty div when there are no errors, you
would have to do some processing of the properties to see if you have
atleast one other property other than the one that you want to exclude
then only show the div and the errors. But anyway, is showing an empty
div that big of an issue?


 I'm tracking down the appropriate source code so that I can look at 
 the messages tag. I'm thinking that what I need to do is simply 
 iterate through my errors, copy each one that isn't in my excluded 
 list (for now, only one, but might grow later) to a new collection, 
 and then pass that new collection to super along with the appropriate 
 arguments. Does that sound reasonable, or am I missing something?

There is no super method in HtmlMessages tag that can take the
collection of errors and iterate. You would have to override the
doStartTag of the HtmlMessages tag and create the iterator excluding the
errors that you don't want to see.

 
 Thanks again for your help.
 
 Chris
 
 -Original Message-
 From: Kishore Senji [mailto:[EMAIL PROTECTED]
 Sent: Monday, August 15, 2005 6:15 PM
 To: Struts Users Mailing List
 Subject: Re: Displaying errors for all except one key
 
 I believe the reason that the Validator errors are missing is that 
 Validator keys the errors with the property name of the form field.
 And so, if you say that just show the errors whose property is 
 ActionErrors.GLOBAL_ERROR you would definitely miss out on the 
 Validator errors. It has nothing to do with the usage of the 
 deprecated ActionError and I believe you would still run in to this 
 problem even if you use ActionMessage
 
 There are two options.
 
 1) Extend html:messages to shown messages for all but a given property
 2)
 In the JSP you would follow the following steps
 
 ActionErrors actionErrors = (ActionErrors) 
 RequestUtils.getInstance().getActionErrors(pageContext,
 Globals.ERROR_KEY);
 Iterator errors = actionErrors.properties(); 
 pageContext.setAttribute(errors, errors); logic:iterate
id=property
 name=errors
  logic:notEqual name=property
 value=%=RIGHT_PANE_THRESHOLD_PROPERTY% type=java.lang.String
div class=errorMsgul
   html:messages id=message message=false
 property=%=property%
   libean:write name=message//li
   /html:messages
   /ul/div
  /logic:notEqual
 /logic:iterate
 
 Basically, you would be iterating over all the properties and showing 
 the errors to all but the property that you don't want to show  the 
 errors for. [Note: one thing to note would be, I don't know if the 
 ordering of the errors will be the same of that you would get if you 
 leave the iteration to the html:messages.]
 
 On 8/15/05, Chris Loschen [EMAIL PROTECTED] wrote:
  Does anyone have some ideas for me? Thank you!
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 ___
 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

RE: Displaying errors for all except one key

2005-08-15 Thread Chris Loschen
Does anyone have some ideas for me? Thank you! 

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

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]






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



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: Test whether an application resource is empty

2005-06-13 Thread Chris Loschen
As I understand it, this would return the error only if there are no
messages at all in the application resource, which is not at all likely
in this context. We're testing whether a particular application resource
(that is, a particular key-value pair in the application resource file)
is empty, not the whole file. 

That said, I still didn't get the results I had hoped for with the new
version either, unfortunately. I didn't get any errors, but it returned
true even when the value was empty. For example, when I had an
application resource key set up like so:

module.admin.manageHierarchy.businessStruc.add.directionToUser=

And my JSP code is set up like this:

bean:define id=messages
name=org.apache.struts.action.MESSAGE/
 logic:notEmpty name=messages
property=message(%=directionToUserKey.toString()%)
 div class=modFormBoxbean:message
key=%=directionToUserKey.toString()%//div
 /logic:notEmpty

It returns notEmpty as true, because I get this in the page:

 div class=modFormBox/div

I presume it must be testing that the key exists and is non-zero-length
rather than testing the value. Oh well.

Chris

-Original Message-
From: Nitish Kumar [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 13, 2005 12:54 AM
To: 'Struts Users Mailing List'
Subject: RE: Test whether an application resource is empty


bean:define id=messages name=org.apache.struts.action.MESSAGE/

I dont understand some things here, If the application resource is empty
above code would throw this error, Define tag cannot set a null value.


So how does this code helps in checking wether an application resouce is
empty?

Am I missing some thing here? or may be the subject is misleading.. 


Thanks and Regards,
Nitish Kumar
Tavant Technologies Ltd
Bangalore


-Original Message-
From: Laurie Harper [mailto:[EMAIL PROTECTED]
Sent: Sunday, June 12, 2005 6:30 AM
To: user@struts.apache.org
Subject: Re: Test whether an application resource is empty


Doh, I'm an idiot! :-( What I suggested is like trying to call getFoo()
on the resource bundle bean, where 'Foo' is what ever
%=directionToUserKey.toString()% evaluates to. Clearly not what's
needed. The following works for me:

 bean:define id=messages
name=org.apache.struts.action.MESSAGE/
 logic:notEmpty name=messages property=message(errors.cancel)
 pusing Struts bean/logic/p
 /logic:notEmpty

Just replace 'errors.cancel' with '%=directionToUserKey.toString()%' 
and you should be set.

Sorry for the confusion,

L.

Chris Loschen wrote:
 Thanks again, Laurie, but for some reason it still returns false every

 time, even if there is something under that key.  I'm pretty sure I 
 followed your directions exactly:
 
   tiles:useAttribute id=directionToUserKey
 name=directionToUserKey scope=request classname=java.lang.String
 ignore=true/
   
   logic:present name=org.apache.struts.action.MESSAGE
 property=%=directionToUserKey.toString()%
   div class=modFormBoxbean:message 
 key=%=directionToUserKey.toString()%//div
   /logic:present
 
 Although I did have to pull the key back out of the request in my 
 second tile -- do I have to do that here as well? I may have to give 
 up for now, since I have it working the other way, but I'm still 
 curious what I did wrong.
 
 Chris
 
 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
 Sent: Friday, June 10, 2005 2:49 PM
 To: user@struts.apache.org
 Subject: Re: Test whether an application resource is empty
 
 You want to use the name of the attribute the resource bundle is 
 stored under, not the name of the properties file. You're not 
 specifying it in your Struts config so you want the following:
 
logic:present name=org.apache.struts.action.MESSAGE
property=%=directionToUserKey.toString()%
  div class=modFormBox.../div
/logic:present
 
 L.
 
 Chris Loschen wrote:
 
Thanks Laurie,

I tried to set it up this way, but wasn't able to make it work. My 
struts-config file defines the message-resources parameter like so:

  message-resources parameter=ApplicationResources
null=false/

So I tried putting that in, and also tried some variants like 
org.apache.struts.ApplicationResources and 
org.apache.struts.util.MessageResources in code like this:

  tiles:useAttribute id=directionToUserKey
name=directionToUserKey scope=request classname=java.lang.String
ignore=true/
  
  logic:present name=ApplicationResources
property=%=directionToUserKey.toString()%
  div class=modFormBoxbean:message 
key=%=directionToUserKey.toString()%//div
  /logic:present

But it always returned false, even if there was a value for the key, 
so I apparently set up something wrong.

I did get it working using the alternate path, however -- I set up a 
new tile in the tiles-defs file which was defined as a zero-length 
file in the default case and a small JSP for those cases where I had
 
 directions.
 
The calling

RE: Test whether an application resource is empty

2005-06-10 Thread Chris Loschen
Thanks Laurie,

I tried to set it up this way, but wasn't able to make it work. My
struts-config file defines the message-resources parameter like so:

message-resources parameter=ApplicationResources
null=false/

So I tried putting that in, and also tried some variants like
org.apache.struts.ApplicationResources and
org.apache.struts.util.MessageResources in code like this:

tiles:useAttribute id=directionToUserKey
name=directionToUserKey scope=request classname=java.lang.String
ignore=true/

logic:present name=ApplicationResources
property=%=directionToUserKey.toString()%
div class=modFormBoxbean:message
key=%=directionToUserKey.toString()%//div
/logic:present 

But it always returned false, even if there was a value for the key, so
I apparently set up something wrong.

I did get it working using the alternate path, however -- I set up a new
tile in the tiles-defs file which was defined as a zero-length file in
the default case and a small JSP for those cases where I had directions.
The calling JSP looks like this:

tiles:useAttribute id=directionToUserKey
name=directionToUserKey scope=request classname=java.lang.String
ignore=true/

!-- Next is the inserted tile --
tiles:insert attribute=directionToUserTile/

And the inserted tile (when I insert a non-zero-length file) looks like
this:

%
String directionsKey = (String)
request.getAttribute(directionToUserKey);
%

div class=modFormBoxbean:message key=%=directionsKey%//div

That is working ok, though of course I don't have the flexibility of
having a value for some locales and no value for other locales. That's
not terribly important.

By the way, just for my own learning: I initially tried to put the
attribute in page scope, but I kept getting a null value: is page scope
specific to a particular JSP (I would have thought that was tile
scope...), or should it be available throughout the sub-elements of a
given page? It works when I use request scope instead, but is that what
is required here?

Thanks again for everyone's help!

Chris Loschen

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
Sent: Thursday, June 09, 2005 7:07 PM
To: user@struts.apache.org
Subject: Re: Test whether an application resource is empty

Try:

   tiles:useAttribute name=directionToUser ...
   logic:present name=org.apache.struts...
  property=%=directionToUser.toString()%
 div class=modFormBox.../div
   /logic:present

where 'name' is the name of the attribute your resource bundle is stored
under.

L.

Chris Loschen wrote:

 Hi Wendy,
 
 Thank you very much for your reply.
 
 Yes, I also thought that I could test the key, then check to see if 
 the value was empty. But just how to do it is eluding me. I think part

 of the problem might be this:
 
 USAGE NOTE - If you use another tag to create the body content (e.g.
 bean:write), that tag must return a non-empty String. An empty String 
 equates to an empty body or a null String, and a new scripting 
 variable cannot be defined as null. Your bean must return a non-empty 
 String, or the define tag must be wrapped within a logic tag to test 
 for an empty or null value.
 
 (from the Struts User Guide for bean:define at 
 http://struts.apache.org/userGuide/struts-bean.html#define).
 
 I'm trying to do something like
 
   tiles:useAttribute name=directionToUser
 classname=java.lang.String/
   
   bean:define id=directionToUserString
 class=java.lang.String
   bean:message key=%=directionToUser.toString()%/
   /bean:define
 
   logic:notEmpty name=directionToUserString
   div class=modFormBoxbean:write
 name=directionToUserString//div
   /logic:notEmpty
 
 But it's failing (I think) because the bean:message returns an empty 
 String. I would wrap it in a logic tag as suggested, but if I could do

 that, I'd just use the same logic for my logic:notEmpty tag instead. 
 So finding a way to take that value and assign that to a variable 
 which I can then test to see whether or not it's empty is what I'm
trying to do.
 
 It was not my idea to add all of these empty i18n values: the i18n 
 team did it. If I can't find a way to make this idea work, that's my 
 alternate path. If that's the road I need to take, I can do it -- I 
 was just hopeful I could do this a little more elegantly.
 
 Thanks for your input. Any further ideas?
 
 Chris
 
 -Original Message-
 From: Wendy Smoak [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 09, 2005 11:52 AM
 To: Struts Users Mailing List
 Subject: Re: Test whether an application resource is empty
 
 From: Chris Loschen [EMAIL PROTECTED]
 
Quick synopsis: I have localized i18n messages defined in my tiles 
definitions which are sometimes empty. I need to test that the value 
associated with a given key is not empty before I proceed with further
 
 
processing. I can test that the key is non

RE: Test whether an application resource is empty

2005-06-10 Thread Chris Loschen
Thanks again, Laurie, but for some reason it still returns false every
time, even if there is something under that key.  I'm pretty sure I
followed your directions exactly:

tiles:useAttribute id=directionToUserKey
name=directionToUserKey scope=request classname=java.lang.String
ignore=true/

logic:present name=org.apache.struts.action.MESSAGE
property=%=directionToUserKey.toString()%
div class=modFormBoxbean:message
key=%=directionToUserKey.toString()%//div
/logic:present

Although I did have to pull the key back out of the request in my second
tile -- do I have to do that here as well? I may have to give up for
now, since I have it working the other way, but I'm still curious what I
did wrong.

Chris 

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
Sent: Friday, June 10, 2005 2:49 PM
To: user@struts.apache.org
Subject: Re: Test whether an application resource is empty

You want to use the name of the attribute the resource bundle is stored
under, not the name of the properties file. You're not specifying it in
your Struts config so you want the following:

   logic:present name=org.apache.struts.action.MESSAGE
   property=%=directionToUserKey.toString()%
 div class=modFormBox.../div
   /logic:present

L.

Chris Loschen wrote:
 Thanks Laurie,
 
 I tried to set it up this way, but wasn't able to make it work. My 
 struts-config file defines the message-resources parameter like so:
 
   message-resources parameter=ApplicationResources
 null=false/
 
 So I tried putting that in, and also tried some variants like 
 org.apache.struts.ApplicationResources and 
 org.apache.struts.util.MessageResources in code like this:
 
   tiles:useAttribute id=directionToUserKey
 name=directionToUserKey scope=request classname=java.lang.String
 ignore=true/
   
   logic:present name=ApplicationResources
 property=%=directionToUserKey.toString()%
   div class=modFormBoxbean:message 
 key=%=directionToUserKey.toString()%//div
   /logic:present
 
 But it always returned false, even if there was a value for the key, 
 so I apparently set up something wrong.
 
 I did get it working using the alternate path, however -- I set up a 
 new tile in the tiles-defs file which was defined as a zero-length 
 file in the default case and a small JSP for those cases where I had
directions.
 The calling JSP looks like this:
 
   tiles:useAttribute id=directionToUserKey
 name=directionToUserKey scope=request classname=java.lang.String
 ignore=true/
   
   !-- Next is the inserted tile --
   tiles:insert attribute=directionToUserTile/
 
 And the inserted tile (when I insert a non-zero-length file) looks 
 like
 this:
 
 %
   String directionsKey = (String)
 request.getAttribute(directionToUserKey);
 %
 
 div class=modFormBoxbean:message key=%=directionsKey%//div
 
 That is working ok, though of course I don't have the flexibility of 
 having a value for some locales and no value for other locales. That's

 not terribly important.
 
 By the way, just for my own learning: I initially tried to put the 
 attribute in page scope, but I kept getting a null value: is page 
 scope specific to a particular JSP (I would have thought that was tile

 scope...), or should it be available throughout the sub-elements of a 
 given page? It works when I use request scope instead, but is that 
 what is required here?
 
 Thanks again for everyone's help!
 
 Chris Loschen
 
 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
 Sent: Thursday, June 09, 2005 7:07 PM
 To: user@struts.apache.org
 Subject: Re: Test whether an application resource is empty
 
 Try:
 
tiles:useAttribute name=directionToUser ...
logic:present name=org.apache.struts...
   property=%=directionToUser.toString()%
  div class=modFormBox.../div
/logic:present
 
 where 'name' is the name of the attribute your resource bundle is 
 stored under.
 
 L.
 
 Chris Loschen wrote:
 
 
Hi Wendy,

Thank you very much for your reply.

Yes, I also thought that I could test the key, then check to see if 
the value was empty. But just how to do it is eluding me. I think part
 
 
of the problem might be this:

USAGE NOTE - If you use another tag to create the body content (e.g.
bean:write), that tag must return a non-empty String. An empty String 
equates to an empty body or a null String, and a new scripting 
variable cannot be defined as null. Your bean must return a non-empty 
String, or the define tag must be wrapped within a logic tag to test 
for an empty or null value.

(from the Struts User Guide for bean:define at 
http://struts.apache.org/userGuide/struts-bean.html#define).

I'm trying to do something like

  tiles:useAttribute name=directionToUser
classname=java.lang.String/
  
  bean:define id=directionToUserString
class=java.lang.String
  bean:message key

RE: Test whether an application resource is empty

2005-06-09 Thread Chris Loschen
I'm sorry to keep sending this over and over again, but I'm really
stuck. If this isn't possible, could someone let me know? Then I could
try to find an alternate path.

Chris 

-Original Message-
From: Chris Loschen 
Sent: Wednesday, June 08, 2005 5:09 PM
To: Struts Users Mailing List
Subject: RE: Test whether an application resource is empty

I'm still spinning my wheels on this -- does anyone have any ideas?

Quick synopsis: I have localized i18n messages defined in my tiles
definitions which are sometimes empty. I need to test that the value
associated with a given key is not empty before I proceed with further
processing. I can test that the key is non-empty, but I haven't yet
figured out how to test the same thing for the value. If anyone could
help, I'd really appreciate it.

Thanks!

Chris

-Original Message-
From: Chris Loschen
Sent: Wednesday, June 08, 2005 1:12 PM
To: Struts Users Mailing List
Subject: Test whether an application resource is empty

Hi all,

I'm using struts 1.1.

I have localized application resources keys defined in my tiles
definition file. In my JSP, I use the tiles attribute and then display
the localized message using the key.

However, in some cases, the localized value is empty: there is no value
for that particular locale or that particular instance. In those cases,
I want to avoid writing out the key at all, but I'm having trouble
figuring out how to make that test.

Specifically, I have tiles defs like this:

definition name=.manageHierarchy.billing.details
extends=.template.manageHierarchy.billing
put name=directionToUser
value=tiles.module.admin.manageHierarchy.billing.details.directionToUse
r/
Etc.
/definition

And the localized values are something like

tiles.main.admin.manageHierarchy.businessStruc.add.directionToUser=

(so no value for that key).  

In my JSP, I've tried several ways to test whether the key value is null
or the length is 0, but none of them have worked yet. For example:

tiles:useAttribute id=directionToUser name=directionToUser
classname=java.lang.String ignore=true/ % if(directionToUser !=
null  directionToUser.length()0){ %
div class=modFormBoxbean:message
key=%=directionToUser.toString()%//div
%
}%

Problem here is that directionToUser is the key, not the value, so it's
never null, and I get the empty div tags I'm trying to avoid. So I tried
variations like this:

tiles:useAttribute name=directionToUser
classname=java.lang.String/

bean:define id=directionToUserString
bean:message name=directionToUser/
/bean:define

logic:notEmpty name=directionToUserString
div class=modFormBoxbean:write
name=directionToUserString//div
/logic:notEmpty

That one returned Define tag can contain only one of name attribute,
value attribute, or body content. I've tried lots of variations similar
to that, but haven't struck upon the right one yet. This SEEMS like
something which should be pretty simple, but I'm missing something. Any
suggestions? Thanks!
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]



RE: Test whether an application resource is empty

2005-06-09 Thread Chris Loschen
Hi Wendy,

Thank you very much for your reply.

Yes, I also thought that I could test the key, then check to see if the
value was empty. But just how to do it is eluding me. I think part of
the problem might be this:

USAGE NOTE - If you use another tag to create the body content (e.g.
bean:write), that tag must return a non-empty String. An empty String
equates to an empty body or a null String, and a new scripting variable
cannot be defined as null. Your bean must return a non-empty String, or
the define tag must be wrapped within a logic tag to test for an empty
or null value.

(from the Struts User Guide for bean:define at
http://struts.apache.org/userGuide/struts-bean.html#define).

I'm trying to do something like

tiles:useAttribute name=directionToUser
classname=java.lang.String/

bean:define id=directionToUserString
class=java.lang.String
bean:message key=%=directionToUser.toString()%/
/bean:define

logic:notEmpty name=directionToUserString
div class=modFormBoxbean:write
name=directionToUserString//div
/logic:notEmpty 

But it's failing (I think) because the bean:message returns an empty
String. I would wrap it in a logic tag as suggested, but if I could do
that, I'd just use the same logic for my logic:notEmpty tag instead. So
finding a way to take that value and assign that to a variable which I
can then test to see whether or not it's empty is what I'm trying to do.

It was not my idea to add all of these empty i18n values: the i18n team
did it. If I can't find a way to make this idea work, that's my
alternate path. If that's the road I need to take, I can do it -- I was
just hopeful I could do this a little more elegantly.

Thanks for your input. Any further ideas?

Chris

-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 09, 2005 11:52 AM
To: Struts Users Mailing List
Subject: Re: Test whether an application resource is empty

From: Chris Loschen [EMAIL PROTECTED]
 Quick synopsis: I have localized i18n messages defined in my tiles 
 definitions which are sometimes empty. I need to test that the value 
 associated with a given key is not empty before I proceed with further

 processing. I can test that the key is non-empty, but I haven't yet 
 figured out how to test the same thing for the value.

If you can test the key, then it would seem that removing the empty
messages would solve the problem.  Why are the empty ones there in the
first place?
Can you get rid of them?

--
Wendy Smoak


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





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



RE: Test whether an application resource is empty

2005-06-09 Thread Chris Loschen
Thanks for your help, Paul.

I'm trying that, but I'm getting the same results as I did when I used
tiles:useAttribute .../ originally. That is, I'm getting the key, not
the value, so I still need to get the value to determine whether it's
empty. But when I try to define a bean as the value of bean:message
key=.../, it fails when that value is empty (which is what I was
trying to check for in the first place!).

The project I'm working on is using struts 1.1, so I don't think I have
access to the EL tags -- am I mistaken?

Chris

-Original Message-
From: Benedict, Paul C [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 09, 2005 12:17 PM
To: 'Struts Users Mailing List'
Subject: RE: Test whether an application resource is empty

Chris,

Use tiles:importAttribute  ignore=true to bring in the key.
You can then use EL to test if it is empty or whatever.

Thanks,
Paul

-Original Message-
From: Chris Loschen [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 09, 2005 11:37 AM
To: Struts Users Mailing List
Subject: RE: Test whether an application resource is empty
Importance: High


I'm sorry to keep sending this over and over again, but I'm really
stuck. If this isn't possible, could someone let me know? Then I could
try to find an alternate path.

Chris 

-Original Message-
From: Chris Loschen 
Sent: Wednesday, June 08, 2005 5:09 PM
To: Struts Users Mailing List
Subject: RE: Test whether an application resource is empty

I'm still spinning my wheels on this -- does anyone have any ideas?

Quick synopsis: I have localized i18n messages defined in my tiles
definitions which are sometimes empty. I need to test that the value
associated with a given key is not empty before I proceed with further
processing. I can test that the key is non-empty, but I haven't yet
figured out how to test the same thing for the value. If anyone could
help, I'd really appreciate it.

Thanks!

Chris

-Original Message-
From: Chris Loschen
Sent: Wednesday, June 08, 2005 1:12 PM
To: Struts Users Mailing List
Subject: Test whether an application resource is empty

Hi all,

I'm using struts 1.1.

I have localized application resources keys defined in my tiles
definition file. In my JSP, I use the tiles attribute and then display
the localized message using the key.

However, in some cases, the localized value is empty: there is no value
for that particular locale or that particular instance. In those cases,
I want to avoid writing out the key at all, but I'm having trouble
figuring out how to make that test.

Specifically, I have tiles defs like this:

definition name=.manageHierarchy.billing.details
extends=.template.manageHierarchy.billing
put name=directionToUser
value=tiles.module.admin.manageHierarchy.billing.details.directionToUse
r/
Etc.
/definition

And the localized values are something like

tiles.main.admin.manageHierarchy.businessStruc.add.directionToUser=

(so no value for that key).  

In my JSP, I've tried several ways to test whether the key value is null
or the length is 0, but none of them have worked yet. For example:

tiles:useAttribute id=directionToUser name=directionToUser
classname=java.lang.String ignore=true/ % if(directionToUser !=
null  directionToUser.length()0){ %
div class=modFormBoxbean:message
key=%=directionToUser.toString()%//div
%
}%

Problem here is that directionToUser is the key, not the value, so it's
never null, and I get the empty div tags I'm trying to avoid. So I tried
variations like this:

tiles:useAttribute name=directionToUser
classname=java.lang.String/

bean:define id=directionToUserString
bean:message name=directionToUser/
/bean:define

logic:notEmpty name=directionToUserString
div class=modFormBoxbean:write
name=directionToUserString//div
/logic:notEmpty

That one returned Define tag can contain only one of name attribute,
value attribute, or body content. I've tried lots of variations similar
to that, but haven't struck upon the right one yet. This SEEMS like
something which should be pretty simple, but I'm missing something. Any
suggestions? Thanks!
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]






--
Notice:  This e-mail

RE: Pb with html:link

2005-06-08 Thread Chris Loschen
Did you include a taglib reference in headerRecherche.jsp? Something
like this:

%@ page language=java%
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean%
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic%

In this case, you need the html taglib for your html:link to work.

Hope that helps!

Chris Loschen

-Original Message-
From: JM Tinghir [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 08, 2005 3:39 AM
To: Struts Users Mailing List
Subject: Pb with html:link

Hello,
I have a JSP (resultat.jsp) in which there's :
html:link page=/suppression.doSuppression/html:link
This is working perfectly.

This JSP includes another one :
jsp:include page=template/headerRecherche.jsp/
This is still working perfectly.

But when I put the html:link in the headerRecherche.jsp , I get a
NullPointerException...
And this is not working perfectly anymore! ;-)

In my struts-config.xml, I have :
action
path=/suppression
forward=/jsp/suppression.jsp/

Thanks for your help.

Jean-Marie Tinghir

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





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



RE: Test whether an application resource is empty

2005-06-08 Thread Chris Loschen
I'm still spinning my wheels on this -- does anyone have any ideas?

Quick synopsis: I have localized i18n messages defined in my tiles
definitions which are sometimes empty. I need to test that the value
associated with a given key is not empty before I proceed with further
processing. I can test that the key is non-empty, but I haven't yet
figured out how to test the same thing for the value. If anyone could
help, I'd really appreciate it.

Thanks!

Chris

-Original Message-
From: Chris Loschen 
Sent: Wednesday, June 08, 2005 1:12 PM
To: Struts Users Mailing List
Subject: Test whether an application resource is empty

Hi all,

I'm using struts 1.1.

I have localized application resources keys defined in my tiles
definition file. In my JSP, I use the tiles attribute and then display
the localized message using the key.

However, in some cases, the localized value is empty: there is no value
for that particular locale or that particular instance. In those cases,
I want to avoid writing out the key at all, but I'm having trouble
figuring out how to make that test.

Specifically, I have tiles defs like this:

definition name=.manageHierarchy.billing.details
extends=.template.manageHierarchy.billing
put name=directionToUser
value=tiles.module.admin.manageHierarchy.billing.details.directionToUse
r/
Etc.
/definition

And the localized values are something like

tiles.main.admin.manageHierarchy.businessStruc.add.directionToUser=

(so no value for that key).  

In my JSP, I've tried several ways to test whether the key value is null
or the length is 0, but none of them have worked yet. For example:

tiles:useAttribute id=directionToUser name=directionToUser
classname=java.lang.String ignore=true/ % if(directionToUser !=
null  directionToUser.length()0){ %
div class=modFormBoxbean:message
key=%=directionToUser.toString()%//div
%
}%

Problem here is that directionToUser is the key, not the value, so it's
never null, and I get the empty div tags I'm trying to avoid. So I tried
variations like this:

tiles:useAttribute name=directionToUser
classname=java.lang.String/

bean:define id=directionToUserString
bean:message name=directionToUser/
/bean:define

logic:notEmpty name=directionToUserString
div class=modFormBoxbean:write
name=directionToUserString//div
/logic:notEmpty

That one returned Define tag can contain only one of name attribute,
value attribute, or body content. I've tried lots of variations similar
to that, but haven't struck upon the right one yet. This SEEMS like
something which should be pretty simple, but I'm missing something. Any
suggestions? Thanks!
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.

___
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.



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



Populating a new form bean and passing it on to the next request

2005-05-25 Thread Chris Loschen
Hi all,

I'm using Struts 1.1. I've got some forgot password functionality
working, and the last piece of that is to set a new password for the
user who has successfully answered their security question. For that
action, I use a forgotPasswordForm form bean, which goes to my
newPasswordAction. That's all working fine, and the new password is
getting saved to the DB as expected. Now I'd like to take that username
and new password and pass them over to my normal login action, so that
the user doesn't have to reenter their username and password again: they
just get logged in normally. The loginAction needs the loginForm, so I'm
instantiating a loginForm, populating with the new username and
password, and then saving it to the request object in my
newPasswordAction. However, I always get a validation error saying that
username and password are required, so I've got something wrong
someplace. Does anyone see it?

Here's the new code in setPasswordAction:

LoginForm loginForm = new LoginForm();
loginForm.setUser(userID);
 
loginForm.setPassword(forgotPasswordForm.getNewPassword());
request.setAttribute(loginForm, loginForm);

Here are some fragments of struts-config.xml:

form-bean name=loginForm
type=com.xxx.application.tbm.core.forms.LoginForm/

action path=/login/perform
type=com.xxx.application.tsm.common.actions.LoginAction
name=loginForm scope=request validate=true input=login
forward name=success
path=/disclaimer/show.do redirect=true/
forward name=error path=/login/show.do
redirect=true/
/action

action path=/forgot/setNewPwd
type=com.xxx.application.tbm.b2b.actions.NewPasswordAction
name=forgotPasswordNewForm scope=request validate=true
input=forgot_password_setNew
forward name=success
path=/login/perform.do/
forward name=error
path=.main.forgot.setNewPwd/
/action

loginForm extends ValidatorForm, and both user and password are required
in validation.xml, which is where my error messages appear to be coming
from.

I tried using a fully qualified name for loginForm (as in the form-bean
declaration), but that didn't help either. Any suggestions? Thanks!

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.


RE: Populating a new form bean and passing it on to the next request

2005-05-25 Thread Chris Loschen
 Thanks Erik,

Actually, my login action is rather complex, and gets called by several
other apps which I don't have control over, so I'd rather not just
duplicate the code: somebody else might change it at some point, and
then I'd be in trouble. Both the login action and my action already
extend a base class, but there again I'd be messing with code that has
implications over a very large codebase. I suppose I could have a base
class that extends that mutual base and have both of these extend that,
but instead, I tried a different approach your reply suggested to me. 

I had my newPasswordAction class extend LoginAction. That way both
classes inherited the mutual base class, and I was able to call the
login action via a call to the super like so:

//set loginForm parameters to request to enable
bypassing login page 
LoginForm loginForm = new LoginForm();
loginForm.setUser(userID);
 
loginForm.setPassword(forgotPasswordForm.getNewPassword());
request.setAttribute(loginForm, loginForm);

//log the user in
forward = super.doAction(mapping, loginForm, request,
response);

I'm testing the results now, but it seems to be working. Thanks for your
help!

Chris

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 25, 2005 4:46 PM
To: Struts Users Mailing List
Subject: Re: Populating a new form bean and passing it on to the next
request

Sorry this doesn't answer your question directly, but I would back up a
bit and question your design.

Rather than try to invoke your LoginAction manually from another action,
I would just invoke all the necessary methods in your
ForgotPasswordAction. Presumably logging on is little more than a call
to the manager layer and a session attribute setting (not counting form
validation). Actions are not really meant to be reusable components. If
you have several view-related methods you need to invoke at logon time,
put those methods in a base class that LogonAction and
ForgotPasswordAction extend. Otherwise, a small amount of redundant
logic from Action to Action is not a bad thing.

I think this would remove the problem you are describing. But of course,
I'm making a lot of assumptions.

Hope that helps,
Erik


-Original Message-
From: Chris Loschen [EMAIL PROTECTED]
Sent: May 25, 2005 4:35 PM
To: Struts Users Mailing List user@struts.apache.org
Subject: Populating a new form bean and passing it on to the next
request

Hi all,

I'm using Struts 1.1. I've got some forgot password functionality
working, and the last piece of that is to set a new password for the
user who has successfully answered their security question. For that
action, I use a forgotPasswordForm form bean, which goes to my
newPasswordAction. That's all working fine, and the new password is
getting saved to the DB as expected. Now I'd like to take that username
and new password and pass them over to my normal login action, so that
the user doesn't have to reenter their username and password again: they
just get logged in normally. The loginAction needs the loginForm, so I'm
instantiating a loginForm, populating with the new username and
password, and then saving it to the request object in my
newPasswordAction. However, I always get a validation error saying that
username and password are required, so I've got something wrong
someplace. Does anyone see it?

Here's the new code in setPasswordAction:

LoginForm loginForm = new LoginForm();
loginForm.setUser(userID);
 
loginForm.setPassword(forgotPasswordForm.getNewPassword());
request.setAttribute(loginForm, loginForm);

Here are some fragments of struts-config.xml:

form-bean name=loginForm
type=com.xxx.application.tbm.core.forms.LoginForm/

action path=/login/perform
type=com.xxx.application.tsm.common.actions.LoginAction
name=loginForm scope=request validate=true input=login
forward name=success
path=/disclaimer/show.do redirect=true/
forward name=error path=/login/show.do
redirect=true/
/action

action path=/forgot/setNewPwd
type=com.xxx.application.tbm.b2b.actions.NewPasswordAction
name=forgotPasswordNewForm scope=request validate=true
input=forgot_password_setNew
forward name=success
path=/login/perform.do/
forward name=error
path=.main.forgot.setNewPwd/
/action

loginForm extends ValidatorForm, and both user and password are required
in validation.xml, which is where my error messages appear to be coming
from.

I tried using a fully qualified name for loginForm (as in the form-bean
declaration), but that didn't help either. Any suggestions? Thanks!

Chris Loschen


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

This e-mail message is for the sole use

RE: Populating a new form bean and passing it on to the next request

2005-05-25 Thread Chris Loschen
Yes, quite possibly that was the problem. You'll see in my reply to Erik
how I got around the issue. Thanks for your help!

Chris 

-Original Message-
From: meyawn [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 25, 2005 4:53 PM
To: Struts Users Mailing List
Subject: RE: Populating a new form bean and passing it on to the next
request

you set stuff in your request object..but for the login form another
request object is created and it has a seperate instance of loginForm..i
am a bit rusty with struts, pls correct me if i am wrong

-Original Message-
From: Chris Loschen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 25, 2005 11:35 PM
To: Struts Users Mailing List
Subject: Populating a new form bean and passing it on to the next
request


Hi all,

I'm using Struts 1.1. I've got some forgot password functionality
working, and the last piece of that is to set a new password for the
user who has successfully answered their security question. For that
action, I use a forgotPasswordForm form bean, which goes to my
newPasswordAction. That's all working fine, and the new password is
getting saved to the DB as expected. Now I'd like to take that username
and new password and pass them over to my normal login action, so that
the user doesn't have to reenter their username and password again: they
just get logged in normally. The loginAction needs the loginForm, so I'm
instantiating a loginForm, populating with the new username and
password, and then saving it to the request object in my
newPasswordAction. However, I always get a validation error saying that
username and password are required, so I've got something wrong
someplace. Does anyone see it?

Here's the new code in setPasswordAction:

LoginForm loginForm = new LoginForm();
loginForm.setUser(userID);

loginForm.setPassword(forgotPasswordForm.getNewPassword());
request.setAttribute(loginForm, loginForm);

Here are some fragments of struts-config.xml:

form-bean name=loginForm
type=com.xxx.application.tbm.core.forms.LoginForm/

action path=/login/perform
type=com.xxx.application.tsm.common.actions.LoginAction
name=loginForm scope=request validate=true input=login
forward name=success
path=/disclaimer/show.do redirect=true/
forward name=error path=/login/show.do
redirect=true/
/action

action path=/forgot/setNewPwd
type=com.xxx.application.tbm.b2b.actions.NewPasswordAction
name=forgotPasswordNewForm scope=request validate=true
input=forgot_password_setNew
forward name=success
path=/login/perform.do/
forward name=error
path=.main.forgot.setNewPwd/
/action

loginForm extends ValidatorForm, and both user and password are required
in validation.xml, which is where my error messages appear to be coming
from.

I tried using a fully qualified name for loginForm (as in the form-bean
declaration), but that didn't help either. Any suggestions? Thanks!

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]





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



RE: html:img question

2005-05-25 Thread Chris Loschen
html:img page=/images/logo.gif altKey=alt.logo /

Hope that helps!

Chris Loschen 

-Original Message-
From: Aladin Alaily [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 25, 2005 6:39 PM
To: Struts Users Mailing List
Subject: html:img question

Hi Guys,

Maybe I've been working too long... but I can't seem to figure out the
following.

I am trying to create an html:img tag and dynamically set the alt
attribute with the application properties file... but it doesn't seem to
work.

Here is what I'm doing:

html:img page=/images/logo.gif alt='bean:write key=alt.logo /' /

and in my application.properties file I have:

alt.logo=This is alt text


Now, I would expect that the tag generated by html:img as defined
above would be:
img src=.. alt=This is alt text

But I don't !?!

Has anyone encountered this problem before... and how did you resolve
it?

Thanks.
Aladin




meyawn wrote:

 well, when you uncheck a checkbox, there is nothing passed to your 
 form. so your form doesnt know which checkboxes are there on your page

 that are unchecked. it knows only about the boxes you checked. so i 
 guess you have to reset your form after it has inited?? not very sure
 
 -Original Message-
 From: Apte, Dhanashree (Noblestar) [mailto:[EMAIL PROTECTED]
 Sent: Thursday, May 26, 2005 12:21 AM
 To: 'Struts Users Mailing List'
 Subject: html:multibox question
 
 
 
 I have a page that has a series of check-boxes that a user can 
 select/deselect at will. When the page loads up, some of the 
 checkboxes are already checked. The user can then either select new 
 ones or deselect existing ones. However, when I submit the page, the 
 unselected ones are still a part of my selectedItems[] array.
 
 How do I make sure that only the selected ones get through?
 
 Thanks a bunch,
 Dhanashree/
 
 
 
 -
 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]





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



RE: Combining html:image and bean:define

2005-05-04 Thread Chris Loschen
Thanks very much -- that's much more straightforward! I'm starting to
find the same problem in a series of other pages as well, so I'm putting
your solution to a lot of use right away. I appreciate the help.

Chris 

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 03, 2005 6:22 PM
To: Struts Users Mailing List
Subject: Re: Combining html:image and bean:define

Chris,

Firstly, it looks like hard work using an input type=image and then
defining  an onclick event - why don't you just wrap a link around an
image - i.e. something like...
  a href=...img src=//a

Secondly, struts provides the pageKey and titleKey attributes on the
html:img and html:image tags which make it easier to use message
resources for the src and title attributes.

Putting that all together, how about the following

html:link action=/main_edit.do
   paramName=hierarchyTreeForm
   paramProperty=nodeId
   paramId=nodeId
 html:img pageKey=image.common.button.cancel
 
titleKey=jsp.hierarchy.bs_detailsJsp.details.cancel_title/
/html:link

http://struts.apache.org/userGuide/struts-html.html#link
http://struts.apache.org/userGuide/struts-html.html#image
http://struts.apache.org/userGuide/struts-html.html#img

Niall

- Original Message -
From: Chris Loschen [EMAIL PROTECTED]
Sent: Tuesday, May 03, 2005 9:55 PM


Responding to my own question, I did manage to get this working by doing
this:

bean:define id=nodeid name=hierarchyTreeForm property=nodeId /
bean:define id=requestPath value=%=request.getContextPath()% /
bean:define id=cancel_pagebean:message
key=image.common.button.cancel//bean:define
bean:define id=cancel_titlebean:message
key=jsp.hierarchy.bs_detailsJsp.details.cancel_title//bean:define
input type=image title=%=cancel_title%
src=%=requestPath%%=cancel_page% onclick=return
doAction('%=requestPath%/hierarchy/business/main_edit.do?nodeId=%=nod
eid%','') /

Is that the best way to do it? (It works, which is the main thing, but
if there's a more efficient method, please let me know...)

-Original Message-
From: Chris Loschen
To: Struts Users Mailing List

Hi all,

I'm using Struts 1.1, and just received from another team updates to a
JSP page that look like this:

bean:define id=nodeid name=hierarchyTreeForm property=nodeId /
bean:define id=requestPath value=%=request.getContextPath()% /
html:image pageKey=image.common.button.cancel
titleKey=jsp.hierarchy.bs_detailsJsp.details.cancel_title
onclick=return
doAction('%=requestPath%/hierarchy/business/main_edit.do?nodeId=%=nod
eid%','')
/

However, these aren't working -- in the source of the generated HTML,
the JSP tags are not getting converted to the appropriate scripting
variable and are just getting rendered as-is. I checked and the defined
beans are fine, just not when they're used inside the html:image tag.

I gather than I cannot combine JSP tags and Struts tags, but I don't see
how I can avoid it in this situation: we need the localization elements,
and we also need the specific variables. There has got to be a way
around this -- any suggestions?



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





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



Combining html:image and bean:define

2005-05-03 Thread Chris Loschen
Hi all,

I'm using Struts 1.1, and just received from another team updates to a
JSP page that look like this:

bean:define id=nodeid name=hierarchyTreeForm property=nodeId /
bean:define id=requestPath value=%=request.getContextPath()% /
html:image pageKey=image.common.button.cancel
titleKey=jsp.hierarchy.bs_detailsJsp.details.cancel_title
onclick=return
doAction('%=requestPath%/hierarchy/business/main_edit.do?nodeId=%=nod
eid%','')
/

However, these aren't working -- in the source of the generated HTML,
the JSP tags are not getting converted to the appropriate scripting
variable and are just getting rendered as-is. I checked and the defined
beans are fine, just not when they're used inside the html:image tag.

I gather than I cannot combine JSP tags and Struts tags, but I don't see
how I can avoid it in this situation: we need the localization elements,
and we also need the specific variables. There has got to be a way
around this -- any suggestions?

Thanks!

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.


RE: Combining html:image and bean:define

2005-05-03 Thread Chris Loschen
Responding to my own question, I did manage to get this working by doing
this:

bean:define id=nodeid name=hierarchyTreeForm property=nodeId /
bean:define id=requestPath value=%=request.getContextPath()% /
bean:define id=cancel_pagebean:message
key=image.common.button.cancel//bean:define
bean:define id=cancel_titlebean:message
key=jsp.hierarchy.bs_detailsJsp.details.cancel_title//bean:define
input type=image title=%=cancel_title%
src=%=requestPath%%=cancel_page% onclick=return
doAction('%=requestPath%/hierarchy/business/main_edit.do?nodeId=%=nod
eid%','') / 

Is that the best way to do it? (It works, which is the main thing, but
if there's a more efficient method, please let me know...)

Thanks again!

Chris Loschen

-Original Message-
From: Chris Loschen 
Sent: Tuesday, May 03, 2005 4:13 PM
To: Struts Users Mailing List
Subject: Combining html:image and bean:define

Hi all,

I'm using Struts 1.1, and just received from another team updates to a
JSP page that look like this:

bean:define id=nodeid name=hierarchyTreeForm property=nodeId /
bean:define id=requestPath value=%=request.getContextPath()% /
html:image pageKey=image.common.button.cancel
titleKey=jsp.hierarchy.bs_detailsJsp.details.cancel_title
onclick=return
doAction('%=requestPath%/hierarchy/business/main_edit.do?nodeId=%=nod
eid%','')
/

However, these aren't working -- in the source of the generated HTML,
the JSP tags are not getting converted to the appropriate scripting
variable and are just getting rendered as-is. I checked and the defined
beans are fine, just not when they're used inside the html:image tag.

I gather than I cannot combine JSP tags and Struts tags, but I don't see
how I can avoid it in this situation: we need the localization elements,
and we also need the specific variables. There has got to be a way
around this -- any suggestions?

Thanks!

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.

___
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.



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