Voting poll snippets

Has anyone built a content type to add small voting polls to pages?

An example of what I mean can be found on this BBC News story page http://news.bbc.co.uk/1/hi/uk/6944526.stm where a question is posed with radio buttons to cast your vote, then when submitted the results are displayed as a bar chart. We are considering using JSP for the voting app itself, but the question and answer choices would be determined by content contributors in a content editor and thus stored in the CMS repository.

We will be using Rx 6.1 to develop this but would appreciate any pointers or advice from someone who has already done something similar in Rhythmyx (any version).

Cara

Cara,

I don’t know of anybody who as done this exactly. I did want to tell you that I built a small “comments box” editor (that allows users to post comments on pages) using this technology. It was pretty easy, and it will appear in some of the forthcoming demos.

For this application I used the Spring Web-MVC framework. The “Model” is a simple Java class with properties for each Rhythmyx field. The “View” is a JSP page written using the Spring Forms Tag Library. The “Controller” is a Java class that extends Spring’s SimpleFormController. I used the same Web Services client code that I demonstrated at the last UK user group meeting:

http://forum.percussion.com/showthread.php?t=68

Just as with the previous demo, I deployed this into a separated Tomcat, but it’s a plain vanilla Web App: it should run on the Servlet container of your choice.

Unfortunately, this is not packaged separately (it’s part of our “Blogger” demo package), but I’ll be happy to send some of the source to anybody who wants to use it as an example.

Of course, if your team is more comfortable with Struts or JSF (or some other Web framework) you’re welcome to use those instead of Spring MVC: I just did it this way because we do this all the time in the Server, and I’m more familiar with Spring than other frameworks.

Dave

Thank you Dave. Your response is very helpful