Garann Means

Ranch Hand
+ Follow
since Jan 28, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Garann Means

You have to escape single and double quotes, or Javascript becomes confused. So "O'Connor" needs to be sent to Javascript as "O\'Connor".
I think if you get rid of overflow:auto, the default behavior is for the container to grow with it's contents. If that doesn't happen, I'd tried overflow:visible.
Thanks Alexander, that (unfortunately) confirms what I thought.

(Added)

But I have another question on this topic. How then do I get access to the child tags of my component? Here's what I have in the JSP:



I've tried getChildren(), getFacets(), and adding code to the encodeChildren() method, but I can't seem to get access to these child components. Can anyone help?

Thanks!
g.
[ October 28, 2005: Message edited by: Garann Means ]
19 years ago
JSF
I've had this problem because of the getters in my component. If the getter just returns the local variable from the component, you could add some code to check for a value binding. And of course you need to set up the value binding in the tag handler, as well.
19 years ago
JSF
I'm trying to use some SelectItems within a custom component. I don't get an error, they just aren't rendered when the component gets to encodeChildren().

I was looking at the code for Sun's MenuRenderer, and they seem to be rendering the SelectItems from within the MenuRenderer. Should I take this to mean that I'll need to write my own renderer for SelectItem or handle its rendering within each parent component that might contain it? (My goal is to not re-invent the wheel here.)

Thanks,
g.
19 years ago
JSF
document.write is giving you problems. If you want your output to display below your form, try adding an empty DIV below it and using innerHTML to add your output text to the DIV.

Also...
You don't need a semi-colon inside of quotes in your script, only at the end of the line.
And getElementById only works reliably when you have an ID - your input elements only have names.
Script blocks should include this attribute: type="text/javascript"
And your DOCTYPE isn't valid.

Hope that helps!
g.
I'd advise not using document.write. It can end up limiting your ability to manipulate the DOM. Write a function to generate the elements you need using the DOM. As for sorting, you should really think about doing that on the server.
Sounds like your button is acting as a reset, but there's nothing in the code you posted to support that... It's hard to diagnose the problem without seeing the complete code (hint, hint).
The select element is kind of funny about CSS, but this should work:



The 1px can be changed to control the width of the border, and solid can be changed to other border-style keywords to change the style (to dashed, dotted, etc.).
[ October 25, 2005: Message edited by: Garann Means ]
I'm having a hard time figuring out where to put a resource bundle, or .properties file. Should I put it with the source for my components, or in the web application that uses it? And then how would I reference it in the faces-config file?

Better yet, here's what my faces-config says right now:


Where would that tell the application to look?

Any insight appreciated...
g.
19 years ago
JSF
If all you need is to toggle the label back and forth, you can do this:


[ October 24, 2005: Message edited by: Garann Means ]
How are you calling the function? If you're using 0nchange, I wouldn't think you'd see that behavior...
That's a good question. I don't really know how to run an Eclipse project in Tomcat without going through Eclipse. I'll see if I can figure it out... Thanks for the suggestion!
19 years ago
Thanks for the suggestion, but I'm afraid that didn't do it.
19 years ago
I can't seem to get the path to my application right in its server.xml type file. I have Tomcat in one Eclipse project and the code I want to debug in another. The file currently looks like this:



When I go to localhost:8080/ethos, it tells me the requested resource is not available. Can anyone suggest what I might be doing wrong?

TIA!
g.

Added: Oh, and I post this in here because this is in Mac OSX and it works fine on my Windows PC at work.
[ October 19, 2005: Message edited by: Garann Means ]
19 years ago