Newbie BSelect question
Normand Fortier <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
I have been trying to understand Barracuda with the view to apply it to building a fairly extensive web application (actually porting and expanding an existing application written ColdFusion / javascript / servlets). Barracuda seems very promising but daunting. I need help in order to grasp the basics. For instance: I need to create a select element in an html page, which will allow the user to choose an action. In other words, selecting an option and then pressing a button will take the user to a page, according to which option was chosen. Am I right in assuming that, since choosing the option happens on the client side, you have to define a form on the page and then either: - define a javascript event handler on the button, that sets the form action according to the option chosen, and submits the form (this is what I would do spontaneously); or - submit the form and handle it completely on the server side (redirecting according to option chosen)? If that is so, why is Barracuda offering the possibility to link a BAction to a BSelect, or the addEventListener() method on BSelect? What is the point in taking an action based on an event fired by BSelect, if you have no way of knowing which option was selected? I know these sound like elementary questions, but I have put a lot of time trying to understand the components and especially their relationship with the event model. I have read the appropriate tutorials, as well as looked at the source code of the examples and of the components themselves. As mentioned above I have experience with web appications and also with Swing, but none of that seems relevant here. Perhaps I am missing something obvious... Could someone be kind enough to post relevant snippets of html and java code that would accomplish what I am describing? -- Normand Fortier