Re: When will Struts 2.1 be released?
I refered to the problem with treenode. The previous emails are included here. I thought there would be a new release called 2.1. When will we be able to see 2.0.8? Does it work with new Dojo API or the problem is fixed? Thanks, Willa --- This was fixed on trunk, which will be 2.1. The problem you are having is because Dojo changed the API, now instead of passing the id, an object is passed, with a "node" property pointing to the widget object for the selected node, so to get the id of that node, do something like: dojo.even.topic.subscribe("your_topic_here", function(e){ alert("The id is:" + e.node.widgetId); }); musachy On 4/16/07, Minerva CC <[EMAIL PROTECTED]> wrote: > > Hi Dave, > > Thanks for pointing out the problem. But, how can we work around before > you guys post the fix? > > I tried to just put the dojo code that generated by the tree tag and > combined with the code in the showcase and the solution posted by Manu > Mahajan. My test.jsp looks like follows. > > Now, it can fire a node selected event. However, when I tried to show > which node has been selected by display the nodeId, I got [object Object] > displayed. I tried nodeId.id and it didn't work either. I am not familar > with dojo, would you mind to tell me how can I get the id value? > > <%@ taglib prefix="s" uri="/struts-tags"%> > > > > > > > type="text/css"/> > > // Dojo configuration > djConfig = { > baseRelativePath: "/person/struts/dojo", > isDebug: false, > bindEncoding: "UTF-8", > debugAtAllCosts: true // not needed, but allows the Venkman debugger to > work with the includes > }; > > src="/person/struts/dojo/dojo.js"> > src="/person/struts/simple/dojoRequire.js"> > src="/person/struts/ajax/dojoRequire.js"> > src="/person/struts/CommonFunctions.js"> > > <!-- > dojo.require("dojo.lang.*"); > dojo.require("dojo.widget.*"); > dojo.require("dojo.widget.Tree"); > // dojo.hostenv.writeIncludes(); > --> > > > function treeNodeSelected(nodeId) { > alert ('treenode selected: '+ nodeId); > dojo.io.bind({ > url: "<s:url value='showtree.action' />?search_order_id="+nodeId, > load: function(type, data, evt) { > var displayDiv = dojo.byId("displayId"); > displayDiv.innerHTML = data; > }, > mimeType: "text/html" > }); > }; > dojo.event.topic.subscribe("nodeSelected", this, "treeNodeSelected"); > > eventNames="select:nodeSelected"> > > > > > > > > > > > > > > - Original Message > From: Dave Newton <[EMAIL PROTECTED]> > To: Struts Users Mailing List > Sent: Friday, April 13, 2007 4:53:15 PM > Subject: Re: [S2] How to link Tree Node to another dynamic ajax div > > > --- Minerva CC <[EMAIL PROTECTED]> wrote: > > I followed the instruction for the tree tag and > > created a treeview. Now, I want to select a tree > > node and display some data in another ajax div. > > IIRC you need to use Dojo topics to do useful things > with tree events. Alas, I do not think they are > working currently as discussed in a thread a week or > two ago (where I swore my code worked but it had > apparently broken at least a few weeks before and I > hadn't noticed :/ > > For further details, search the archives for thread (I > don't recall the subject) and look for Manu Mahajan's > messages as he was the driver behind a potential fix. > > https://issues.apache.org/struts/browse/WW-1813 > > d. > - Original Message From: Musachy Barroso <[EMAIL PROTECTED]> To: Struts Users Mailing List Sent: Monday, April 30, 2007 4:51:05 PM Subject: Re: When will Struts 2.1 be released? You should probably use 2.0.6, as there is no date set for 2.1 (has ever been a date?). What problems are you referring to? There is a 2.0.8 release coming up. musachy On 4/30/07, Minerva CC <[EMAIL PROTECTED]> wrote: > > Hi, > > I plan to use Struts 2 to build a demo by the end of May. Is there any > release date has been set? Should I wait for the new release or work around > with the problems that the current version has? > > Thanks, > Willa > > __ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com -- "Hey you! Would you help me to carry the stone?" Pink Floyd __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
When will Struts 2.1 be released?
Hi, I plan to use Struts 2 to build a demo by the end of May. Is there any release date has been set? Should I wait for the new release or work around with the problems that the current version has? Thanks, Willa __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[S2] Why s:submit triggers dojo.event.topic twince?
Hi, I tried form submit like the following code. But, I found that every time when I clicked on the submit button, the dojo.event.topic was called twince. Is there anybody who has the same experience? dojo.event.topic.subscribe("/notifyevent", function(data, type, request) { alert('Notify event'); }); Thanks, Willa __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: [S2] How to link Tree Node to another dynamic ajax div
Hi Dave, Thanks for pointing out the problem. But, how can we work around before you guys post the fix? I tried to just put the dojo code that generated by the tree tag and combined with the code in the showcase and the solution posted by Manu Mahajan. My test.jsp looks like follows. Now, it can fire a node selected event. However, when I tried to show which node has been selected by display the nodeId, I got [object Object] displayed. I tried nodeId.id and it didn't work either. I am not familar with dojo, would you mind to tell me how can I get the id value? <%@ taglib prefix="s" uri="/struts-tags"%> // Dojo configuration djConfig = { baseRelativePath: "/person/struts/dojo", isDebug: false, bindEncoding: "UTF-8", debugAtAllCosts: true // not needed, but allows the Venkman debugger to work with the includes }; <!-- dojo.require("dojo.lang.*"); dojo.require("dojo.widget.*"); dojo.require("dojo.widget.Tree"); // dojo.hostenv.writeIncludes(); --> function treeNodeSelected(nodeId) { alert ('treenode selected: '+ nodeId); dojo.io.bind({ url: "<s:url value='showtree.action' />?search_order_id="+nodeId, load: function(type, data, evt) { var displayDiv = dojo.byId("displayId"); displayDiv.innerHTML = data; }, mimeType: "text/html" }); }; dojo.event.topic.subscribe("nodeSelected", this, "treeNodeSelected"); - Original Message From: Dave Newton <[EMAIL PROTECTED]> To: Struts Users Mailing List Sent: Friday, April 13, 2007 4:53:15 PM Subject: Re: [S2] How to link Tree Node to another dynamic ajax div --- Minerva CC <[EMAIL PROTECTED]> wrote: > I followed the instruction for the tree tag and > created a treeview. Now, I want to select a tree > node and display some data in another ajax div. IIRC you need to use Dojo topics to do useful things with tree events. Alas, I do not think they are working currently as discussed in a thread a week or two ago (where I swore my code worked but it had apparently broken at least a few weeks before and I hadn't noticed :/ For further details, search the archives for thread (I don't recall the subject) and look for Manu Mahajan's messages as he was the driver behind a potential fix. https://issues.apache.org/struts/browse/WW-1813 d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[S2] How to link Tree Node to another dynamic ajax div
Hi, I followed the instruction for the tree tag and created a treeview. Now, I want to select a tree node and display some data in another ajax div. This is how I created the treeview: This is what I would do to link ajax to the result action: Now, the question is how do I know if a node is selected? using onSelected attribute to call a javascript function or dojo event? Then, how can I pass the select node id to the id in the action parameter? I know this may be a simple question to most of you. But, I just didn't get it from the manual. Thanks in advance for your help, Willa __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: [S2] Cannot run TabbedPanel tag
Thanks Martin. I tried to add theme="ajax" for the div for the first tab, it works. Now, it generates similar code as you posted here. In conclusion, there are two errors in the document page (http://struts.apache.org/2.x/docs/ajax-tags.html): 1. It didn't say that we need to put on the page. Thanks to Dave Newton for pointing that out. Without this line, the tabs don't show at all, at least in Eclispe WTP environment. 2. Although it gives a warming for the ajax theme, but it doesn't have correct code in the samples. That was why I was confused. Now, I can generate tabs as I want. Many thanks to the people who support this community. Willa - Original Message From: Martin Gainty <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Sent: Friday, April 13, 2007 12:25:11 PM Subject: Re: [S2] Cannot run TabbedPanel tag The struts examples define the individual Tab categories as dojo.require("dojo.widget.TabContainer"); dojo.require("dojo.widget.LinkPane"); dojo.require("dojo.widget.ContentPane"); then populate the div tags using the predefined dojoTypes Unknown page Unknown configuration Unknown or unavailable Action class HTH M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Minerva CC" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, April 13, 2007 2:01 PM Subject: Re: [S2] Cannot run TabbedPanel tag > Thanks Dave for your help. > > I tried to add in my page and all the html tags to > the test.jsp. Then, I got only one tab showing up, which is dynamic one > with a close icon. In the panel, I have both panel contents displayed. > When I click on the close icon, the dynamic panel content was collapsed. > > I also tried to put the theme ajax all over the place, in the header, > outside and inside the tabbedpanel and I got the same result. Would you be > kindly point it out what is wrong? > > <%@ taglib prefix="s" uri="/struts-tags"%> > > > > > > > > > selectedTab="dynamic" id="test"> > > This is an static content tab. > > > > > > > > Thanks, > Willa > > - Original Message > From: Dave Newton <[EMAIL PROTECTED]> > To: Struts Users Mailing List <[EMAIL PROTECTED]> > Sent: Friday, April 13, 2007 10:03:04 AM > Subject: Re: [S2] Cannot run TabbedPanel tag > > > --- Minerva CC <[EMAIL PROTECTED]> wrote: >> <%@ taglib prefix="s" uri="/struts-tags"%>> id="ajaxTest" value="/AjaxTest.action" >> />> closeButton="tab" selectedTab="dynamic" >> id="test">This is >> an static content tab.> href="%{ajaxTest}" theme="ajax" label="dynamic" >> id="dynamic">This is a dynamic content tab. The >> content of this div will be replaced with the text >> returned from >> "/AjaxTest.action" >> But, when I run it I got an error that the attribute >> id is required for the TabbedPanlel. So, I added a >> id and run it again. Then, it populated a page with >> the text strings, but no tabs. When I view the >> source code, I can see the following code has been >> generated: > > Do you have the on your page? > > Also, as general rule, you should generate well-formed > HTML. In other words, create a complete HTML page, not > just a JSP fragment, if you are dispatching directly > to a JSP. > > d. > > > __ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > __ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com Ahhh...imagining that irresistible "new car" smell? Check out new cars at Yahoo! Autos. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: [S2] Cannot run TabbedPanel tag
Thanks Dave for your help. I tried to add in my page and all the html tags to the test.jsp. Then, I got only one tab showing up, which is dynamic one with a close icon. In the panel, I have both panel contents displayed. When I click on the close icon, the dynamic panel content was collapsed. I also tried to put the theme ajax all over the place, in the header, outside and inside the tabbedpanel and I got the same result. Would you be kindly point it out what is wrong? <%@ taglib prefix="s" uri="/struts-tags"%> This is an static content tab. Thanks, Willa - Original Message From: Dave Newton <[EMAIL PROTECTED]> To: Struts Users Mailing List <[EMAIL PROTECTED]> Sent: Friday, April 13, 2007 10:03:04 AM Subject: Re: [S2] Cannot run TabbedPanel tag --- Minerva CC <[EMAIL PROTECTED]> wrote: > <%@ taglib prefix="s" uri="/struts-tags"%> id="ajaxTest" value="/AjaxTest.action" > /> closeButton="tab" selectedTab="dynamic" > id="test">This is > an static content tab. href="%{ajaxTest}" theme="ajax" label="dynamic" > id="dynamic">This is a dynamic content tab. The > content of this div will be replaced with the text > returned from > "/AjaxTest.action" > But, when I run it I got an error that the attribute > id is required for the TabbedPanlel. So, I added a > id and run it again. Then, it populated a page with > the text strings, but no tabs. When I view the > source code, I can see the following code has been > generated: Do you have the on your page? Also, as general rule, you should generate well-formed HTML. In other words, create a complete HTML page, not just a JSP fragment, if you are dispatching directly to a JSP. d. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[S2] Cannot run TabbedPanel tag
Hi, I try to run the TabbedPanel sample code in the Strut 2 document http://struts.apache.org/2.x/docs/ajax-tags.html. I cut and paste the sample code to a test.jsp as follows: <%@ taglib prefix="s" uri="/struts-tags"%>This is an static content tab.This is a dynamic content tab. The content of this div will be replaced with the text returned from "/AjaxTest.action" But, when I run it I got an error that the attribute id is required for the TabbedPanlel. So, I added a id and run it again. Then, it populated a page with the text strings, but no tabs. When I view the source code, I can see the following code has been generated: dojo.require("dojo.widget.TabContainer"); dojo.require("dojo.widget.LinkPane"); dojo.require("dojo.widget.ContentPane"); This is an static content tab. This is a dynamic content tab. The content of this div will be replaced with the text returned from "/AjaxTest.action" What should I do in order to generate Tabbed panels? Thanks in advance for your help, Willa __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: [S2] Iterator and Index
Since there are no "indexed" and "property" attributes for the tag. So, I tried this: Then, Struts 2 generated this: First Name: Last Name: Thanks, Willa - Original Message From: Laurie Harper <[EMAIL PROTECTED]> To: user@struts.apache.org Sent: Wednesday, April 11, 2007 3:35:15 PM Subject: Re: [S2] Iterator and Index Minerva CC wrote: > Hi, > > I want to generate indexed html elements via iterator. In Struts 1, I would > do it as follows: > > > > > > > Then Struts 1 will generate the output like this: > > > > > > > > > > Now, how can I do the same with Struts 2? I tried and > . But, they don't have have equivalent attributes. Is there > anyone who has an idea how to do it? What did you try? s:iterator and s:textfield seem like the right pair of tags to use. I think Struts 2 will take care of the property indexing for you automatically (could be wrong on that though). L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. http://tools.search.yahoo.com/toolbar/features/mail/
Re: [S2] How to pass a Javascript variable to Struts parameter?
Hi musachy, Thanks for pointing it out. I forgot what environment I am in now. My last project was .NET desktop application. Anyhow, what I am trying to do is to pick up a id from a table. Then, pass this id to an Ajax link as parameter. I used an onClick function to setup a javascript variable as id. Then, in the struts part, I have the following lines Refresh Obviously, this won't work as you already pointed out the tags run on the server side. Is there anyway I can get around it? Thanks, Willa - Original Message From: Musachy Barroso <[EMAIL PROTECTED]> To: Struts Users Mailing List Sent: Tuesday, April 10, 2007 2:16:24 PM Subject: Re: How to pass a Javascript variable to Struts parameter? Tags are evaluated on the *server* side, javascript runs on the *client* side. Can you give more details on what you are trying to do? regards musachy On 4/10/07, Minerva CC <[EMAIL PROTECTED]> wrote: > > Hi, > > I tried to pass a Javascript variable to a struts url tag and I did it as > follow: > > In the Javascript part: > var id_ = 10; > > In the struts tag par: > > > > > But, it didn' work. Would somebody tell me how to do it? > > Thanks in advance for you help. > Willa > > > > > > TV dinner still cooling? > Check out "Tonight's Picks" on Yahoo! TV. > http://tv.yahoo.com/ -- "Hey you! Would you help me to carry the stone?" Pink Floyd Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. http://videogames.yahoo.com/platform?platform=120121
[S2] Iterator and Index
Hi, I want to generate indexed html elements via iterator. In Struts 1, I would do it as follows: Then Struts 1 will generate the output like this: ... Now, how can I do the same with Struts 2? I tried and . But, they don't have have equivalent attributes. Is there anyone who has an idea how to do it? Thanks, Willa We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. http://tv.yahoo.com/collections/265
Re: Cannot define a display style class in
Hi Piero, Thank you so much for your help again :-) I am new to struts and Java. But, I lean it from your every day. Willa - Original Message From: Piero Sartini <[EMAIL PROTECTED]> To: Struts Users Mailing List Sent: Tuesday, April 10, 2007 4:28:50 PM Subject: Re: Cannot define a display style class in There is the "cssClass" parameter for (all?) struts2 tags. view search results More information: http://struts.apache.org/2.x/docs/a.html Piero On Wednesday 11 April 2007 01:10:43 Minerva CC wrote: > Hi, > > I tried to define a display style class in tag as follows > > > > > view search results > > But, when I run it, I got org.apache.jasper.JasperException: > /pages/searchRequest.jsp(81,4) Attribute class invalid for tag a according > to TLD error. > > My question is how can we define a style for a url link? > > Thanks, > Willa > > > > ___ >_ Don't get soaked. Take a quick peak at the forecast > with the Yahoo! Search weather shortcut. > http://tools.search.yahoo.com/shortcuts/#loc_weather - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Don't pick lemons. See all the new 2007 cars at Yahoo! Autos. http://autos.yahoo.com/new_cars.html
Cannot define a display style class in
Hi, I tried to define a display style class in tag as follows view search results But, when I run it, I got org.apache.jasper.JasperException: /pages/searchRequest.jsp(81,4) Attribute class invalid for tag a according to TLD error. My question is how can we define a style for a url link? Thanks, Willa Don't get soaked. Take a quick peak at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather
Date Binding
Hi, I have another simple question here. I want to setup jsp pages to update a List, e.g. searchParameters In my Action class I have: public class SearchParameterAction implements Preparable { private SearchParameterService service; private List searchParameters; In the main.jsp page: Refresh In the list.jsp: <%@ taglib prefix="s" uri="/struts-tags"%> Search Parameters "> Remove Now, I want to change some values in the text fields and update the database afterward. The questions are: 1. Is my object searchParameters actually bound to the text fields? If it isn't, how to do the data binding? 2. When I issue a update action, how can I access the searchParameters object in the Action class? In Struts 1, one can access it via requst.getParameter() method. What should I do in the Struts 2? Thanks in advance for your help, Willa Don't pick lemons. See all the new 2007 cars at Yahoo! Autos. http://autos.yahoo.com/new_cars.html
How to pass a Javascript variable to Struts parameter?
Hi, I tried to pass a Javascript variable to a struts url tag and I did it as follow: In the Javascript part: var id_ = 10; In the struts tag par: But, it didn' work. Would somebody tell me how to do it? Thanks in advance for you help. Willa TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. http://tv.yahoo.com/
Re: Struts 2 + Spring 2 + JPA + AJAX Tutorial
Hi Piero, Thank you so much for your help. I setup log4j properties file and now I am able to debug the server startup. Actually the problem was caused by a missing Action class, which I deleted last night by a accident. Now, everything is working again. Thank you again for you support-:) Willa - Original Message From: Piero Sartini <[EMAIL PROTECTED]> To: Struts Users Mailing List Sent: Saturday, April 7, 2007 3:20:23 PM Subject: Re: Struts 2 + Spring 2 + JPA + AJAX Tutorial > Apr 7, 2007 1:47:30 PM org.apache.catalina.core.StandardContext start > SEVERE: Error listenerStart > Apr 7, 2007 1:47:30 PM org.apache.catalina.core.StandardContext start > SEVERE: Context [/person] startup failed due to previous errors looks like there is a problem with a listener in your web.xml > I tried to > setup a log4j properties file. But, I am new to Eclipse Web development > environment, I couldn't fine a right place for the log4j.properties file > and also what properties I should setup catch the problems. The log4j.properties file should be in the root of your classpath. btw if you are new to Eclipse, give NetBeans a try as well. Piero - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Looking for earth-friendly autos? Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center. http://autos.yahoo.com/green_center/
Struts 2 + Spring 2 + JPA + AJAX Tutorial
Hi, I read thru Struts 2 + Spring 2 + JPA + AJAX tutorial and found it is a great example to start Struts 2. So, I setup a Eclipse and Tomcat environment to run the tutorial and everything works fine. However, when I tried to add something more, I encountered a problem: Apr 7, 2007 1:47:30 PM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Apr 7, 2007 1:47:30 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/person] startup failed due to previous errors I knew there is something wrong with my code. May be in the Actions or may be in the db services. But, how can I know where is the problem? I tried to setup a log4j properties file. But, I am new to Eclipse Web development environment, I couldn't fine a right place for the log4j.properties file and also what properties I should setup catch the problems. Thank you in advance for your help. Willa Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. http://farechase.yahoo.com/promo-generic-14795097