TagSupport - how to get request attribute

2005-11-04 Thread Andrzej Bengner

Hello,

I have one problem with access to attribute in request in my class from 
TagSupport.
I send GET to my site (eg. http://localhost/app/site.jsp?Test=value). 
How to get this Test attribute in my class?


I tried:

TagUtils.getInstance().lookup(pageContext,Test, null);
pageContext.findAttribute(Test);

ServletRequest request = pageContext.getRequest();
request.getAttribute(Test);

... and all of this returns null.

Regards

--
Andy


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



STRUTS AND JAVADOC.

2005-11-04 Thread Søren Blidorf
Hi.

I am making a JAVADOC of my STRUTS project.

Is there a way I can get the STRUTS forwards ect in the JAVADOC.

If I haven't made my self clear, please ask. I NEED HELP, I am new to
JAVADOC :)

BR

Soren, DK




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



RE: TagSupport - how to get request attribute

2005-11-04 Thread Vishal Dalal

try request.getParameter(ParameterName);

-Original Message-
From: Andrzej Bengner [mailto:[EMAIL PROTECTED]
Sent: Friday, November 04, 2005 4:56 PM
To: user@struts.apache.org
Subject: TagSupport - how to get request attribute


Hello,

I have one problem with access to attribute in request in my class from 
TagSupport.
I send GET to my site (eg. http://localhost/app/site.jsp?Test=value). 
How to get this Test attribute in my class?

I tried:

TagUtils.getInstance().lookup(pageContext,Test, null);
pageContext.findAttribute(Test);

ServletRequest request = pageContext.getRequest();
request.getAttribute(Test);

... and all of this returns null.

Regards

-- 
Andy


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

Make your callers hear anything you like.Call 456 say DIALER TONES.

An idea can change your life. 

** LEGAL DISCLAIMER 
This E-Mail may contain Confidential and/or legally privileged Information and 
is meant for the intended recipient(s) only. If you have received this e-mail 
in error and are not the intended recipient/s, kindly notify us at [EMAIL 
PROTECTED] and then delete this e-mail immediately from your system. You are 
also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification, distribution and/or publication of this 
e-mail, its contents or its attachment/s other than by its intended recipient/s 
is strictly prohibited and may be unlawful.

Internet Communications cannot be guaranteed to be secure or error-free as 
information could be delayed, intercepted, corrupted, lost, or contain viruses. 
IDEA Cellular Limited does not accept any liability for any errors, omissions, 
viruses or computer problems experienced by any recipient as a result of this 
e-mail.

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



Re: TagSupport - how to get request attribute

2005-11-04 Thread Andrzej Bengner

try request.getParameter(ParameterName);


Thanks, that's OK :-)

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



Re: TagSupport - how to get request attribute

2005-11-04 Thread Xavier Vanderstukken

${request['ParameterName']}

Andrzej Bengner wrote:


try request.getParameter(ParameterName);



Thanks, that's OK :-)

-
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: TagSupport - how to get request attribute

2005-11-04 Thread Martin Gainty

Andrei-

This is straight from the doc!
*This assumes you have configured your backing bean*

 * @param pageContext Page context to be searched
954  * @param name Name of the bean to be retrieved
955  * @param scopeName Scope to be searched (page, request, session, 
application)

956  *  or codenull/code to use codefindAttribute()/code instead
957  * @return JavaBean in the specified page context
958  * @exception JspException if an invalid scope name
959  *  is requested
960  */
961 public Object lookup(PageContext pageContext, String name, String 
scopeName)


dobranoc,
Martin-

- Original Message - 
From: Andrzej Bengner [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Friday, November 04, 2005 6:25 AM
Subject: TagSupport - how to get request attribute



Hello,

I have one problem with access to attribute in request in my class from 
TagSupport.
I send GET to my site (eg. http://localhost/app/site.jsp?Test=value). How 
to get this Test attribute in my class?


I tried:

TagUtils.getInstance().lookup(pageContext,Test, null);
pageContext.findAttribute(Test);

ServletRequest request = pageContext.getRequest();
request.getAttribute(Test);

... and all of this returns null.

Regards

--
Andy


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



How to get ACCESS to Locale in TAG class

2005-11-04 Thread Łukasz Piątkowski

Hello !

   I have a problem with accessing LOCALE in my TAG class. When I want 
to get LOCALE in my ACTION class I use :


request.getSession().getAttribute(Globals.LOCALE_KEY) - and it works fine

in my TAG class I use :

pageContext.getSession().getAttribute(Globals.LOCALE_KEY) - it is null

This is the fragment of my code :
if(pageContext.getSession().getAttribute(Globals.LOCALE_KEY)!=null)
   {
   
loc=(Locale)pageContext.getSession().getAttribute(Globals.LOCALE_KEY);

   lwriter.print(SESSION LOCALE);
   }
   else
   {
   loc=Locale.getDefault();
   lwriter.print(SERVER LOCALE);
   }

It always returning SERVER LOCALE :(

Please HELP !

Kind Regards, Lukasz


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



Client Side Validator Fails When Submit from Javascript

2005-11-04 Thread Jim Reynolds
I have been playing with the client-side validation, and ran into a
problem last night that I can docuemnt, but cannot figure out why it
fails.

The below file, shows a form and when you hit the submit, presents the
appropriate alert box with the proper message. All is good, and works
when the submit is pressed.

But if you try and use a javascript:document.form.submit(), the
document is submitted but the alert does NOT work. So basically the
validation fails.

I have tried multiple ideas, and all have not worked. But I really
need the ability to do submits from a javascript: Technically, I was
unare of any difference between a submit button, and a submit form
using the javascript:

Anyone?

Here is the jsp page, in case one sees something odd:

%@ include file=/tags.jsp %

html:html locale=true
head
titlefyi/title
html:base/
/head
body bgcolor=white
html:form action=/AddressJavascriptValidation method=post
onsubmit=return validateAddressForm(this);

td align=center colspan=2
font size=4bPlease Enter the Following Details/b/font
/tr
tr
td align=right
bName/b
/td
td align=left
html:text property=name size=30 maxlength=30/
/td
/tr
tr
td align=right
bAddress/b
/td
td align=left
html:text property=address size=30 maxlength=30/
/td
/tr


// HERE IS A LINK USING SIMPLE JAVASCRIPT TO SUBMIT THAT
// FAILS.

a href=javascript:document.AddressForm.submit()doit/a

tr
td align=right
bE-mail address/b
/td
td align=left
html:text property=emailAddress size=30 maxlength=30/
/td
/tr

tr
td align=right
html:submitSave/html:submit
/td
td align=left
html:cancelCancel/html:cancel
/td
/tr
/table
/div

!-- Begin Validator Javascript Function--
html:javascript formName=AddressForm/
!-- End of Validator Javascript Function--

/html:form
/body
/html:html

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



sorting of table columns

2005-11-04 Thread fea jabi
can we sort table columns when clicked on the column header using struts? I 
mean does struts provide any tag to do so?


is there an example on how this can be done?

Thanks.

_
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/



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



Validation Question how to echo back users input in error message?

2005-11-04 Thread Troy Bull

I am using the struts validator and it works almost exactly the way I want.


Say I have a field tf and the value is ABC

I want to do a validation requiring it to be an integer and return the 
following error message: tf must be an integer.


I can do all this pretty easily here is the code that does it:

in ApplicationResources.properties :

validation.error.acty.integer={0} must be an integer and {1} is not.

in validations.xml

 field property=acty depends=integer
   msg name=integer key=validation.error.acty.integer/
   arg0 key=ACTY resource=false/
   arg1 key=${??} resource=false/
 /field


my question is what do I put in ?? to get hte actual value the user 
entered to be echoed back out


so if I type in AAA into the acty field I want the error message to be:

ACTY must be an integer and AAA is not.

Thanks Troy 



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



Re: STRUTS AND JAVADOC.

2005-11-04 Thread Collin VanDyck

Hi Soren,

You can javadoc your Struts Java types, although I'm not sure of a way 
to get your Struts configurations in normal JavaDoc.


You can, however, run StrutsDoc:

http://struts.sourceforge.net/strutsdoc/

StrutsDoc will document the information found in your struts 
configuration files, such as your forwards, your action declarations, 
your forms, and the relationships amongst your forms and actions.


I got this running yesterday, actually, and it is functional.

Hope this helps
Collin



Søren Blidorf wrote:

Hi.

I am making a JAVADOC of my STRUTS project.

Is there a way I can get the STRUTS forwards ect in the JAVADOC.

If I haven't made my self clear, please ask. I NEED HELP, I am new to
JAVADOC :)

BR

Soren, DK




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




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



Re: How to get ACCESS to Locale in TAG class

2005-11-04 Thread Hubert Rabago
Is your JSP being accessed directly?
If so, you may need to let the Struts RequestProcessor do its work first.

action path=/myPage
forward=/myPage.jsp/

then access it the way you would other Struts actions: 
http://domain/myApp/myPage.do

Hubert

On 11/4/05, Łukasz Piątkowski [EMAIL PROTECTED] wrote:
 Hello !

 I have a problem with accessing LOCALE in my TAG class. When I want
 to get LOCALE in my ACTION class I use :

 request.getSession().getAttribute(Globals.LOCALE_KEY) - and it works fine

 in my TAG class I use :

 pageContext.getSession().getAttribute(Globals.LOCALE_KEY) - it is null

 This is the fragment of my code :
 if(pageContext.getSession().getAttribute(Globals.LOCALE_KEY)!=null)
 {

 loc=(Locale)pageContext.getSession().getAttribute(Globals.LOCALE_KEY);
 lwriter.print(SESSION LOCALE);
 }
 else
 {
 loc=Locale.getDefault();
 lwriter.print(SERVER LOCALE);
 }
 
 It always returning SERVER LOCALE :(

 Please HELP !

 Kind Regards, Lukasz


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




Re: STRUTS AND JAVADOC.

2005-11-04 Thread Nick Heudecker
I didn't know people were still using Strutsdoc. I should probably start
maintaining it again.



On 11/4/05, Collin VanDyck [EMAIL PROTECTED] wrote:

 Hi Soren,

 You can javadoc your Struts Java types, although I'm not sure of a way
 to get your Struts configurations in normal JavaDoc.

 You can, however, run StrutsDoc:

 http://struts.sourceforge.net/strutsdoc/

 StrutsDoc will document the information found in your struts
 configuration files, such as your forwards, your action declarations,
 your forms, and the relationships amongst your forms and actions.

 I got this running yesterday, actually, and it is functional.

 Hope this helps
 Collin



 Søren Blidorf wrote:
  Hi.
 
  I am making a JAVADOC of my STRUTS project.
 
  Is there a way I can get the STRUTS forwards ect in the JAVADOC.
 
  If I haven't made my self clear, please ask. I NEED HELP, I am new to
  JAVADOC :)
 
  BR
 
  Soren, DK
 
 
 
 
  -
  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: STRUTS AND JAVADOC.

2005-11-04 Thread Søren Blidorf
Thanks.

It's written that I need to install ANT as well.

Is there a way to do it with out ANT

- Original Message -
From: Collin VanDyck [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Friday, November 04, 2005 3:31 PM
Subject: Re: STRUTS AND JAVADOC.


 Hi Soren,

 You can javadoc your Struts Java types, although I'm not sure of a way
 to get your Struts configurations in normal JavaDoc.

 You can, however, run StrutsDoc:

 http://struts.sourceforge.net/strutsdoc/

 StrutsDoc will document the information found in your struts
 configuration files, such as your forwards, your action declarations,
 your forms, and the relationships amongst your forms and actions.

 I got this running yesterday, actually, and it is functional.

 Hope this helps
 Collin



 Søren Blidorf wrote:
  Hi.
 
  I am making a JAVADOC of my STRUTS project.
 
  Is there a way I can get the STRUTS forwards ect in the JAVADOC.
 
  If I haven't made my self clear, please ask. I NEED HELP, I am new to
  JAVADOC :)
 
  BR
 
  Soren, DK
 
 
 
 
  -
  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: sorting of table columns

2005-11-04 Thread Michael Jouravlev
On 11/4/05, fea jabi [EMAIL PROTECTED] wrote:
 can we sort table columns when clicked on the column header using struts? I
 mean does struts provide any tag to do so?

 is there an example on how this can be done?

http://displaytag.homeip.net/example-sorting.jsp

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



Accessing strust beans without bean:write/

2005-11-04 Thread Lee Harrington
There are situations where bean:write name=formBeanName
property=propertyName/ just doesn't seem to parse.

I've tried substituting %= formBeanName.getPropertyName% but it can't find
formBeanName.

The form bean is therer as the bean:write works in other places in my jsp.

How do we directly address the formBean's from within javascript?

Lee


[OT] [MIME] Re: Urgent help needed : Printing Jasper Reports

2005-11-04 Thread Dave Newton

Meenakshi Singh wrote:


I have to print a report(which I have created using jasper report). I m
setting the content type as response.setContentType(application/octet-stream);


Moved OT.



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



[shale][myfaces] selectManyCheckBox in usecases fails to validate

2005-11-04 Thread Rahul Akolkar
Thought I'd changed something when I rolled Shale, but I see the
following behavior in Shale 11/4 nightlies usecases.war as well.

1) Navigate to view corresponding to profile/profile3.jsp in Edit
Profile dialog.
2) Validation for selectManyCheckBox fails with
javax.faces.component.UISelectMany.INVALID

A cursory glance didn't help locate the cause for the failure. Any ideas?

Thanks,
-Rahul

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



Re: STRUTS AND JAVADOC.

2005-11-04 Thread Dave Newton

Søren Blidorf wrote:


It's written that I need to install ANT as well.

Is there a way to do it with out ANT
 


Probably, but why would you want to?

It's scary that you're building struts (or any java project, for that 
matter) without Ant.


Dave



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



Re: sorting of table columns

2005-11-04 Thread fea jabi

I saw this example too. But was not sure about this display tag.

is this display tag struts stuff. I don't remember seeing it.

Thanks.



From: Michael Jouravlev [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List user@struts.apache.org
To: Struts Users Mailing List user@struts.apache.org
Subject: Re: sorting of table columns
Date: Fri, 4 Nov 2005 07:57:14 -0800

On 11/4/05, fea jabi [EMAIL PROTECTED] wrote:
 can we sort table columns when clicked on the column header using 
struts? I

 mean does struts provide any tag to do so?

 is there an example on how this can be done?

http://displaytag.homeip.net/example-sorting.jsp

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



_
Is your PC infected? Get a FREE online computer virus scan from McAfee® 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



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



[OT] [DISPLAYTAG] Re: sorting of table columns

2005-11-04 Thread Dave Newton

fea jabi wrote:


is this display tag struts stuff.


No, it's displaytag stuff.

Dave



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



SV: STRUTS AND JAVADOC.

2005-11-04 Thread Søren Blidorf
Basically because I don't know ANT

Why do I need ANT?


-Oprindelig meddelelse-
Fra: Dave Newton [mailto:[EMAIL PROTECTED] 
Sendt: 4. november 2005 17:27
Til: Struts Users Mailing List
Emne: Re: STRUTS AND JAVADOC.

Søren Blidorf wrote:

It's written that I need to install ANT as well.

Is there a way to do it with out ANT
  

Probably, but why would you want to?

It's scary that you're building struts (or any java project, for that 
matter) without Ant.

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: [OT] [DISPLAYTAG] Re: sorting of table columns

2005-11-04 Thread fea jabi

how do I use that with struts table then?



From: Dave Newton [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List user@struts.apache.org
To: Struts Users Mailing List user@struts.apache.org
Subject: [OT] [DISPLAYTAG] Re: sorting of table columns
Date: Fri, 04 Nov 2005 11:37:46 -0500

fea jabi wrote:


is this display tag struts stuff.


No, it's displaytag stuff.

Dave



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



_
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



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



Re: Accessing strust beans without bean:write/

2005-11-04 Thread Dave Newton

Lee Harrington wrote:


I've tried substituting %= formBeanName.getPropertyName% but it can't find
formBeanName.

How do we directly address the formBean's from within javascript?
 

Javascript? Or Java scriptlet? You have an example of one and ask about 
the other.


Under which servlet spec?

If you're using JSP 2.0 you can just say ${formBeanName.propertyName}.

Otherwise you may want to consider the jsp:useBean tag, which is plain 
ol' JSP and easily Googleable. Googlable. Googable?


Dave



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



Re: Shale timeline

2005-11-04 Thread Rahul Akolkar
On 11/3/05, Craig McClanahan [EMAIL PROTECTED] wrote:
snip/
 the dev list) on a grade. That being said, I would *not* assume 1.0.0 would
 be anything other than an alpha. This is not necessarily an issue about
 quality, it's more about API stability. I don't want to lock down quite
 everything yet, until people have had a chance to try things out.
snap/

I know we've spent few cycles deciding names/version numbers recently,
so I'm not going to dwell on this beyond this email, but given the
above, would you consider a 0.1.0 (or 0.5.0) first release?

That, atleast in my mind, is more along the lines of your statement
above and conveys not wanting to lock down just yet very well. I'd
like to see a Shale release too, don't get me otherwise.

-Rahul

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



Re: SV: STRUTS AND JAVADOC.

2005-11-04 Thread Collin VanDyck
It basically saves you tons of time over the normal course of the 
development lifecycle.  All of your compilation, packaging, testing, 
deployment, and more can be automated with ant.


If you've used makefiles in C, that's the analogy.

You would simply type:

% ant deploy

Which, depending on your script, would probably clean and compile, run 
your JUnit tests, package your WAR and EAR files, and deploy them to 
your remote or local server, also possibly sending out emails etc when 
finished.


Once you start using Ant, you'll wonder how you ever got along with out it.

If you're using Eclipse to automate much of this, consider switching. If 
not only for the additional flexibility that Ant gives you, it doesn't 
tie you in  to any particular IDE.


Collin



Søren Blidorf wrote:

Basically because I don't know ANT

Why do I need ANT?


-Oprindelig meddelelse-
Fra: Dave Newton [mailto:[EMAIL PROTECTED] 
Sendt: 4. november 2005 17:27

Til: Struts Users Mailing List
Emne: Re: STRUTS AND JAVADOC.

Søren Blidorf wrote:



It's written that I need to install ANT as well.

Is there a way to do it with out ANT




Probably, but why would you want to?

It's scary that you're building struts (or any java project, for that 
matter) without Ant.


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]




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



Re: [OT] [DISPLAYTAG] Re: sorting of table columns

2005-11-04 Thread Dave Newton

fea jabi wrote:


how do I use that with struts table then?


What's struts table? Do you mean the layout taglib?

Dave Spending too much time on Lisp mailing lists this week Newton



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



[OT] [ANT] Re: SV: STRUTS AND JAVADOC.

2005-11-04 Thread Dave Newton

Søren Blidorf wrote:


Basically because I don't know ANT

Why do I need ANT?
 

Ant lets you build Java projects in a robust and portable manner, pays 
attention to dependencies, and is extensible to allow a variety of tasks 
under a variety of conditions.


obligatory-understatement
It is very useful.
/obligatory-understatement

Ant: Makes Developing Java a Little Less Sucky.

Which is why I'm a developer and not a marketroid.

Dave



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



Re: [OT] [DISPLAYTAG] Re: sorting of table columns

2005-11-04 Thread fea jabi

sorry, what I mean is
table class=line-table

and struts stuff to get dynamic data.

How does the JSP know about the display tag?



From: Dave Newton [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List user@struts.apache.org
To: Struts Users Mailing List user@struts.apache.org
Subject: Re: [OT] [DISPLAYTAG] Re: sorting of table columns
Date: Fri, 04 Nov 2005 11:47:01 -0500

fea jabi wrote:


how do I use that with struts table then?


What's struts table? Do you mean the layout taglib?

Dave Spending too much time on Lisp mailing lists this week Newton



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



_
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



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



Re: Shale timeline

2005-11-04 Thread Rahul Akolkar
On 11/3/05, Bernhard Slominski [EMAIL PROTECTED] wrote:
 Hi Craig,

 thanks a lot for the answer, that's really helpful!

  Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Gesendet: Donnerstag, 3. November 2005 17:57

  As far as I'm concerned, the feature work I wanted to see for a
  1.0.0release is complete

 You don't want to come up with a specific date, do you?
snip/

There is a very good write-up somewhere on the Apache site about how
releases work, can't find it now, sorry.

In a nutshell, there are no dates (the process is driven by volunteers
having enough time to finish up the tasks leading to a release). Also,
I do not speak for the Struts Shale team, this is a broader comment.

-Rahul

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



html:checkbox

2005-11-04 Thread Ray Madigan
Greetings,

I remember getting something like this to work in the past, I have searched
and cannot find what is missing, or what I'm doing wrong, or if it is even
possible.

I want to connect a set of checkboxes to a HashMap in my action form.

In my ActionForm I have a two methods like

public void setValue ( String key, boolean value );
public boolean getValue ( String key );

in the form reset method I clear the HashMap.

For the Action Class method of the class I initialize the hashmap like:

theForm.setValue ( Foo, false );
theForm.setValue ( Bar, true );

In my JSP i have tried many things like

html:form action='/Foo.do'
...

html:checkbox property='value(Foo)'/

...
/html:form

When I do this I get a an exception
no getter method for property 'value(Foo)' of bean
org.apache.struts.taglib.html.BEAN

I have tried many alternatives, too many to post here.  Is this supposed to
work?

Thanks in advance


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



SV: [OT] [ANT] Re: SV: STRUTS AND JAVADOC.

2005-11-04 Thread Søren Blidorf
Thanks both.

Does it take a lot of effort to set it up.

I am getting very interested, but my time is very limited these days.

-Oprindelig meddelelse-
Fra: Dave Newton [mailto:[EMAIL PROTECTED] 
Sendt: 4. november 2005 17:51
Til: Struts Users Mailing List
Emne: [OT] [ANT] Re: SV: STRUTS AND JAVADOC.

Søren Blidorf wrote:

Basically because I don't know ANT

Why do I need ANT?
  

Ant lets you build Java projects in a robust and portable manner, pays 
attention to dependencies, and is extensible to allow a variety of tasks

under a variety of conditions.

obligatory-understatement
It is very useful.
/obligatory-understatement

Ant: Makes Developing Java a Little Less Sucky.

Which is why I'm a developer and not a marketroid.

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]



HTML label and Struts text (I know this has been said before)

2005-11-04 Thread Mark Benussi
Sorry I couldn't find the old thread for this.

 

Is there a way of associating the html label tag with an input. The
requirements is to assign an id attribute to the html:text tag but I cant
see a way of doing this.

 

 



Re: STRUTS AND JAVADOC.

2005-11-04 Thread Dave Newton

Nick Heudecker wrote:


I didn't know people were still using Strutsdoc. I should probably start
maintaining it again.
 


Bah, maintainence is for the weak.

I would like to see what the generated output looks like, though, to see 
if I should use it as opposed to my Ruby program that generates 
essentially the same type of information with fun cross-linking and will 
snarf up javadoc-like info from JSP files as well. If I ever have time 
or anybody has interest I'll make it available and add some stuff for 
error-checking struts apps (within strict boundaries; I don't have 
_that_ much time!)


Dave



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



Re: SV: [OT] [ANT] Re: SV: STRUTS AND JAVADOC.

2005-11-04 Thread Collin VanDyck
You owe it to yourself to run through an ant tutorial or two. Start out 
getting something compiled, use that for a while. You can always expand 
your script in the future to do other things.  You can easily have 
something running in a couple hours.


Basically, if you are programming in Java, you need to be using Ant. 
Otherwise, it would be similar to being a soccer player, but instead of 
cleats you have to wear bunny slippers. Sure you can make it around the 
field and what have you, but you won't be nearly as productive as the 
other cleated players.


Collin



Søren Blidorf wrote:

Thanks both.

Does it take a lot of effort to set it up.

I am getting very interested, but my time is very limited these days.

-Oprindelig meddelelse-
Fra: Dave Newton [mailto:[EMAIL PROTECTED] 
Sendt: 4. november 2005 17:51

Til: Struts Users Mailing List
Emne: [OT] [ANT] Re: SV: STRUTS AND JAVADOC.

Søren Blidorf wrote:



Basically because I don't know ANT

Why do I need ANT?




Ant lets you build Java projects in a robust and portable manner, pays 
attention to dependencies, and is extensible to allow a variety of tasks


under a variety of conditions.

obligatory-understatement
It is very useful.
/obligatory-understatement

Ant: Makes Developing Java a Little Less Sucky.

Which is why I'm a developer and not a marketroid.

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]




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



Re: SV: [OT] [ANT] Re: SV: STRUTS AND JAVADOC.

2005-11-04 Thread Dave Newton

Søren Blidorf wrote:


Does it take a lot of effort to set it up.
 


No.

http://ant.apache.org/

Setup info at http://ant.apache.org/manual/install.html#installing

Dave



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



Re: [OT] [DISPLAYTAG] Re: sorting of table columns

2005-11-04 Thread Dave Newton

fea jabi wrote:


How does the JSP know about the display tag?


The same way a JSP page knows about any custom tag library.

I think you should look at the displaytag docs.

Dave



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



Re: HTML label and Struts text (I know this has been said before)

2005-11-04 Thread Dave Newton

Mark Benussi wrote:


Is there a way of associating the html label tag with an input. The
requirements is to assign an id attribute to the html:text tag but I cant
see a way of doing this.
 

IIRC the stock HTML tags don't produce id attributes, which is 
probably one reason why there are some stirrings about reworking them.


Dave



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



Re: sorting of table columns

2005-11-04 Thread Martin Gainty

Good Afternoon Fea

I was asking the same question looking at Struts HTML Grid Tags
*and some customisation of the submit buttons to be incorporated into the 
column headings*

when Dennis from Evergreen Investments suggested
http://displaytag.sourceforge.net/
And..if your are supporting jsp 1.1 (j2ee 1.2) you can use Expression 
Language for your name properties
so in the case where you want to get the records from DB and pass result to 
table tag

sql:query var=results
 select * from table
/sql:query

display:table name=${results.rows} /

-OR-
setting up the scenario using dynabeans
%
 Connection con = ...; // just open a connection
 Statement stmt = con.createStatement();
 ResultSet rs = stmt.executeQuery(SELECT * from table);
 RowSetDynaClass resultSet = new RowSetDynaClass(rs, false);
 stmt.close();
 con.close();
//associate the results attribute with the resultSet obtained from 
RowSetDynaClass Bean

 request.setAttribute(results, resultSet);
%
/*finally use the display:table to show the results from identified 
attribute called results*/


 display:table name=requestScope.results.rows /
*copied from tutorial located at*
http://displaytag.sourceforge.net/tut_sources.html

Is this what you are looking for ??
Martin-


- Original Message - 
From: fea jabi [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Friday, November 04, 2005 9:11 AM
Subject: sorting of table columns


can we sort table columns when clicked on the column header using struts? 
I mean does struts provide any tag to do so?


is there an example on how this can be done?

Thanks.

_
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/



-
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: HTML label and Struts text (I know this has been said before)

2005-11-04 Thread Niall Pemberton
Actually they do  the styleId arttribute gets rendered as id

Niall

- Original Message - 
From: Dave Newton [EMAIL PROTECTED]
Sent: Friday, November 04, 2005 5:05 PM


 Mark Benussi wrote:

 Is there a way of associating the html label tag with an input. The
 requirements is to assign an id attribute to the html:text tag but I cant
 see a way of doing this.
 
 
 IIRC the stock HTML tags don't produce id attributes, which is
 probably one reason why there are some stirrings about reworking them.

 Dave



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



Easy question, please help a rookie

2005-11-04 Thread Dave
I'm trying to get the URL of the current page into a attribute (local 
variable?).

This was suggested to me, but it doesn't work:

c:set var=myURL value=${request.requestURI}/

TIA,
Dave


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



Re: Easy question, please help a rookie

2005-11-04 Thread DGraham
Maybe this can help?
http://javaalmanac.com/egs/javax.servlet/GetReqUrl.html?l=new

-Dennis


Dave [EMAIL PROTECTED] 
Sent by: news [EMAIL PROTECTED]
11/04/2005 12:18 PM
Please respond to
Struts Users Mailing List user@struts.apache.org


To
user@struts.apache.org
cc

Subject
Easy question, please help a rookie






I'm trying to get the URL of the current page into a attribute (local 
variable?).

This was suggested to me, but it doesn't work:

c:set var=myURL value=${request.requestURI}/

TIA,
Dave


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



SV: SV: [OT] [ANT] Re: SV: STRUTS AND JAVADOC.

2005-11-04 Thread Søren Blidorf
How does ANT work with JBuilder?

-Oprindelig meddelelse-
Fra: Dave Newton [mailto:[EMAIL PROTECTED] 
Sendt: 4. november 2005 18:01
Til: Struts Users Mailing List
Emne: Re: SV: [OT] [ANT] Re: SV: STRUTS AND JAVADOC.

Søren Blidorf wrote:

Does it take a lot of effort to set it up.
  

No.

http://ant.apache.org/

Setup info at http://ant.apache.org/manual/install.html#installing

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]



[OT ANN] Roomity v 1.5 w/ video, social networking and html editor + JDNC article

2005-11-04 Thread netsql
Roomity.com v 1.5 is a web 2.01/RiA poster child community webapp. This new 
version ads broadcast video, social networking such as favorite authors and 
html editor.
It likely already has groups and content you are already using but aggregated 
and safer, including technology, Java, etc., but it only works on broadband.

It's not Struts based, it's MVC, but you can get to Struts mail list via 
http://struts.roomity.com
 
.V



--
a href=http://Struts_User_List.roomity.com;Struts_User_List.roomity.com/a
Your Roomity Broadband Webapp ~~1131125487631~~
--


R: Easy question, please help a rookie

2005-11-04 Thread Amleto Di Salle
Try to use
${pageContext.request.requestURI}

BR
/Amleto


 -Messaggio originale-
 Da: news [mailto:[EMAIL PROTECTED] Per conto di Dave
 Inviato: venerdì 4 novembre 2005 18.19
 A: user@struts.apache.org
 Oggetto: Easy question, please help a rookie
 
 
 I'm trying to get the URL of the current page into a attribute (local 
 variable?).
 
 This was suggested to me, but it doesn't work:
 
 c:set var=myURL value=${request.requestURI}/
 
 TIA,
 Dave
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.1.362 / Virus Database: 267.12.8/161 - Release 
 Date: 03/11/2005
  
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.12.8/161 - Release Date:
03/11/2005
 


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



AW: Shale timeline

2005-11-04 Thread Bernhard Slominski
 -Ursprüngliche Nachricht-
 Von: Rahul Akolkar [mailto:[EMAIL PROTECTED]
 Gesendet: Freitag, 4. November 2005 17:55
 
   As far as I'm concerned, the feature work I wanted to see for a
   1.0.0release is complete
 
 
 In a nutshell, there are no dates (the process is driven by volunteers
 having enough time to finish up the tasks leading to a release). Also,
 I do not speak for the Struts Shale team, this is a broader comment.
 
 -Rahul

Rahul, thanks for the answer. I see this point and it's propably better not
to specify any dates, than conitiously postponing.
It was just a (nice) try, because that's what people always asking first,
but I think I can give them some useful information with the answers from
you and Craig.

Bernhard

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



Re: SV: SV: [OT] [ANT] Re: SV: STRUTS AND JAVADOC.

2005-11-04 Thread Dave Newton

Søren Blidorf wrote:


How does ANT work with JBuilder?
 


Don't know, never used JBuilder.

According to the jBuilder home page Ant support is built in, and I bet 
you have access to some documentation you could look at..


Dave



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



Re: Validation Question how to echo back users input in error message?

2005-11-04 Thread Michael Jouravlev
I would like to know the answer on this too. I searched the Net, all
examples use properties from property file. Using resource=false
does not help with either (neither?) of these variants:

arg0 key=nestedUser.fromAddress resource=false/
arg0 key=${nestedUser.fromAddress} resource=false/
arg0 key=registrationForm.nestedUser.fromAddress resource=false/
arg0 key=${registrationForm.nestedUser.fromAddress} resource=false/

where registrationForm is action form definition in struts-config.xml,
nestedUser is a nested BO. Originating mail address is rendered in
HTML and submitted back to application as nestedUser.fromAddress.

Commons Validator does not process HttpServletRequest (that is
expected). I glanced at ValidatorForm from Struts Validator
integration, and saw this validate() method:

public ActionErrors validate(ActionMapping mapping,
 HttpServletRequest request) {

  ServletContext application = getServlet().getServletContext();
  ActionErrors errors = new ActionErrors();

  String validationKey = getValidationKey(mapping, request);

  Validator validator = Resources.initValidator(validationKey,
this, application, request, errors, page);

  try {
validatorResults = validator.validate();
  } catch (ValidatorException e) {
log.error(e.getMessage(), e);
  }

  return errors;
}

So, maybe you want to debug this one.

Commons Validator basically does not have documentation, only
Javadocs, which is not very descriptive. No comments in the source,
either. This is frustrating.

Michael.

On 11/4/05, Troy Bull [EMAIL PROTECTED] wrote:
 I am using the struts validator and it works almost exactly the way I want.


 Say I have a field tf and the value is ABC

 I want to do a validation requiring it to be an integer and return the
 following error message: tf must be an integer.

 I can do all this pretty easily here is the code that does it:

 in ApplicationResources.properties :

 validation.error.acty.integer={0} must be an integer and {1} is not.

 in validations.xml

   field property=acty depends=integer
 msg name=integer key=validation.error.acty.integer/
 arg0 key=ACTY resource=false/
 arg1 key=${??} resource=false/
   /field


 my question is what do I put in ?? to get hte actual value the user
 entered to be echoed back out

 so if I type in AAA into the acty field I want the error message to be:

 ACTY must be an integer and AAA is not.

 Thanks Troy

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



Re: R: Easy question, please help a rookie

2005-11-04 Thread Dave
Amleto Di Salle disalle at di.univaq.it writes:

 
 Try to use
 ${pageContext.request.requestURI}
 
 BR
 /Amleto

This worked thanks


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



How to force no page caching

2005-11-04 Thread Braun, James F
I need to force no page caching and I (vaguely) remember a configuration
parameter that would do this. However, I looked in the wiki but didn't
find anything on this. Can anybody shed any light?

Thanks, J.

-- 
This transmission is intended only for use by the addressee(s) named herein and 
may contain information that is proprietary, confidential and/or legally 
privileged. If you are not the intended recipient, you are hereby notified that 
any disclosure, copying, distribution, or use of the information contained 
herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received 
this transmission in error, please immediately contact the sender and destroy 
the material in its entirety, whether in electronic or hard copy format. Thank 
you.



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



Re: How to force no page caching

2005-11-04 Thread Michael Jouravlev
On 11/4/05, Braun, James F [EMAIL PROTECTED] wrote:
 I need to force no page caching and I (vaguely) remember a configuration
 parameter that would do this. However, I looked in the wiki but didn't
 find anything on this. Can anybody shed any light?

 Thanks, J.

controller nocache=true / if you want to set it for every response.

 Alternatively, you can set cache-control headers for responses that
you need in an action class:

response.setHeader(Pragma, No-cache);
response.setHeader(Cache-Control, no-cache,no-store,max-age=0);
response.setDateHeader(Expires, 1);

Note: if you use Opera and navigate back and forward, it does not
reload page even if it marked with no-store. MSIE and Mozilla do
reload such a page.

Michael.

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



Re: How to force no page caching

2005-11-04 Thread Xavier Vanderstukken

Braun, James F wrote:


I need to force no page caching and I (vaguely) remember a configuration
parameter that would do this. However, I looked in the wiki but didn't
find anything on this. Can anybody shed any light?

Thanks, J.

 

Set the nocache attribute to true for the controller element in your 
struts-config.xml file.


controller nocache=true/



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



Re: [shale][myfaces] selectManyCheckBox in usecases fails to validate

2005-11-04 Thread Craig McClanahan
n 11/4/05, Rahul Akolkar [EMAIL PROTECTED] wrote:

 Thought I'd changed something when I rolled Shale, but I see the
 following behavior in Shale 11/4 nightlies usecases.war as well.

 1) Navigate to view corresponding to profile/profile3.jsp in Edit
 Profile dialog.
 2) Validation for selectManyCheckBox fails with
 javax.faces.component.UISelectMany.INVALID

 A cursory glance didn't help locate the cause for the failure. Any ideas?


Rahul,

To make sure I don't lose this in my inbox, could you please file a bug
report about it?

http://issues.apache.org/bugzilla/

Thanks,

Craig

Thanks,
 -Rahul

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




Re: [shale][myfaces] selectManyCheckBox in usecases fails to validate

2005-11-04 Thread Rahul Akolkar
On 11/4/05, Craig McClanahan [EMAIL PROTECTED] wrote:
snip/

 Rahul,

 To make sure I don't lose this in my inbox, could you please file a bug
 report about it?

snap/

Sure, # 37361 [*]

-Rahul

* http://issues.apache.org/bugzilla/show_bug.cgi?id=37361


 http://issues.apache.org/bugzilla/

 Thanks,

 Craig

snip/

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



Re: [shale][clay] CSS style classes on substituted elements

2005-11-04 Thread Ryan Wynn
I noticed that Craig commited the set name=styleClass value=@class/ to
baseHtml. I think this is good, however I think that now if the symbol
'class' is not explicitly specified then the result will be span
class=@class.../span. Is that right, Gary?
 One solution may be to set the value of the 'class' symbol in baseHtml to
empty. So, in baseHtml you have symbolsset name=class
value=//symbols. Then have a conventional that attributes which resolve
to an empty value are omitted. I really can't think of a case you would want
an empty attribute value?


 On 11/3/05, Gary VanMatre [EMAIL PROTECTED] wrote:

 Ah, Ryan beat me to the answer. Figures, symbols was his idea anyway.







 -- Forwarded message --
 From: Ryan Wynn [EMAIL PROTECTED]
 To: Struts Users Mailing List user@struts.apache.org
 Date: Thu, 3 Nov 2005 22:54:38 +
 Subject: Re: [shale][clay] CSS style classes on substituted elements
 I believe that currently if the html attribute is not also an attribute on
 the underlying component, then the html attribute will be treated as a
 symbol.
 So, in this case if userNameMessage is actually a h:message, then
 span jsfid=usernameMessage class=errors styleClass=errors
 username error message
 /span
 would produce span class=errors.../span in both the designer and
 developer views.
 On the other hand if you wanted to utilize the new symbol functionality.
 You would change
 your clay-config.xml to add the following:
 component jsfid=usernameMessage..
 attributes
 ...
 set name=styleClass value=@class/
 /attributes
 /component
 Then you could just use
 span jsfid=usernameMessage class=errors
 username error message
 /span
 in the html and still get the proper output in both designer and developer
 views.

 On 11/3/05, Craig McClanahan [EMAIL PROTECTED] wrote:
 
  As part of my JavaOne session on Shale, I demo'd the fact that Clay lets
  you
  have two different views of the page:
 
  Designer view: http://localhost:8080/myapp/login.html
 
  Developer view: http://localhost:8080/myapp/login.faces
 
  To demonstrate that Clay was actually parsing the HTML template, in
  login.html I changed:
 
  span jsfid=usernameMessage
  username error message
  /span
 
  to the following instead (errors is a CSS style class that turns the
  text
  red):
 
  span jsfid=usernameMessage class=errors
  username error message
  /span
 
  When you redisplay the designer view, this does indeed show a change in
  behavior -- the username error message string shows up in red.
 However,
  if
  you redisplay the developer view and then try to enter an invalid
  username/password, the text still comes up in black. One thing I
 noticed,
  in
  the emitted HTML markup for the developer view, the error message string
  is
  *not* surrounded by a span class=errors.../span, which is (of
 course)
  why the text didn't change color. Did some behavior change recently in
  this
  regard?
 
  I'd be fine with some alternative way of accomplishing this sort of
  demonstration, but changing the HTML template and seeing the change
  applied
  immediately is a more compelling demo than something like changing
  clay-config.html.
 
  Craig
 
 

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




Re: [shale][clay] CSS style classes on substituted elements

2005-11-04 Thread Craig McClanahan
On 11/4/05, Ryan Wynn [EMAIL PROTECTED] wrote:

 I noticed that Craig commited the set name=styleClass value=@class/
 to
 baseHtml. I think this is good, however I think that now if the symbol
 'class' is not explicitly specified then the result will be span
 class=@class.../span. Is that right, Gary?


Yes, it does do that :-(.

One solution may be to set the value of the 'class' symbol in baseHtml to
 empty. So, in baseHtml you have symbolsset name=class
 value=//symbols. Then have a conventional that attributes which
 resolve
 to an empty value are omitted. I really can't think of a case you would
 want
 an empty attribute value?


I would want it not to emit the output attribute at all, if there was no
input attribute set. Wouldn't that make more sense?

Craig

On 11/3/05, Gary VanMatre [EMAIL PROTECTED] wrote:
 
  Ah, Ryan beat me to the answer. Figures, symbols was his idea anyway.
 
 
 
 
 
 
 
  -- Forwarded message --
  From: Ryan Wynn [EMAIL PROTECTED]
  To: Struts Users Mailing List user@struts.apache.org
  Date: Thu, 3 Nov 2005 22:54:38 +
  Subject: Re: [shale][clay] CSS style classes on substituted elements
  I believe that currently if the html attribute is not also an attribute
 on
  the underlying component, then the html attribute will be treated as a
  symbol.
  So, in this case if userNameMessage is actually a h:message, then
  span jsfid=usernameMessage class=errors styleClass=errors
  username error message
  /span
  would produce span class=errors.../span in both the designer and
  developer views.
  On the other hand if you wanted to utilize the new symbol functionality.
  You would change
  your clay-config.xml to add the following:
  component jsfid=usernameMessage..
  attributes
  ...
  set name=styleClass value=@class/
  /attributes
  /component
  Then you could just use
  span jsfid=usernameMessage class=errors
  username error message
  /span
  in the html and still get the proper output in both designer and
 developer
  views.
 
  On 11/3/05, Craig McClanahan [EMAIL PROTECTED] wrote:
  
   As part of my JavaOne session on Shale, I demo'd the fact that Clay
 lets
   you
   have two different views of the page:
  
   Designer view: http://localhost:8080/myapp/login.html
  
   Developer view: http://localhost:8080/myapp/login.faces
  
   To demonstrate that Clay was actually parsing the HTML template, in
   login.html I changed:
  
   span jsfid=usernameMessage
   username error message
   /span
  
   to the following instead (errors is a CSS style class that turns the
   text
   red):
  
   span jsfid=usernameMessage class=errors
   username error message
   /span
  
   When you redisplay the designer view, this does indeed show a change
 in
   behavior -- the username error message string shows up in red.
  However,
   if
   you redisplay the developer view and then try to enter an invalid
   username/password, the text still comes up in black. One thing I
  noticed,
   in
   the emitted HTML markup for the developer view, the error message
 string
   is
   *not* surrounded by a span class=errors.../span, which is (of
  course)
   why the text didn't change color. Did some behavior change recently in
   this
   regard?
  
   I'd be fine with some alternative way of accomplishing this sort of
   demonstration, but changing the HTML template and seeing the change
   applied
   immediately is a more compelling demo than something like changing
   clay-config.html.
  
   Craig
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



html:textarea with tags

2005-11-04 Thread Eric Plante
Hi,

I'd like to use a html:textarea tag but my html tags in the text aren't
parsed and there is no filter like bean:write has, Is there a way to make
that tag parse html tags?

Thanks


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



Re: [shale][clay] CSS style classes on substituted elements

2005-11-04 Thread Gary VanMatre
  
  I noticed that Craig commited the 
  to 
  baseHtml. I think this is good, however I think that now if the symbol 
  'class' is not explicitly specified then the result will be   
  class=@class Is that right, Gary? 
 
 
 Yes, it does do that :-(. 
 
 One solution may be to set the value of the 'class' symbol in baseHtml to 
  empty. So, in baseHtml you have   value=/. Then have a conventional 
  that attributes which 
  resolve 
  to an empty value are omitted. I really can't think of a case you would 
  want 
  an empty attribute value? 
 

Only attributes that have a null value are ignored.  This would be an attribute 
that was not given a value attribute.  Maybe an empty string should also be 
ignored.  

 
 I would want it not to emit the output attribute at all, if there was no 
 input attribute set. Wouldn't that make more sense? 
 

Ya, currently it kind of works backwards from how you might normally think of 
symbol evaluation.  The attribute value is scanned for know symbols.  

Maybe the value should be scanned for a symbol and then use the symbol table to 
lookup the replacement value.  If not found, insert an empty string.  This 
would be a more efficient way but it would require that we have a beginning and 
ending symbol delimiter.  What about @myvar@?  Two big O's in OOPs.

I've also been thinking that the literal string managed-bean-name should 
become a symbol.  Now it's inconsistent - the exception.  All other symbols 
require an @ delimiter.  

Any objections to:
1) requiring a begin and end delimiter for symbols, 
2) making the managed bean name a symbol, 
3) ignoring empty string attributes and
4) changing the symbol replacement method?  


 Craig 
 

Gary

Re: html:textarea with tags

2005-11-04 Thread Murray Collingwood
Sounds like you are missing your taglib definition for html?  Can you post 
your JSP 
file?

mc


On 4 Nov 2005 at 19:27, Eric Plante wrote:

 Hi,
 
 I'd like to use a html:textarea tag but my html tags in the text aren't
 parsed and there is no filter like bean:write has, Is there a way to make
 that tag parse html tags?
 
 Thanks
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.1.362 / Virus Database: 267.12.8/161 - Release Date: 3/11/2005
 



FOCUS Computing - web design
Mob: 0415 24 26 24
[EMAIL PROTECTED]
http://www.focus-computing.com.au




-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.12.8/161 - Release Date: 3/11/2005


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



Re: html:textarea with tags

2005-11-04 Thread Eric Plante
Why? The taglib is fine and it shows the text; the problem is that the text
that is supposed to be printed out also includes some pure html tags which
aren't parsed.

Ex: if I have font color='red'some text/font the textarea print that
litteraly instead of printing the text in red.

With bean:write, the filter=false print the text in red but textarea doesn't
have a filter attribute so I was wondering if there was a way to print the
text in red in a textarea taglib.

 Sounds like you are missing your taglib definition for html?  Can you
post your JSP
 file?

 mc


 On 4 Nov 2005 at 19:27, Eric Plante wrote:

  Hi,
 
  I'd like to use a html:textarea tag but my html tags in the text aren't
  parsed and there is no filter like bean:write has, Is there a way to
make
  that tag parse html tags?
 
  Thanks
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -- 
  No virus found in this incoming message.
  Checked by AVG Free Edition.
  Version: 7.1.362 / Virus Database: 267.12.8/161 - Release Date:
3/11/2005
 



 FOCUS Computing - web design
 Mob: 0415 24 26 24
 [EMAIL PROTECTED]
 http://www.focus-computing.com.au




 -- 
 No virus found in this outgoing message.
 Checked by AVG Free Edition.
 Version: 7.1.362 / Virus Database: 267.12.8/161 - Release Date: 3/11/2005


 -
 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: html:textarea with tags

2005-11-04 Thread Murray Collingwood
I believe you will find that a textarea doesn't support any embedded html 
codes.  
Everything is treated as plain text no matter what it contains.  Even !-- -- 
is treated as 
text.  

If you know of any sites providing formatted text inside a textarea I would be 
really 
interested (as would most readers) please post the link.  

Cheers
mc



On 4 Nov 2005 at 21:13, Eric Plante wrote:

 Why? The taglib is fine and it shows the text; the problem is that the text
 that is supposed to be printed out also includes some pure html tags which
 aren't parsed.
 
 Ex: if I have font color='red'some text/font the textarea print that
 litteraly instead of printing the text in red.
 
 With bean:write, the filter=false print the text in red but textarea doesn't
 have a filter attribute so I was wondering if there was a way to print the
 text in red in a textarea taglib.
 
  Sounds like you are missing your taglib definition for html?  Can you
 post your JSP
  file?
 
  mc
 
 
  On 4 Nov 2005 at 19:27, Eric Plante wrote:
 
   Hi,
  
   I'd like to use a html:textarea tag but my html tags in the text aren't
   parsed and there is no filter like bean:write has, Is there a way to
 make
   that tag parse html tags?
  
   Thanks
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
   -- 
   No virus found in this incoming message.
   Checked by AVG Free Edition.
   Version: 7.1.362 / Virus Database: 267.12.8/161 - Release Date:
 3/11/2005
  
 
 
 
  FOCUS Computing - web design
  Mob: 0415 24 26 24
  [EMAIL PROTECTED]
  http://www.focus-computing.com.au
 
 
 
 
  -- 
  No virus found in this outgoing message.
  Checked by AVG Free Edition.
  Version: 7.1.362 / Virus Database: 267.12.8/161 - Release Date: 3/11/2005
 
 
  -
  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]
 
 
 
 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.1.362 / Virus Database: 267.12.8/161 - Release Date: 3/11/2005
 



FOCUS Computing - web design
Mob: 0415 24 26 24
[EMAIL PROTECTED]
http://www.focus-computing.com.au




-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.12.8/161 - Release Date: 3/11/2005


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



Re: [shale][clay] CSS style classes on substituted elements

2005-11-04 Thread Craig McClanahan
On 11/4/05, Gary VanMatre [EMAIL PROTECTED] wrote:

  
   I noticed that Craig commited the
   to
   baseHtml. I think this is good, however I think that now if the symbol

   'class' is not explicitly specified then the result will be  
 class=@class Is that right, Gary?
 
 
  Yes, it does do that :-(.
 
  One solution may be to set the value of the 'class' symbol in baseHtml
 to
   empty. So, in baseHtml you have   value=/. Then have a
 conventional that attributes which
   resolve
   to an empty value are omitted. I really can't think of a case you
 would
   want
   an empty attribute value?
 
  Only attributes that have a null value are ignored. This would be an
 attribute that was not given a value attribute. Maybe an empty string should
 also be ignored.

 
  I would want it not to emit the output attribute at all, if there was
 no
  input attribute set. Wouldn't that make more sense?
 
 Ya, currently it kind of works backwards from how you might normally think
 of symbol evaluation. The attribute value is scanned for know symbols.
  Maybe the value should be scanned for a symbol and then use the symbol
 table to lookup the replacement value. If not found, insert an empty string.
 This would be a more efficient way but it would require that we have a
 beginning and ending symbol delimiter. What about @myvar@? Two big O's in
 OOPs.


I don't think inserting an empty string accomplishes what I'm after here,
does it? A zero length string would cause outputting

class=

in the emitted HTML, which is not really any better than

class=@class

that we get with the patch I just applied.

I've also been thinking that the literal string managed-bean-name should
 become a symbol. Now it's inconsistent - the exception. All other symbols
 require an @ delimiter.


Agree with you about that ... and we might want to think about whether there
are any additional symbols that might merit being reserved from the get-go.
On that topic, it might even be better to use a compound name
(@shale:managed-bean-name@ or maybe more economically @shale:bean@) so
that we can avoid future name clashes if additional symbols are added later.

Any objections to:
 1) requiring a begin and end delimiter for symbols,
 2) making the managed bean name a symbol,
 3) ignoring empty string attributes and
 4) changing the symbol replacement method?
Craig
 
 Gary


Craig


Re: [shale][clay] CSS style classes on substituted elements

2005-11-04 Thread Gary VanMatre

 On 11/4/05, Gary VanMatre wrote: 
  

I noticed that Craig commited the 
to 
baseHtml. I think this is good, however I think that now if the symbol 
  
'class' is not explicitly specified then the result will be   
  class=@class Is that right, Gary? 
   
   
   Yes, it does do that :-(. 
   
   One solution may be to set the value of the 'class' symbol in baseHtml 
  to 
empty. So, in baseHtml you have   value=/. Then have a 
  conventional that attributes which 
resolve 
to an empty value are omitted. I really can't think of a case you 
  would 
want 
an empty attribute value? 
   
  Only attributes that have a null value are ignored. This would be an 
  attribute that was not given a value attribute. Maybe an empty string 
  should 
  also be ignored. 
  
   
   I would want it not to emit the output attribute at all, if there was 
  no 
   input attribute set. Wouldn't that make more sense? 
   
  Ya, currently it kind of works backwards from how you might normally think 
  of symbol evaluation. The attribute value is scanned for know symbols. 
  Maybe the value should be scanned for a symbol and then use the symbol 
  table to lookup the replacement value. If not found, insert an empty 
  string. 
  This would be a more efficient way but it would require that we have a 
  beginning and ending symbol delimiter. What about @myvar@? Two big O's in 
  OOPs. 
  
 
 I don't think inserting an empty string accomplishes what I'm after here, 
 does it? A zero length string would cause outputting 
 
 class= 
 
 in the emitted HTML, which is not really any better than 
 
 class=@class 
 
 that we get with the patch I just applied. 

In the PropertyValueCommand we could exit the command if the target attribute 
value was empty after the symbol replacement.
String expr = replaceMnemonic(clayContext);
if (expr.length() == 0) {
   return isFinal;
}

It would work for the example above but not for something like color:@mycolor 
which would return color:.

 
 I've also been thinking that the literal string managed-bean-name should 
  become a symbol. Now it's inconsistent - the exception. All other symbols 
  require an @ delimiter. 
  
 
 Agree with you about that ... and we might want to think about whether there 
 are any additional symbols that might merit being reserved from the get-go. 
 On that topic, it might even be better to use a compound name 
 (@shale:managed-bean-name@ or maybe more economically @shale:bean@) so 
 that we can avoid future name clashes if additional symbols are added later. 
 

I like @shale:managed-bean-name@ since it's more like the faces XML schema.

What do you think about the double delimiter?   

 Any objections to: 
  1) requiring a begin and end delimiter for symbols, 
  2) making the managed bean name a symbol, 
  3) ignoring empty string attributes and 
  4) changing the symbol replacement method? 
   Craig 
   
  Gary 
  
 
 Craig 
 

Re: [shale][clay] CSS style classes on substituted elements

2005-11-04 Thread Craig McClanahan
On 11/4/05, Gary VanMatre [EMAIL PROTECTED] wrote:


  On 11/4/05, Gary VanMatre wrote:
  

 I noticed that Craig commited the
 to
 baseHtml. I think this is good, however I think that now if the
 symbol
  
 'class' is not explicitly specified then the result will be  
   class=@class Is that right, Gary?
   
   
Yes, it does do that :-(.
   
One solution may be to set the value of the 'class' symbol in
 baseHtml
   to
 empty. So, in baseHtml you have   value=/. Then have a
   conventional that attributes which
 resolve
 to an empty value are omitted. I really can't think of a case you
   would
 want
 an empty attribute value?
   
   Only attributes that have a null value are ignored. This would be an
   attribute that was not given a value attribute. Maybe an empty string
 should
   also be ignored.
  
   
I would want it not to emit the output attribute at all, if there
 was
   no
input attribute set. Wouldn't that make more sense?
   
   Ya, currently it kind of works backwards from how you might normally
 think
   of symbol evaluation. The attribute value is scanned for know symbols.
   Maybe the value should be scanned for a symbol and then use the symbol
   table to lookup the replacement value. If not found, insert an empty
 string.
   This would be a more efficient way but it would require that we have a
   beginning and ending symbol delimiter. What about @myvar@? Two big
 O's in
   OOPs.
  
 
  I don't think inserting an empty string accomplishes what I'm after
 here,
  does it? A zero length string would cause outputting
 
  class=
 
  in the emitted HTML, which is not really any better than
 
  class=@class
 
  that we get with the patch I just applied.

 In the PropertyValueCommand we could exit the command if the target
 attribute value was empty after the symbol replacement.
 String expr = replaceMnemonic(clayContext);
 if (expr.length() == 0) {
 return isFinal;
 }

 It would work for the example above but not for something like 
 color:@mycolor which would return color:.


Yep. A key question is whether we'd even want to support replacing *part* of
a value with something that was calculated, versus the whole thing. The
precedents in JSP space (you can't use a partial runtime expression in a
custom tag attribute value ... it's all or nothing) and in JSF space (same
thing with value binding expressions) would encourage not supporting
something like color:@mycolor (or, for that matter, color:@mycolor@).


  I've also been thinking that the literal string managed-bean-name
 should
   become a symbol. Now it's inconsistent - the exception. All other
 symbols
   require an @ delimiter.
  
 
  Agree with you about that ... and we might want to think about whether
 there
  are any additional symbols that might merit being reserved from the
 get-go.
  On that topic, it might even be better to use a compound name
  (@shale:managed-bean-name@ or maybe more economically @shale:bean@)
 so
  that we can avoid future name clashes if additional symbols are added
 later.
 

 I like @shale:managed-bean-name@ since it's more like the faces XML
 schema.


Sounds good.

What do you think about the double delimiter?


Pro: makes it clear where the identifier being replaced ends.

Pro: lets us do literal+expression interleaving later, even if we don't
allow it at the beginning.

Pro: more like other expressions (JSP, JSF) that have beginning and ending
delimiters.

Con: disallows use of the delimiter character inside the expression, unless
we also invent an escaping syntax like a preceding \ character.

Con: one more character to type -- and no, that's not as serious an issue as
the pros :-).

That being said, I'm also wondering if we could reuse the #{...} syntax
that people are already familiar with, by inventing some sort of variable
name that says attribute name xxx on the component being replaced. That
way, you wouldn't have to learn a new syntax, and you'd be able to use more
complicated expressions than just variable replacement.

This will become even more important in a JSF 1.2 world, because the EL
expression evaluation machinery has been pulled out into its own spec (and
its own package namespace) that can be used completely independently of the
web tier. Off the top of my head, maybe something like:

#{shale:attribute.managed-bean-name}

or

#{shale:attribute.class}

?

Craig

 Any objections to:
   1) requiring a begin and end delimiter for symbols,
   2) making the managed bean name a symbol,
   3) ignoring empty string attributes and
   4) changing the symbol replacement method?
Craig
   
   Gary
  
 
  Craig
 



RE: HTML label and Struts text (I know this has been said before)

2005-11-04 Thread Mark Benussi
Perfetemondo!

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED] 
Sent: 04 November 2005 17:18
To: Struts Users Mailing List
Subject: Re: HTML label and Struts text (I know this has been said before)

Actually they do  the styleId arttribute gets rendered as id

Niall

- Original Message - 
From: Dave Newton [EMAIL PROTECTED]
Sent: Friday, November 04, 2005 5:05 PM


 Mark Benussi wrote:

 Is there a way of associating the html label tag with an input. The
 requirements is to assign an id attribute to the html:text tag but I cant
 see a way of doing this.
 
 
 IIRC the stock HTML tags don't produce id attributes, which is
 probably one reason why there are some stirrings about reworking them.

 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: [shale][clay] CSS style classes on substituted elements

2005-11-04 Thread Gary VanMatre
  
   On 11/4/05, Gary VanMatre wrote: 

  
  I noticed that Craig commited the 
  to 
  baseHtml. I think this is good, however I think that now if the 
  symbol 

  'class' is not explicitly specified then the result will be   
class=@class Is that right, Gary? 
 
 
 Yes, it does do that :-(. 
 
 One solution may be to set the value of the 'class' symbol in 
  baseHtml 
to 
  empty. So, in baseHtml you have   value=/. Then have a 
conventional that attributes which 
  resolve 
  to an empty value are omitted. I really can't think of a case you 
would 
  want 
  an empty attribute value? 
 
Only attributes that have a null value are ignored. This would be an 
attribute that was not given a value attribute. Maybe an empty string 
  should 
also be ignored. 

 
 I would want it not to emit the output attribute at all, if there 
  was 
no 
 input attribute set. Wouldn't that make more sense? 
 
Ya, currently it kind of works backwards from how you might normally 
  think 
of symbol evaluation. The attribute value is scanned for know symbols. 
Maybe the value should be scanned for a symbol and then use the symbol 
table to lookup the replacement value. If not found, insert an empty 
  string. 
This would be a more efficient way but it would require that we have a 
beginning and ending symbol delimiter. What about @myvar@? Two big 
  O's in 
OOPs. 

   
   I don't think inserting an empty string accomplishes what I'm after 
  here, 
   does it? A zero length string would cause outputting 
   
   class= 
   
   in the emitted HTML, which is not really any better than 
   
   class=@class 
   
   that we get with the patch I just applied. 
  
  In the PropertyValueCommand we could exit the command if the target 
  attribute value was empty after the symbol replacement. 
  String expr = replaceMnemonic(clayContext); 
  if (expr.length() == 0) { 
  return isFinal; 
  } 
  
  It would work for the example above but not for something like  
  color:@mycolor which would return color:. 
 
 
 Yep. A key question is whether we'd even want to support replacing *part* of 
 a value with something that was calculated, versus the whole thing. The 
 precedents in JSP space (you can't use a partial runtime expression in a 
 custom tag attribute value ... it's all or nothing) and in JSF space (same 
 thing with value binding expressions) would encourage not supporting 
 something like color:@mycolor (or, for that matter, color:@mycolor@). 
 
  
   I've also been thinking that the literal string managed-bean-name 
  should 
become a symbol. Now it's inconsistent - the exception. All other 
  symbols 
require an @ delimiter. 

   
   Agree with you about that ... and we might want to think about whether 
  there 
   are any additional symbols that might merit being reserved from the 
  get-go. 
   On that topic, it might even be better to use a compound name 
   (@shale:managed-bean-name@ or maybe more economically @shale:bean@) 
  so 
   that we can avoid future name clashes if additional symbols are added 
  later. 
   
  
  I like @shale:managed-bean-name@ since it's more like the faces XML 
  schema. 
 
 
 Sounds good. 
 
 What do you think about the double delimiter? 
 
 
 Pro: makes it clear where the identifier being replaced ends. 
 
 Pro: lets us do literal+expression interleaving later, even if we don't 
 allow it at the beginning. 
 
 Pro: more like other expressions (JSP, JSF) that have beginning and ending 
 delimiters. 
 
 Con: disallows use of the delimiter character inside the expression, unless 
 we also invent an escaping syntax like a preceding \ character. 
 
 Con: one more character to type -- and no, that's not as serious an issue as 
 the pros :-). 
 
 That being said, I'm also wondering if we could reuse the #{...} syntax 
 that people are already familiar with, by inventing some sort of variable 
 name that says attribute name xxx on the component being replaced. That 
 way, you wouldn't have to learn a new syntax, and you'd be able to use more 
 complicated expressions than just variable replacement. 
 
 This will become even more important in a JSF 1.2 world, because the EL 
 expression evaluation machinery has been pulled out into its own spec (and 
 its own package namespace) that can be used completely independently of the 
 web tier. Off the top of my head, maybe something like: 
 
 #{shale:attribute.managed-bean-name} 
 
 or 
 
 #{shale:attribute.class} 
 
 ? 

I like the looks of that but how would we handle the managed bean name?
#{#{shale:attribute.managed-bean-name}.address1}

Or, should we leave it #{managed-bean-name.address1} and use the 
#{shale:attribute.class} syntax for clay symbols?  I saw this symbol 
replacement as a layer on top of EL allowing more reuse in component binding.  
If we subscribe to that, a different 

Re: [shale][clay] CSS style classes on substituted elements

2005-11-04 Thread Craig McClanahan
On 11/4/05, Gary VanMatre [EMAIL PROTECTED] wrote:

  
On 11/4/05, Gary VanMatre wrote:

  
   I noticed that Craig commited the
   to
   baseHtml. I think this is good, however I think that now if
 the
   symbol

   'class' is not explicitly specified then the result will be 
 
 class=@class Is that right, Gary?
 
 
  Yes, it does do that :-(.
 
  One solution may be to set the value of the 'class' symbol in
   baseHtml
 to
   empty. So, in baseHtml you have   value=/. Then have a
 conventional that attributes which
   resolve
   to an empty value are omitted. I really can't think of a case
 you
 would
   want
   an empty attribute value?
 
 Only attributes that have a null value are ignored. This would be
 an
 attribute that was not given a value attribute. Maybe an empty
 string
   should
 also be ignored.

 
  I would want it not to emit the output attribute at all, if
 there
   was
 no
  input attribute set. Wouldn't that make more sense?
 
 Ya, currently it kind of works backwards from how you might
 normally
   think
 of symbol evaluation. The attribute value is scanned for know
 symbols.
 Maybe the value should be scanned for a symbol and then use the
 symbol
 table to lookup the replacement value. If not found, insert an
 empty
   string.
 This would be a more efficient way but it would require that we
 have a
 beginning and ending symbol delimiter. What about @myvar@? Two
 big
   O's in
 OOPs.

   
I don't think inserting an empty string accomplishes what I'm after
   here,
does it? A zero length string would cause outputting
   
class=
   
in the emitted HTML, which is not really any better than
   
class=@class
   
that we get with the patch I just applied.
  
   In the PropertyValueCommand we could exit the command if the target
   attribute value was empty after the symbol replacement.
   String expr = replaceMnemonic(clayContext);
   if (expr.length() == 0) {
   return isFinal;
   }
  
   It would work for the example above but not for something like 
   color:@mycolor which would return color:.
 
 
  Yep. A key question is whether we'd even want to support replacing
 *part* of
  a value with something that was calculated, versus the whole thing. The
  precedents in JSP space (you can't use a partial runtime expression in a
  custom tag attribute value ... it's all or nothing) and in JSF space
 (same
  thing with value binding expressions) would encourage not supporting
  something like color:@mycolor (or, for that matter, color:@mycolor
 @).
 
  
I've also been thinking that the literal string managed-bean-name
   should
 become a symbol. Now it's inconsistent - the exception. All other
   symbols
 require an @ delimiter.

   
Agree with you about that ... and we might want to think about
 whether
   there
are any additional symbols that might merit being reserved from the
   get-go.
On that topic, it might even be better to use a compound name
(@shale:managed-bean-name@ or maybe more economically
 @shale:bean@)
   so
that we can avoid future name clashes if additional symbols are
 added
   later.
   
  
   I like @shale:managed-bean-name@ since it's more like the faces XML
   schema.
 
 
  Sounds good.
 
  What do you think about the double delimiter?
 
 
  Pro: makes it clear where the identifier being replaced ends.
 
  Pro: lets us do literal+expression interleaving later, even if we don't
  allow it at the beginning.
 
  Pro: more like other expressions (JSP, JSF) that have beginning and
 ending
  delimiters.
 
  Con: disallows use of the delimiter character inside the expression,
 unless
  we also invent an escaping syntax like a preceding \ character.
 
  Con: one more character to type -- and no, that's not as serious an
 issue as
  the pros :-).
 
  That being said, I'm also wondering if we could reuse the #{...}
 syntax
  that people are already familiar with, by inventing some sort of
 variable
  name that says attribute name xxx on the component being replaced. That
  way, you wouldn't have to learn a new syntax, and you'd be able to use
 more
  complicated expressions than just variable replacement.
 
  This will become even more important in a JSF 1.2 world, because the EL
  expression evaluation machinery has been pulled out into its own spec
 (and
  its own package namespace) that can be used completely independently of
 the
  web tier. Off the top of my head, maybe something like:
 
  #{shale:attribute.managed-bean-name}
 
  or
 
  #{shale:attribute.class}
 
  ?

 I like the looks of that but how would we handle the managed bean name?
 #{#{shale:attribute.managed-bean-name}.address1}


Note that my original example should probably have been

#{shale:managed-bean-name}

because we're not actually talking about an attribute here.

The issue you raise, of