B Webb

Greenhorn
+ Follow
since Sep 30, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by B Webb

I'm not sure if the race conditions I am encountering in Woodstock compomenents are derived from Woodstock components or the underlying Dojo functionality, and I'm hoping you can save me a lot of time by having the answer.

Turns out that the Woodstock Wizard component has some strange behavior, whereby, components do not get drawn, or are not visible, until components that have bindings get rendered. This is not isolated to the wizard component, but is repeatable more often using this component type. I am assuming that the bindings are using asynchronous calls, particularly valueChangeListenerExpression on the Woodstock listbox component.

Also, the most notable missing component in Woodstock, appears to be a onDocumentReady attribute or flag that takes asynch calls into account and doesn't fire until all components are rendered. Does Dojo have this?

Thanks in advance for any help.
Who needs popups when you can use dynamic divs and layering to show your message? In addition, you can use a div, put an iframe in it, and show the new page...Setting a divs z-index to something higher than 2 should do the trick. Also, if the reference to the div (id) is maintained, you can reuse the same div over and over...just change its size and z-index to hide...(1,1 and z-index < 0)
If the objective is to show a message stating "hello world", a simple function in the main bode of the page would suffice (eg. alert("hello world"). On the other hand...

I'll use the car analogy here...If you want to show a car on your home page, and you want to allow the user to design their car first, would you put that code in the main body of the page? Likely not...you would create a car class that receives various parameters submitted by the user, which would return a car object (xml response of various attributes like size, color, number of doors, etc.), that the DOM uses to show the car. This allows you to onSubmit instantiate a car class and pass the parameters in your function...much cleaner and more maintainable.
The short answer is minimal if any. There are several assumptions made regarding your question...first, that the code written is optimal itself. The main benefit of using OO JavaScript in my opinion is the ability to utilize polymorphism and design patterns in JavaScript. While I have not read anything stating there is overhead with loading the source, I can imagine that there is more overhead, than if the script was contained in the body to begin with, but that would defeat the purpose to begin with, since another desire is to modularize your code so you dont have cut-n-paste snippets everywhere.
There are two methods I have found useful in debugging and are listed here in my order of preference:

1. Firebug plugin for Firefox. It allows you to view the DOM and put breakpoints within your class source so you can trace and view values as code gets executed.

2. Under your IE preferences change the advanced settings to allow debugging. Install the free download from MS for Visual Web Developer or Studio. This will allow IE to throw an error and display the source where the error occured. This approach is not very elegant, but is better than the useless messages it shows without it.
Thanks for the move...and looks like <logic:messagesPresent> is going to do it....
18 years ago
I have a jsp that is used by more than one page definition, which dynamically populates the action for the html:form tag. This way, I can reuse the jsp based on the tile definition for a specific page.

Prepopulating the jsp is easy by creating a form object an prepopulating it, however, if an actionerror is returned from the form class, I dont want to repopulate with initial values, but the values that were entered incorrectly, similar to what would happen if I never prepopulated the form to begin with. The error messages would be displayed along with the incorrect entries. So, I though perhaps I could read and see if an actionerror is null or not, and prepopulate based on its contents, but seems like even if I set in the form bean and read in jsp, the actionerror object always seems to be null. I understand that this is caused by the controller. Is this the case, and is there anything else that could help in indicating to the jsp that this is a prepopulate vs a repopulate, vs. a just give control back to the jsp, using prepopulation on initial jsp visit. Also, setting in the action class of the forwarding jsp is not an option for me, must take place in the jsp or form class of the jsp. Thanks.
18 years ago