RedirectAction supports "anchor" param
I've opened this minor documentation issue as: https://issues.apache.org/jira/browse/WW-3652 Affected files will be: src/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java (needs javadoc updates) -Roland
Re: Create a struts ajax anchor using javascript
I just avoided the use of JSON, and use the and approach instead. Not what i have originally planned but works as well. Thanks everyone. Paweł Wielgus wrote: > > Hi Christian, > can't You update a div or a form or a table with parsed contents of a > json from ajax call. Or even simplier, get this whole "a href" from > ajax call at the first place, and don't use json here at all. Have in > mind that strut is something completly different than ajax, those are > two different worlds. > > Best greetings, > Pawel Wielgus. > > 2009/9/12, Christian Javellana : >> >> Hi All, >> >> I'd like to know if there is a way how to build a struts anchor >> (theme='ajax') using javascript alone? >> >> I'd like to construct a struts ajax anchor wherein the href value comes >> from >> a JSON response. Is there a way to do this? >> -- >> View this message in context: >> http://www.nabble.com/Create-a-struts-ajax-anchor-using-javascript-tp25419564p25419564.html >> Sent from the Struts - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > -- View this message in context: http://www.nabble.com/Create-a-struts-ajax-anchor-using-javascript-tp25419564p25430683.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Create a struts ajax anchor using javascript
Hi Christian, can't You update a div or a form or a table with parsed contents of a json from ajax call. Or even simplier, get this whole "a href" from ajax call at the first place, and don't use json here at all. Have in mind that strut is something completly different than ajax, those are two different worlds. Best greetings, Pawel Wielgus. 2009/9/12, Christian Javellana : > > Hi All, > > I'd like to know if there is a way how to build a struts anchor > (theme='ajax') using javascript alone? > > I'd like to construct a struts ajax anchor wherein the href value comes from > a JSON response. Is there a way to do this? > -- > View this message in context: > http://www.nabble.com/Create-a-struts-ajax-anchor-using-javascript-tp25419564p25419564.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Create a struts ajax anchor using javascript
Hi All, I'd like to know if there is a way how to build a struts anchor (theme='ajax') using javascript alone? I'd like to construct a struts ajax anchor wherein the href value comes from a JSON response. Is there a way to do this? -- View this message in context: http://www.nabble.com/Create-a-struts-ajax-anchor-using-javascript-tp25419564p25419564.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Struts2 - dojo anchor error
Hi, I think I have missed something. I have a JSP page and in that I have the mailto:d...@newfield.org] Sent: Friday, July 03, 2009 8:10 PM To: Struts Users Mailing List Subject: Re: Struts2 - dojo anchor error Kishan G. Chellap Paandy wrote: > Here is what I'm doing. > <%@ taglib prefix="sx" uri="/struts-dojo-tags" %> > OK, this looks like a jsp page... > <@s.url id="sort" namespace="${parameters.nameSpace}" action="Sort"> > <@s.param name="id" value="${tmpIdVal}"/> > > <@sx.a href="${sort}" key="app.sort" targets="content"> > " alt="<@s.text > name="app.sort"/>" title="<@s.text name="app.sort"/>" border="0" width="14" > height="15"/> > But this does not. Those "@FOO." bits should be "FOO:", then you have to change the JSTL expressions to OGNL because rtexprvalue is false for the struts tags (to avoid a security issue). http://struts.apache.org/2.1.6/docs/tag-reference.html http://struts.apache.org/2.1.6/docs/tag-syntax.html -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org DISCLAIMER: This email message and all attachments are confidential and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this email is strictly prohibited. If you have received this email in error, please notify us immediately by return email or to mailad...@spanservices.com and destroy the original message. Opinions, conclusions, and other information in this message that do not relate to the official business of SPAN, shall be understood to be neither given nor endorsed by SPAN. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts2 - dojo anchor error
Kishan G. Chellap Paandy wrote: Here is what I'm doing. <%@ taglib prefix="sx" uri="/struts-dojo-tags" %> OK, this looks like a jsp page... <@s.url id="sort" namespace="${parameters.nameSpace}" action="Sort"> <@s.param name="id" value="${tmpIdVal}"/> <@sx.a href="${sort}" key="app.sort" targets="content"> " alt="<@s.text name="app.sort"/>" title="<@s.text name="app.sort"/>" border="0" width="14" height="15"/> But this does not. Those "@FOO." bits should be "FOO:", then you have to change the JSTL expressions to OGNL because rtexprvalue is false for the struts tags (to avoid a security issue). http://struts.apache.org/2.1.6/docs/tag-reference.html http://struts.apache.org/2.1.6/docs/tag-syntax.html -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Struts2 - dojo anchor error
Hi Dave, Thanks for your reply. Here is what I'm doing. <%@ taglib prefix="sx" uri="/struts-dojo-tags" %> . . <@s.url id="sort" namespace="${parameters.nameSpace}" action="Sort"> <@s.param name="id" value="${tmpIdVal}"/> <@sx.a href="${sort}" key="app.sort" targets="content"> " alt="<@s.text name="app.sort"/>" title="<@s.text name="app.sort"/>" border="0" width="14" height="15"/> xxx . . . . . . . But when I do the above and when I click on the sort image on the table header, it should go to the action and update the content div part with the jsp. It is indeed going to the action, but in the content div part I'm getting "undefined" text in IE 7. But the same is working in Mozilla 2. I'm using Struts 2.1.6. Thank you. Regards, Kishan.G Team Leader. www.spansystems.com -Original Message- From: Dave Newton [mailto:newton.d...@yahoo.com] Sent: Thursday, July 02, 2009 3:02 PM To: Struts Users Mailing List Subject: Re: Struts2 - dojo anchor error Kishan G. Chellap Paandy wrote: > Referring to: http://struts.apache.org/2.1.6/docs/dojo-anchor.html > > "There's a bug in IE6/IE7 which makes impossible to use the target's > attribute with a parent Div, because such Div's content's are > overwritten with the tag's loadingText. Resulting in an "undefined" > message in the content's, instead of the result of the request. > > One possible alternative is to set showLoadingText="false" and set > the indicator attribute to an element showing the desired loading > text or image (outside the div)." > > The alternative mentioned above is also not working. > > Is there is any solution for this apart from the mentioned > alternative? What specific issue are you having? AFAIK the anchor tag works. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts2 - dojo anchor error
Kishan G. Chellap Paandy wrote: Referring to: http://struts.apache.org/2.1.6/docs/dojo-anchor.html "There's a bug in IE6/IE7 which makes impossible to use the target's attribute with a parent Div, because such Div's content's are overwritten with the tag's loadingText. Resulting in an "undefined" message in the content's, instead of the result of the request. One possible alternative is to set showLoadingText="false" and set the indicator attribute to an element showing the desired loading text or image (outside the div)." The alternative mentioned above is also not working. Is there is any solution for this apart from the mentioned alternative? What specific issue are you having? AFAIK the anchor tag works. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Struts2 - dojo anchor error
Hi Folks, Referring to: http://struts.apache.org/2.1.6/docs/dojo-anchor.html "There's a bug in IE6/IE7 which makes impossible to use the target's attribute with a parent Div, because such Div's content's are overwritten with the tag's loadingText. Resulting in an "undefined" message in the content's, instead of the result of the request. One possible alternative is to set showLoadingText="false" and set the indicator attribute to an element showing the desired loading text or image (outside the div)." The alternative mentioned above is also not working. Is there is any solution for this apart from the mentioned alternative? Please advice. Thank you. Regards, Kishan.G Team Leader. www.spansystems.com - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Using Anchor Component for creating custom anchor tag
Hi Martin Yes, I have insured that the stack, request and response objects are not null. Here is an extract of mergeTemplate function in Anchor class. I tried setting the template as well before initializing Anchor object but no luck. protected void mergeTemplate(Writer writer, Template template) throws Exception { final TemplateEngine engine = templateEngineManager.getTemplateEngine(template, templateSuffix); if (engine == null) { throw new ConfigurationException("Unable to find a TemplateEngine for template " + template); } if (LOG.isDebugEnabled()) { LOG.debug("Rendering template " + template); } final TemplateRenderingContext context = new TemplateRenderingContext(template, writer, getStack(), getParameters(), this); engine.renderTemplate(context); } Manoj -Original Message- From: Martin Gainty [mailto:mgai...@hotmail.com] Sent: 24 March 2009 19:38 To: Struts Users Mailing List Subject: RE: Using Anchor Component for creating custom anchor tag Have you verified the Anchor Tag's 3 required parameters stack, request, response are initialised properrly and non null before constructing the anchor tag ? Martin __ Disclaimer and confidentiality note This message is confidential and may be privileged. If you are not the intended recipient, we kindly ask you to please inform the sender. Any unauthorised dissemination or copying hereof is prohibited. This message serves for information purposes only and shall not have any legally binding effect. Given that e-mails can easily be subject to manipulation, we can not accept any liability for the content provided. > Subject: Using Anchor Component for creating custom anchor tag > Date: Tue, 24 Mar 2009 16:15:29 + > From: manoj.dh...@sword-soft.com > To: user@struts.apache.org > > Hi, > > > > I am trying to create a custom anchor component using > org.apache.struts2.components.Anchor. This is done inside a custom > component that I am creating. > > Method that initializes Anchor component is as follows : > > > private void createLink(String action, Containable item, Writer > writer) { > > > > Component a = createAnchor(action, item); > > a.start(writer); > >a.end(writer, item.getName()); > > } > > > > private Anchor createAnchor(String action, Containable item){ > > Anchor a = new Anchor(stack, req, resp); > > a.setHref(action); > > return a; > > } > > However, if my code tries to create a link I get follwing error : > > > java.lang.NullPointerException > > at > org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:549) > > at > org.apache.struts2.components.ClosingUIBean.start(ClosingUIBean.java:59) > > at > com.poc.struts2.component.FolderBrowserComponent.createLink(FolderBrowse > rComponent.java:70) > > at > com.poc.struts2.component.FolderBrowserComponent.processItem(FolderBrows > erComponent.java:116) > > at > com.poc.struts2.component.FolderBrowserComponent.start(FolderBrowserComp > onent.java:58) > > at > org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTag > Support.java:53) > > at > org.apache.jsp.Folderbrowser_jsp._jspx_meth_bol_005ffolderbrowser_005f0( > Folderbrowser_jsp.java:145) > > at > org.apache.jsp.Folderbrowser_jsp._jspService(Folderbrowser_jsp.java:90) > > at > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > > at > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja > va:374) > > at > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) > > at > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > > > Could you please guide me what is the problem with template ? Do I need > to create a custom template or need to set a default template ? > > > > Thanks in advance. > > > > Regards, > > > > Manoj Dhore > > > > > > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom > they are addressed.
RE: Using Anchor Component for creating custom anchor tag
Have you verified the Anchor Tag's 3 required parameters stack, request, response are initialised properrly and non null before constructing the anchor tag ? Martin __ Disclaimer and confidentiality note This message is confidential and may be privileged. If you are not the intended recipient, we kindly ask you to please inform the sender. Any unauthorised dissemination or copying hereof is prohibited. This message serves for information purposes only and shall not have any legally binding effect. Given that e-mails can easily be subject to manipulation, we can not accept any liability for the content provided. > Subject: Using Anchor Component for creating custom anchor tag > Date: Tue, 24 Mar 2009 16:15:29 + > From: manoj.dh...@sword-soft.com > To: user@struts.apache.org > > Hi, > > > > I am trying to create a custom anchor component using > org.apache.struts2.components.Anchor. This is done inside a custom > component that I am creating. > > Method that initializes Anchor component is as follows : > > > private void createLink(String action, Containable item, Writer > writer) { > > > > Component a = createAnchor(action, item); > >a.start(writer); > >a.end(writer, item.getName()); > > } > > > > private Anchor createAnchor(String action, Containable item){ > > Anchor a = new Anchor(stack, req, resp); > > a.setHref(action); > > return a; > > } > > However, if my code tries to create a link I get follwing error : > > > java.lang.NullPointerException > > at > org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:549) > > at > org.apache.struts2.components.ClosingUIBean.start(ClosingUIBean.java:59) > > at > com.poc.struts2.component.FolderBrowserComponent.createLink(FolderBrowse > rComponent.java:70) > > at > com.poc.struts2.component.FolderBrowserComponent.processItem(FolderBrows > erComponent.java:116) > > at > com.poc.struts2.component.FolderBrowserComponent.start(FolderBrowserComp > onent.java:58) > > at > org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTag > Support.java:53) > > at > org.apache.jsp.Folderbrowser_jsp._jspx_meth_bol_005ffolderbrowser_005f0( > Folderbrowser_jsp.java:145) > > at > org.apache.jsp.Folderbrowser_jsp._jspService(Folderbrowser_jsp.java:90) > > at > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > > at > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja > va:374) > > at > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) > > at > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > > > Could you please guide me what is the problem with template ? Do I need > to create a custom template or need to set a default template ? > > > > Thanks in advance. > > > > Regards, > > > > Manoj Dhore > > > > > > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom > they are addressed. > If you have received this email in error please notify the > originator of the message. This footer also confirms that this > email message has been scanned for the presence of computer viruses. > > Any views expressed in this message are those of the individual > sender, except where the sender specifies and with authority, > states them to be the views of Sword Intech. > > Scanning of this message and addition of this footer is performed > by Websense Email Security software in conjunction with > virus detection software. > _ Express your personality in color! Preview and select themes for Hotmail®. http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=TXT_MSGTX_WL_HM_express_032009#colortheme
Using Anchor Component for creating custom anchor tag
Hi, I am trying to create a custom anchor component using org.apache.struts2.components.Anchor. This is done inside a custom component that I am creating. Method that initializes Anchor component is as follows : private void createLink(String action, Containable item, Writer writer) { Component a = createAnchor(action, item); a.start(writer); a.end(writer, item.getName()); } private Anchor createAnchor(String action, Containable item){ Anchor a = new Anchor(stack, req, resp); a.setHref(action); return a; } However, if my code tries to create a link I get follwing error : java.lang.NullPointerException at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:549) at org.apache.struts2.components.ClosingUIBean.start(ClosingUIBean.java:59) at com.poc.struts2.component.FolderBrowserComponent.createLink(FolderBrowse rComponent.java:70) at com.poc.struts2.component.FolderBrowserComponent.processItem(FolderBrows erComponent.java:116) at com.poc.struts2.component.FolderBrowserComponent.start(FolderBrowserComp onent.java:58) at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTag Support.java:53) at org.apache.jsp.Folderbrowser_jsp._jspx_meth_bol_005ffolderbrowser_005f0( Folderbrowser_jsp.java:145) at org.apache.jsp.Folderbrowser_jsp._jspService(Folderbrowser_jsp.java:90) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:374) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) Could you please guide me what is the problem with template ? Do I need to create a custom template or need to set a default template ? Thanks in advance. Regards, Manoj Dhore _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the originator of the message. This footer also confirms that this email message has been scanned for the presence of computer viruses. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Sword Intech. Scanning of this message and addition of this footer is performed by Websense Email Security software in conjunction with virus detection software.
Re: [S2] Ajax Anchor Tag
On Tuesday 03 February 2009 14:48:54 you wrote: > That is what I had hoped for. Unfortunately, it appears that the formId > property is only considered when using the ajax theme. > > Thanks, > Ken > Oh, I guess I misunderstood the question. There is no struts-y way to do it, other than using the AJAX theme. The best bet will be to link your href to a javascript function that builds the link based on the values of the form inputs and then go to it. To make it easier on yourself, specify the id values of your inputs, so that you can grab them (of course, you could iterate your form, too). -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: [S2] Ajax Anchor Tag
That is what I had hoped for. Unfortunately, it appears that the formId property is only considered when using the ajax theme. Thanks, Ken -Original Message- From: Wes Wannemacher [mailto:w...@wantii.com] Sent: Tuesday, February 03, 2009 2:45 PM To: Struts Users Mailing List Subject: Re: [S2] Ajax Anchor Tag On Tuesday 03 February 2009 14:39:25 Hoying, Ken wrote: > I would like to take advantage of the Struts 2 Ajax Anchor tag's > functionality to build the url on the client based on an href and the > parameters for a given form (formId). However, I do not want the call > to be made asynchronously. I just want it to build the url and then > get it normally. I am using Struts 2.0.11.1. Is there a way that to > accomplish this? > > Thanks in advance, > Ken I believe if you are using the simple theme (or any non-ajax theme) the url will be built and a link made for a synchronous request. -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - ***Note:The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the Sender immediately by replying to the message and deleting it from your computer. Thank you. Premier Inc. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [S2] Ajax Anchor Tag
On Tuesday 03 February 2009 14:39:25 Hoying, Ken wrote: > I would like to take advantage of the Struts 2 Ajax Anchor tag's > functionality to build the url on the client based on an href and the > parameters for a given form (formId). However, I do not want the call to > be made asynchronously. I just want it to build the url and then get it > normally. I am using Struts 2.0.11.1. Is there a way that to accomplish > this? > > Thanks in advance, > Ken I believe if you are using the simple theme (or any non-ajax theme) the url will be built and a link made for a synchronous request. -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
[S2] Ajax Anchor Tag
I would like to take advantage of the Struts 2 Ajax Anchor tag's functionality to build the url on the client based on an href and the parameters for a given form (formId). However, I do not want the call to be made asynchronously. I just want it to build the url and then get it normally. I am using Struts 2.0.11.1. Is there a way that to accomplish this? Thanks in advance, Ken - ***Note:The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the Sender immediately by replying to the message and deleting it from your computer. Thank you. Premier Inc. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Adding anchor link in treenodes
Hi All, How to add a anchor href to a tree node? I tried few options but none working. I first tried like below: 7 In this way its not evaluating 7 And its printing nothing at all. I want to show the node information when that node is clicked. -- Best Regards, Faraz Ali
Re: submit form with anchor
<s:form action="myAction/#p" > ... Kibo wrote: > > Hi konference > > I use Struts 2.0. I need submit form with anchor. I know that stuts tag > form dont support atribute anchor, but how do I do it? > > describe: > I have long form. I have two submit buttons inside. > First button has label "Save" and save values from form. It work correct. > Second submit button has label "Add field" and when I click on button it > add text field in form. After perform Action it return to the same long > form. I work correct, but it return on top of form. > I need return to anchor ( <a name="myAnchor"></a> ) inside > form. > > > Can you help my please with this problem? > Thanks a lot. > - Tomas Jurman Czech Republic -- View this message in context: http://www.nabble.com/submit-form-with-anchor-tp20788096p20827987.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
submit form with anchor
Hi konference I use Struts 2.0. I need submit form with anchor. I know that stuts tag form dont support atribute anchor, but how do I do it? describe: I have long form. I have two submit buttons inside. First button has label "Save" and save values from form. It work correct. Second submit button has label "Add field" and when I click on button it add text field in form. After perform Action it return to the same long form. I work correct, but it return on top of form. I need return to anchor ( <a name="myAnchor"></a> ) inside form. Can you help my please with this problem? Thanks a lot. - Tomas Jurman Czech Republic -- View this message in context: http://www.nabble.com/submit-form-with-anchor-tp20788096p20788096.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
customizing anchor w/freemarker
I'm responsible for porting a web application to Struts2 and the original app had the concept of "enabled", "disabled", or "hidden" for its __web controls__. In Struts 2, it was relatively easy to mimic this behavior by simply creating freemarker templates to customize those controls that needed this behavior and reverting to template.simple for the rest using a theme.properties file that included the line parent = simple An example In template.company, I might have a file named combobox.ftl with the following <#assign template_control="/${parameters.templateDir}/simple/combobox.ftl" /> <#if parameters.state?exists> <#if parameters.state == "enabled"> <#include template_control /> <#elseif parameters.state == "disabled"> <#assign parameters = parameters + {"disabled":true} /> <#include template_control /> <#else> <#include template_control /> Then if I write the struts tag as follows... Where if ui.control_name.state returns "disabled", disable the control, or "hidden" don't include the control at all in the final rendered output. This works for all the controls I need except for the anchor tag. It has both a.ftl and a-close.ftl. When I try to do the same with a.ftl using the following... The variable parameters.state is not available to a.ftl, but only to a-close.ftl, which is a little too late. I've tried lumping everything together in a-close.ftl like the following... <#assign template_control1="/${parameters.templateDir}/simple/a.ftl" /> <#assign template_control2="/${parameters.templateDir}/simple/a-close.ftl" /> <#if parameters.state?exists> <#if parameters.state == "enabled"> <#include template_control1 /> <#include template_control2 /> <#elseif parameters.state == "disabled"> <#assign parameters = parameters + {"href":""} /> <#include template_control1 /> <#include template_control2 /> <#else> <#include template_control1 /> <#include template_control2 /> But this doesn't work since the contents of (whether they be strings or other html tags) are render after the a.ftl is rendered, putting the contents of just before the rendered tag. My question.. is there a way I can pass in arbitrary parameters that a.ftl can see and use to direct the creating of anchor tag? Filipe Ps: Sorry for the lengthy post... I hope I was clear.
Re: [struts2] url tag not evaluating OGNL in anchor attribute
Nah, the web.xml has no jsp-config at all. Daniel On Sat, Aug 23, 2008 at 8:28 PM, Martin Gainty <[EMAIL PROTECTED]> wrote: > > check your el-ignored parameter in web.xml > does it look like > > > *.jsp > true > > ? > Martin > __ > Disclaimer and confidentiality note > Everything in this e-mail and any attachments relates to the official > business of Sender. This transmission is of a confidential nature and Sender > does not endorse distribution to any party other than intended recipient. > Sender does not necessarily endorse content contained within this > transmission. > > > > Date: Sat, 23 Aug 2008 18:08:23 -0400 > > From: [EMAIL PROTECTED] > > To: user@struts.apache.org > > Subject: Re: [struts2] url tag not evaluating OGNL in anchor attribute > > > > I found the same behavior with 2.1.2 Beta, although the bug WW-2015 > claims > > it is fixed in 2.0.10. > > > > Thanks, > > > > Daniel > > > > >
RE: [struts2] url tag not evaluating OGNL in anchor attribute
--- On Sat, 8/23/08, Martin Gainty <[EMAIL PROTECTED]> wrote: > check your el-ignored parameter in web.xml > does it look like > > > *.jsp > true > > ? That won't affect S2's evaluating OGNL in a tag attribute, AFAIK. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [struts2] url tag not evaluating OGNL in anchor attribute
check your el-ignored parameter in web.xml does it look like *.jsp true ? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > Date: Sat, 23 Aug 2008 18:08:23 -0400 > From: [EMAIL PROTECTED] > To: user@struts.apache.org > Subject: Re: [struts2] url tag not evaluating OGNL in anchor attribute > > I found the same behavior with 2.1.2 Beta, although the bug WW-2015 claims > it is fixed in 2.0.10. > > Thanks, > > Daniel > > On Tue, Jun 24, 2008 at 4:34 AM, Volker Krebs <[EMAIL PROTECTED]> wrote: > > > Hello, > > > > I have the following in my JSP Page: > > > > > > It seems that the anchor attribute is not evaluating the OGNL. > > I guess it's the same problem like this one: > > https://issues.apache.org/struts/browse/WW-2015 > > > > or is there any reason for not evaluating OGNL ? > > > > Thanks, > > Volker > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > _ Get ideas on sharing photos from people like you. Find new ways to share. http://www.windowslive.com/explore/photogallery/posts?ocid=TXT_TAGLM_WL_Photo_Gallery_082008
Re: [struts2] url tag not evaluating OGNL in anchor attribute
I found the same behavior with 2.1.2 Beta, although the bug WW-2015 claims it is fixed in 2.0.10. Thanks, Daniel On Tue, Jun 24, 2008 at 4:34 AM, Volker Krebs <[EMAIL PROTECTED]> wrote: > Hello, > > I have the following in my JSP Page: > > > It seems that the anchor attribute is not evaluating the OGNL. > I guess it's the same problem like this one: > https://issues.apache.org/struts/browse/WW-2015 > > or is there any reason for not evaluating OGNL ? > > Thanks, > Volker > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: disabled attribute not rendered for Anchor tag
Forgot to mention, i am using struts-2.0.11.2. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
disabled attribute not rendered for Anchor tag
can anyone please let me know if there is any issue with disabled attribute of Anchor tag? Cause i am not getting the expected behaviour out of the tag. i used Test and expected 'Test' coming as disabled. but its not happening. Thanks, Avinash - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dojo anchor: get widget id and targets attributes inside subscribed topic?
1.I've sent email to dojo-interest@ 2.http://dojotoolkit.org/ forum keeps silence. Maybe my problems have different solutions and I'm trying to solve in the wrong way? I've spent approximately 2 business days and nothing has been found. Jim Kiley wrote: > > What did the dojo mailing list [1] [2] recommend? > > jk > [1] [EMAIL PROTECTED] > [2] http://dojotoolkit.org/* > * > On Wed, Jul 30, 2008 at 8:57 AM, holod <[EMAIL PROTECTED]> wrote: > >> >> I use dojo anchor widget (). >> It successfully gets response in json from server, but I have several >> problems accessing widget, that published a topic. >> Please, see my code: >> dojo.event.topic.subscribe("/after", function(data, request, widget){ >>alert('inside a topic event. after request'); >>//data : text returned from request(the html) >>//request: XMLHttpRequest object >>//widget: widget that published the topic >> }); >> >> Problems: >> 1. Can't change data value. If I use inside dojo.event.topic.subscribe: >> data = "this my new data!"; >> alert("This is my new response from server: " + data); >> >> alert shows, that data value was changed, >> but targets of dojo anchor get previous value (why???). >> 2.I can't get widget properties: id of widget or targets. That's >> terrible, >> I >> need them very much. I've dumped the object widget, but there are no >> fields >> like id or targets. >> -- >> View this message in context: >> http://www.nabble.com/dojo-anchor%3A-get-widget-id-and-targets-attributes-inside-subscribed-topic--tp18732617p18732617.html >> Sent from the Struts - User mailing list archive at Nabble.com. >> >> >> ----- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > Jim Kiley > Technical Consultant | Summa > [p] 412.258.3346 [m] 412.445.1729 > http://www.summa-tech.com > > -- View this message in context: http://www.nabble.com/dojo-anchor%3A-get-widget-id-and-targets-attributes-inside-subscribed-topic--tp18732617p18733244.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dojo anchor: get widget id and targets attributes inside subscribed topic?
What did the dojo mailing list [1] [2] recommend? jk [1] [EMAIL PROTECTED] [2] http://dojotoolkit.org/* * On Wed, Jul 30, 2008 at 8:57 AM, holod <[EMAIL PROTECTED]> wrote: > > I use dojo anchor widget (). > It successfully gets response in json from server, but I have several > problems accessing widget, that published a topic. > Please, see my code: > dojo.event.topic.subscribe("/after", function(data, request, widget){ >alert('inside a topic event. after request'); >//data : text returned from request(the html) >//request: XMLHttpRequest object >//widget: widget that published the topic > }); > > Problems: > 1. Can't change data value. If I use inside dojo.event.topic.subscribe: > data = "this my new data!"; > alert("This is my new response from server: " + data); > > alert shows, that data value was changed, > but targets of dojo anchor get previous value (why???). > 2.I can't get widget properties: id of widget or targets. That's terrible, > I > need them very much. I've dumped the object widget, but there are no fields > like id or targets. > -- > View this message in context: > http://www.nabble.com/dojo-anchor%3A-get-widget-id-and-targets-attributes-inside-subscribed-topic--tp18732617p18732617.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Jim Kiley Technical Consultant | Summa [p] 412.258.3346 [m] 412.445.1729 http://www.summa-tech.com
dojo anchor: get widget id and targets attributes inside subscribed topic?
I use dojo anchor widget (). It successfully gets response in json from server, but I have several problems accessing widget, that published a topic. Please, see my code: dojo.event.topic.subscribe("/after", function(data, request, widget){ alert('inside a topic event. after request'); //data : text returned from request(the html) //request: XMLHttpRequest object //widget: widget that published the topic }); Problems: 1. Can't change data value. If I use inside dojo.event.topic.subscribe: data = "this my new data!"; alert("This is my new response from server: " + data); alert shows, that data value was changed, but targets of dojo anchor get previous value (why???). 2.I can't get widget properties: id of widget or targets. That's terrible, I need them very much. I've dumped the object widget, but there are no fields like id or targets. -- View this message in context: http://www.nabble.com/dojo-anchor%3A-get-widget-id-and-targets-attributes-inside-subscribed-topic--tp18732617p18732617.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[struts2] url tag not evaluating OGNL in anchor attribute
Hello, I have the following in my JSP Page: It seems that the anchor attribute is not evaluating the OGNL. I guess it's the same problem like this one: https://issues.apache.org/struts/browse/WW-2015 or is there any reason for not evaluating OGNL ? Thanks, Volker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What is the functionality of struts 2 anchor tag?
this.href will give you the href value; I assume what Musachy posted will give you the OGNL evaluated value. Why can't you use that? L. akshi gupta wrote: I want to write my custom tag because my aim is to get the href value for the authorisation so that I can able to render the link according to the conditions. Thats why I am writing my own custom tag by extending struts anchor tag class. Now can you suggest me how I will get href value in my own custom tag by extending struts anchor tag. Thanks, Akshi Gupta. Laurie Harper wrote: As far as I can see, most of that code is redundant; removing all the noise, this would be completely equivalent: package com.axis.tag; import java.util.Properties; import com.axis.utils.PropertyLoader; public class MyAnchorTag extends AnchorTag { @Override public int doStartTag() throws JspException { Properties props = PropertyLoader.loadPropertiesBundle("resources/permissionParameter"); String permission = props.getProperty("permission"); System.out.println(" Method :" + permission); if(permission == null){ return super.doStartTag(); } return SKIP_BODY; } } And that doesn't seem to relate in any way to the question you're asking. In particular, it doesn't use or access the href attribute in any way, nor does it attempt to use the method Musachy mentioned. So, what do you actually want to do, and how is it not working? L. akshi gupta wrote: Hello, I am unable to use this method in my tag handler can you please help me .. Following is my tag handler code : package com.axis.tag; import java.util.Properties; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.Tag; import javax.servlet.jsp.PageContext; import javax.servlet.jsp.tagext.BodyContent; import org.apache.struts2.components.Component; import org.apache.struts2.views.jsp.ui.AnchorTag; import com.axis.utils.PropertyLoader; import com.opensymphony.xwork2.util.ValueStack; public class MyAnchorTag extends AnchorTag { /** * */ private static final long serialVersionUID = 1L; private PageContext pageContext; private Tag parent; protected String preInvokeJS; protected String targets; protected ValueStack stack ; public HttpServletRequest req; public HttpServletResponse res; @Override public void doInitBody() throws JspException { super.doInitBody(); } @Override public void setBodyContent(BodyContent arg0) { super.setBodyContent(arg0); } @Override public int doAfterBody() throws JspException { return super.doAfterBody(); } @Override public int doStartTag() throws JspException { Properties props = PropertyLoader.loadPropertiesBundle("resources/permissionParameter"); String permission = props.getProperty("permission"); System.out.println(" Method :" + permission); if(permission == null){ return super.doStartTag(); } return SKIP_BODY; } @Override public int doEndTag() throws JspException { return EVAL_BODY_INCLUDE; } @Override public Tag getParent() { return super.getParent(); } @Override public Component getComponent() { // TODO Auto-generated method stub return super.getComponent(); } @Override public void release() { super.release(); } @Override public void setPageContext(PageContext pageContext) { this.pageContext = pageContext; super.setPageContext(pageContext); } @Override public void setParent(Tag parent) { this.parent = parent; super.setParent(parent); } @Override public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { return super.getBean(stack, req, res); } @Override protected void populateParams() { // TODO Auto-generated method stub super.populateParams(); } } Thanks, Akshi Musachy Barroso wrote: In org.apache.struts2.components.Achor public void evaluateExtraParams() { super.evaluateExtraParams(); if (href != null) addParameter("href", ensureAttributeSafelyNotEscaped(findString(href))); } On Fri, May 9, 2008 at 9:59 AM, akshi gupta <[EMAIL PROTECTED]> wrote: Actually I am writing my own custom tag by extending AnchorTag class because I want "href" value for some business rules thats why I wanthref evaluated value. Now can you tell me from which method href evaluated value is coming? Thanks, Akshi Musachy Barroso wrote: I am not really sure why you want to know but here is the short explanation: This will construct a url like: "/edit.action", and p
Re: What is the functionality of struts 2 anchor tag?
I want to write my custom tag because my aim is to get the href value for the authorisation so that I can able to render the link according to the conditions. Thats why I am writing my own custom tag by extending struts anchor tag class. Now can you suggest me how I will get href value in my own custom tag by extending struts anchor tag. Thanks, Akshi Gupta. Laurie Harper wrote: As far as I can see, most of that code is redundant; removing all the noise, this would be completely equivalent: package com.axis.tag; import java.util.Properties; import com.axis.utils.PropertyLoader; public class MyAnchorTag extends AnchorTag { @Override public int doStartTag() throws JspException { Properties props = PropertyLoader.loadPropertiesBundle("resources/permissionParameter"); String permission = props.getProperty("permission"); System.out.println(" Method :" + permission); if(permission == null){ return super.doStartTag(); } return SKIP_BODY; } } And that doesn't seem to relate in any way to the question you're asking. In particular, it doesn't use or access the href attribute in any way, nor does it attempt to use the method Musachy mentioned. So, what do you actually want to do, and how is it not working? L. akshi gupta wrote: Hello, I am unable to use this method in my tag handler can you please help me .. Following is my tag handler code : package com.axis.tag; import java.util.Properties; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.Tag; import javax.servlet.jsp.PageContext; import javax.servlet.jsp.tagext.BodyContent; import org.apache.struts2.components.Component; import org.apache.struts2.views.jsp.ui.AnchorTag; import com.axis.utils.PropertyLoader; import com.opensymphony.xwork2.util.ValueStack; public class MyAnchorTag extends AnchorTag { /** * */ private static final long serialVersionUID = 1L; private PageContext pageContext; private Tag parent; protected String preInvokeJS; protected String targets; protected ValueStack stack ; public HttpServletRequest req; public HttpServletResponse res; @Override public void doInitBody() throws JspException { super.doInitBody(); } @Override public void setBodyContent(BodyContent arg0) { super.setBodyContent(arg0); } @Override public int doAfterBody() throws JspException { return super.doAfterBody(); } @Override public int doStartTag() throws JspException { Properties props = PropertyLoader.loadPropertiesBundle("resources/permissionParameter"); String permission = props.getProperty("permission"); System.out.println(" Method :" + permission); if(permission == null){ return super.doStartTag(); } return SKIP_BODY; } @Override public int doEndTag() throws JspException { return EVAL_BODY_INCLUDE; } @Override public Tag getParent() { return super.getParent(); } @Override public Component getComponent() { // TODO Auto-generated method stub return super.getComponent(); } @Override public void release() { super.release(); } @Override public void setPageContext(PageContext pageContext) { this.pageContext = pageContext; super.setPageContext(pageContext); } @Override public void setParent(Tag parent) { this.parent = parent; super.setParent(parent); } @Override public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { return super.getBean(stack, req, res); } @Override protected void populateParams() { // TODO Auto-generated method stub super.populateParams(); } } Thanks, Akshi Musachy Barroso wrote: In org.apache.struts2.components.Achor public void evaluateExtraParams() { super.evaluateExtraParams(); if (href != null) addParameter("href", ensureAttributeSafelyNotEscaped(findString(href))); } On Fri, May 9, 2008 at 9:59 AM, akshi gupta <[EMAIL PROTECTED]> wrote: Actually I am writing my own custom tag by extending AnchorTag class because I want "href" value for some business rules thats why I wanthref evaluated value. Now can you tell me from which method href evaluated value is coming? Thanks, Akshi Musachy Barroso wrote: I am not really sure why you want to know but here is the short explanation: This will construct a url like: "/edit.action", and push it into the stack, associated with the key "edit" (from the "id" attribute). Later on Edit "%{edit}" will be evaluated against
Re: What is the functionality of struts 2 anchor tag?
As far as I can see, most of that code is redundant; removing all the noise, this would be completely equivalent: package com.axis.tag; import java.util.Properties; import com.axis.utils.PropertyLoader; public class MyAnchorTag extends AnchorTag { @Override public int doStartTag() throws JspException { Properties props = PropertyLoader.loadPropertiesBundle("resources/permissionParameter"); String permission = props.getProperty("permission"); System.out.println(" Method :" + permission); if(permission == null){ return super.doStartTag(); } return SKIP_BODY; } } And that doesn't seem to relate in any way to the question you're asking. In particular, it doesn't use or access the href attribute in any way, nor does it attempt to use the method Musachy mentioned. So, what do you actually want to do, and how is it not working? L. akshi gupta wrote: Hello, I am unable to use this method in my tag handler can you please help me .. Following is my tag handler code : package com.axis.tag; import java.util.Properties; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.Tag; import javax.servlet.jsp.PageContext; import javax.servlet.jsp.tagext.BodyContent; import org.apache.struts2.components.Component; import org.apache.struts2.views.jsp.ui.AnchorTag; import com.axis.utils.PropertyLoader; import com.opensymphony.xwork2.util.ValueStack; public class MyAnchorTag extends AnchorTag { /** * */ private static final long serialVersionUID = 1L; private PageContext pageContext; private Tag parent; protected String preInvokeJS; protected String targets; protected ValueStack stack ; public HttpServletRequest req; public HttpServletResponse res; @Override public void doInitBody() throws JspException { super.doInitBody(); } @Override public void setBodyContent(BodyContent arg0) { super.setBodyContent(arg0); } @Override public int doAfterBody() throws JspException { return super.doAfterBody(); } @Override public int doStartTag() throws JspException { Properties props = PropertyLoader.loadPropertiesBundle("resources/permissionParameter"); String permission = props.getProperty("permission"); System.out.println(" Method :" + permission); if(permission == null){ return super.doStartTag(); } return SKIP_BODY; } @Override public int doEndTag() throws JspException { return EVAL_BODY_INCLUDE; } @Override public Tag getParent() { return super.getParent(); } @Override public Component getComponent() { // TODO Auto-generated method stub return super.getComponent(); } @Override public void release() { super.release(); } @Override public void setPageContext(PageContext pageContext) { this.pageContext = pageContext; super.setPageContext(pageContext); } @Override public void setParent(Tag parent) { this.parent = parent; super.setParent(parent); } @Override public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { return super.getBean(stack, req, res); } @Override protected void populateParams() { // TODO Auto-generated method stub super.populateParams(); } } Thanks, Akshi Musachy Barroso wrote: In org.apache.struts2.components.Achor public void evaluateExtraParams() { super.evaluateExtraParams(); if (href != null) addParameter("href", ensureAttributeSafelyNotEscaped(findString(href))); } On Fri, May 9, 2008 at 9:59 AM, akshi gupta <[EMAIL PROTECTED]> wrote: Actually I am writing my own custom tag by extending AnchorTag class because I want "href" value for some business rules thats why I wanthref evaluated value. Now can you tell me from which method href evaluated value is coming? Thanks, Akshi Musachy Barroso wrote: I am not really sure why you want to know but here is the short explanation: This will construct a url like: "/edit.action", and push it into the stack, associated with the key "edit" (from the "id" attribute). Later on Edit "%{edit}" will be evaluated against the stack and "/edit.action" will be found, so that is the value that the anchor tag will use on its href. musachy On Fri, May 9, 2008 at 8:59 AM, akshi gupta <[EMAIL PROTECTED]> wrote: Hello, If we use anchor tag like this : (ListSuccess.jsp) : > <%@ taglib prefix="s" uri="/struts-tags"%> .
Re: What is the functionality of struts 2 anchor tag?
Hello, I am unable to use this method in my tag handler can you please help me . Following is my tag handler code : package com.axis.tag; import java.util.Properties; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.Tag; import javax.servlet.jsp.PageContext; import javax.servlet.jsp.tagext.BodyContent; import org.apache.struts2.components.Component; import org.apache.struts2.views.jsp.ui.AnchorTag; import com.axis.utils.PropertyLoader; import com.opensymphony.xwork2.util.ValueStack; public class MyAnchorTag extends AnchorTag { /** * */ private static final long serialVersionUID = 1L; private PageContext pageContext; private Tag parent; protected String preInvokeJS; protected String targets; protected ValueStack stack ; public HttpServletRequest req; public HttpServletResponse res; @Override public void doInitBody() throws JspException { super.doInitBody(); } @Override public void setBodyContent(BodyContent arg0) { super.setBodyContent(arg0); } @Override public int doAfterBody() throws JspException { return super.doAfterBody(); } @Override public int doStartTag() throws JspException { Properties props = PropertyLoader.loadPropertiesBundle("resources/permissionParameter"); String permission = props.getProperty("permission"); System.out.println(" Method :" + permission); if(permission == null){ return super.doStartTag(); } return SKIP_BODY; } @Override public int doEndTag() throws JspException { return EVAL_BODY_INCLUDE; } @Override public Tag getParent() { return super.getParent(); } @Override public Component getComponent() { // TODO Auto-generated method stub return super.getComponent(); } @Override public void release() { super.release(); } @Override public void setPageContext(PageContext pageContext) { this.pageContext = pageContext; super.setPageContext(pageContext); } @Override public void setParent(Tag parent) { this.parent = parent; super.setParent(parent); } @Override public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { return super.getBean(stack, req, res); } @Override protected void populateParams() { // TODO Auto-generated method stub super.populateParams(); } } Thanks, Akshi Musachy Barroso wrote: In org.apache.struts2.components.Achor public void evaluateExtraParams() { super.evaluateExtraParams(); if (href != null) addParameter("href", ensureAttributeSafelyNotEscaped(findString(href))); } On Fri, May 9, 2008 at 9:59 AM, akshi gupta <[EMAIL PROTECTED]> wrote: Actually I am writing my own custom tag by extending AnchorTag class because I want "href" value for some business rules thats why I wanthref evaluated value. Now can you tell me from which method href evaluated value is coming? Thanks, Akshi Musachy Barroso wrote: I am not really sure why you want to know but here is the short explanation: This will construct a url like: "/edit.action", and push it into the stack, associated with the key "edit" (from the "id" attribute). Later on Edit "%{edit}" will be evaluated against the stack and "/edit.action" will be found, so that is the value that the anchor tag will use on its href. musachy On Fri, May 9, 2008 at 8:59 AM, akshi gupta <[EMAIL PROTECTED]> wrote: Hello, If we use anchor tag like this : (ListSuccess.jsp) : > <%@ taglib prefix="s" uri="/struts-tags"%> . . > > Edit Now , how href value get parse and get the complete url ? Exactly through which method of the AnchorTag.java? Can anyone please help me out ? Thanks, Akshi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What is the functionality of struts 2 anchor tag?
In org.apache.struts2.components.Achor public void evaluateExtraParams() { super.evaluateExtraParams(); if (href != null) addParameter("href", ensureAttributeSafelyNotEscaped(findString(href))); } On Fri, May 9, 2008 at 9:59 AM, akshi gupta <[EMAIL PROTECTED]> wrote: > Actually I am writing my own custom tag by extending AnchorTag class because > I want "href" value for some business rules thats why I wanthref evaluated > value. > > Now can you tell me from which method href evaluated value is coming? > > Thanks, > Akshi > > > Musachy Barroso wrote: >> >> I am not really sure why you want to know but here is the short >> explanation: >> >> >> >> This will construct a url like: "/edit.action", and push it into the >> stack, associated with the key "edit" (from the "id" attribute). Later >> on >> >> Edit >> >> "%{edit}" will be evaluated against the stack and "/edit.action" will >> be found, so that is the value that the anchor tag will use on its >> href. >> >> musachy >> >> >> On Fri, May 9, 2008 at 8:59 AM, akshi gupta <[EMAIL PROTECTED]> wrote: >> >>> >>> Hello, >>> >>> If we use anchor tag like this : >>> >>> (ListSuccess.jsp) : > <%@ taglib prefix="s" >>> uri="/struts-tags"%> >>> . >>> . >>> > >> namespace="/" >>> /> >>> > Edit >>> >>> >>> Now , how href value get parse and get the complete url ? >>> Exactly through which method of the AnchorTag.java? >>> >>> Can anyone please help me out ? >>> >>> >>> Thanks, >>> >>> Akshi >>> >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >> >> >> >> > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What is the functionality of struts 2 anchor tag?
Actually I am writing my own custom tag by extending AnchorTag class because I want "href" value for some business rules thats why I wanthref evaluated value. Now can you tell me from which method href evaluated value is coming? Thanks, Akshi Musachy Barroso wrote: I am not really sure why you want to know but here is the short explanation: This will construct a url like: "/edit.action", and push it into the stack, associated with the key "edit" (from the "id" attribute). Later on Edit "%{edit}" will be evaluated against the stack and "/edit.action" will be found, so that is the value that the anchor tag will use on its href. musachy On Fri, May 9, 2008 at 8:59 AM, akshi gupta <[EMAIL PROTECTED]> wrote: Hello, If we use anchor tag like this : (ListSuccess.jsp) : > <%@ taglib prefix="s" uri="/struts-tags"%> . . > > Edit Now , how href value get parse and get the complete url ? Exactly through which method of the AnchorTag.java? Can anyone please help me out ? Thanks, Akshi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What is the functionality of struts 2 anchor tag?
I am not really sure why you want to know but here is the short explanation: This will construct a url like: "/edit.action", and push it into the stack, associated with the key "edit" (from the "id" attribute). Later on Edit "%{edit}" will be evaluated against the stack and "/edit.action" will be found, so that is the value that the anchor tag will use on its href. musachy On Fri, May 9, 2008 at 8:59 AM, akshi gupta <[EMAIL PROTECTED]> wrote: > Hello, > > If we use anchor tag like this : > > (ListSuccess.jsp) : > <%@ taglib prefix="s" > uri="/struts-tags"%> > . > . > > /> > > Edit > > > Now , how href value get parse and get the complete url ? > Exactly through which method of the AnchorTag.java? > > Can anyone please help me out ? > > > Thanks, > > Akshi > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
What is the functionality of struts 2 anchor tag?
Hello, If we use anchor tag like this : (ListSuccess.jsp) : > <%@ taglib prefix="s" uri="/struts-tags"%> . . > namespace="/" /> > Edit Now , how href value get parse and get the complete url ? Exactly through which method of the AnchorTag.java? Can anyone please help me out ? Thanks, Akshi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Struts2] anchor tag performance with ajax
I'm using the tag and I'm experience a severe performance penalty. This is with Struts 2.0.11 As part of my JSP page I have "> There are 5 other plain text columns in the table. There are around 350 rows in the table. The JSP is loaded into a that is a tab of a The full set of tabs takes around 1 minute 10 seconds to fully load (i.e. the browser stops processing the page). If I remove the two tags in the fragment above, then the page takes 35 seconds to load. These timings are from Firefox 2.0.11, but IE7 has a similar problem (IE7 gives a message about 'the script on this page is taking a long time') Dojo seems to process result of the tags, during which time the browser takes 50% of the CPU and is unresponsive. Is there any way I can manually generate the final result of the output of the tag to avoid this. If I can't, then I will need to remove all the struts ajax tags and do everything 'by hand' Thanks for your time. Pete - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Struts2] Ajax anchor tag problem
Thanks Wong, yeah, I will try to implement your suggestion.. On Jan 22, 2008 12:07 AM, WongTseng <[EMAIL PROTECTED]> wrote: > since the request is sent via ajax, so the browser side redirect can > not work. i suggest you don't redirect you user directly, instead you > send back a piece of js, let the js redirect the browser. > > window.location='xxx'; > > > 2008/1/21, Raghuveer Rawat <[EMAIL PROTECTED]>: > > Thanks Robi, I think you are right but how to come out of this ajax call > if > > something goes wrong.sometimes I am getting some technical error and > > error page is also opening under target div. > > Is there anyone who faced this issue early? > > > > > > On Jan 21, 2008 3:29 PM, Roberto Nunnari <[EMAIL PROTECTED]> > wrote: > > > > > oopss.. sorry.. I read your post to fast and didn't notice you already > > > tried redirect-action.. > > > > > > I believe the problem is that it's not the browser who is getting the > > > redirect message from the server, but the ajax async call system, and > so > > > it puts the login form in the div, as it was instructed.. but as I'm > > > not an ajax guru, I could be wrong. > > > > > > Best regards. > > > > > > -- > > > Robi > > > > > > > > > Roberto Nunnari wrote: > > > > try this: > > > > > > > > login > > > > > > > > Best regards. > > > > > > > > -- > > > > Robi > > > > > > > > > > > > Raghuveer Rawat wrote: > > > >> Hi, I have a requirement where only logged in users are allowed to > put > > > >> their > > > >> comment. I have implemented that form with struts2 ajax > theme...anchor > > > >> has > > > >> theme="ajax" > > > >> > > > >> If logged in user puts his comment then everything works fine > > > >> perfectly..I am able to see text message returned from action in > target > > > >> div > > > >> > > > >> But when a user who is not logged in and try to put this comment..I > > > >> want to > > > >> redirect user to login page..*but there what is happening here is > that > > > >> login > > > >> page is also streaming back and it is opening in target div..* > > > >> > > > >> Any idea how to redirect user to login page.. > > > >> > > > >> Below is my action class method.. > > > >> > > > >> public String addComment() { > > > >> try{ > > > >> UserTO userTo = null; > > > >> Object user = this.getSession().get("user"); > > > >> if(user == null){ > > > >> return Action.LOGIN; > > > >> }else{ > > > >> userTo = (UserTO) user; > > > >> } > > > >> this.getCommentTo().setUserId(userTo.getUserId()); > > > >> this.getCommentTo().setArticleId(this.getArticleId()); > > > >> > > > >> this.getCommentService().addComment(this.getCommentTo > ()); > > > >> HttpServletResponse response = > > > >> ServletActionContext.getResponse > > > >> (); > > > >> //inputStream = new StringBufferInputStream("Comment > Posted > > > >> Successfully."); > > > >> String successMsg = "Thanks for posting comment. Your > > > comment > > > >> has been added successfully."; > > > >> byte[] contents = successMsg.getBytes(); > > > >> response.getOutputStream().write(contents); > > > >> > > > >> }catch(Exception ex){ > > > >> LOG.error("Exception in myArticles():"+ ex); > > > >> return Action.ERROR; > > > >> } > > > >> return null; > > > >> } > > > >> > > > >> > > > >> This is my comment form... > > > >> > > > >> > > > >> > > > >> > >
Re: [Struts2] Ajax anchor tag problem
since the request is sent via ajax, so the browser side redirect can not work. i suggest you don't redirect you user directly, instead you send back a piece of js, let the js redirect the browser. window.location='xxx'; 2008/1/21, Raghuveer Rawat <[EMAIL PROTECTED]>: > Thanks Robi, I think you are right but how to come out of this ajax call if > something goes wrong.sometimes I am getting some technical error and > error page is also opening under target div. > Is there anyone who faced this issue early? > > > On Jan 21, 2008 3:29 PM, Roberto Nunnari <[EMAIL PROTECTED]> wrote: > > > oopss.. sorry.. I read your post to fast and didn't notice you already > > tried redirect-action.. > > > > I believe the problem is that it's not the browser who is getting the > > redirect message from the server, but the ajax async call system, and so > > it puts the login form in the div, as it was instructed.. but as I'm > > not an ajax guru, I could be wrong. > > > > Best regards. > > > > -- > > Robi > > > > > > Roberto Nunnari wrote: > > > try this: > > > > > > login > > > > > > Best regards. > > > > > > -- > > > Robi > > > > > > > > > Raghuveer Rawat wrote: > > >> Hi, I have a requirement where only logged in users are allowed to put > > >> their > > >> comment. I have implemented that form with struts2 ajax theme...anchor > > >> has > > >> theme="ajax" > > >> > > >> If logged in user puts his comment then everything works fine > > >> perfectly..I am able to see text message returned from action in target > > >> div > > >> > > >> But when a user who is not logged in and try to put this comment..I > > >> want to > > >> redirect user to login page..*but there what is happening here is that > > >> login > > >> page is also streaming back and it is opening in target div..* > > >> > > >> Any idea how to redirect user to login page.. > > >> > > >> Below is my action class method.. > > >> > > >> public String addComment() { > > >> try{ > > >> UserTO userTo = null; > > >> Object user = this.getSession().get("user"); > > >> if(user == null){ > > >> return Action.LOGIN; > > >> }else{ > > >> userTo = (UserTO) user; > > >> } > > >> this.getCommentTo().setUserId(userTo.getUserId()); > > >> this.getCommentTo().setArticleId(this.getArticleId()); > > >> > > >> this.getCommentService().addComment(this.getCommentTo()); > > >> HttpServletResponse response = > > >> ServletActionContext.getResponse > > >> (); > > >> //inputStream = new StringBufferInputStream("Comment Posted > > >> Successfully."); > > >> String successMsg = "Thanks for posting comment. Your > > comment > > >> has been added successfully."; > > >> byte[] contents = successMsg.getBytes(); > > >> response.getOutputStream().write(contents); > > >> > > >> }catch(Exception ex){ > > >> LOG.error("Exception in myArticles():"+ ex); > > >> return Action.ERROR; > > >> } > > >> return null; > > >> } > > >> > > >> > > >> This is my comment form... > > >> > > >> > > >> > > >> > > >> > > >> > > >> > >> cellpadding="2"> > > >> > > >> Your > > >> Comments > > >> > > >> > > >> > >> cols="40"> > > >> > > >> > > >> > > >> > > >> > > >> > > >> Add > > >> Comment > > >> > > >> > > >> > > >> > > >> > > >> Below is struts.xml entry..I am using tiles and default results are > > tile > > >> definitionsI also tried using redirect-action and redirect but > > >> that also > > >> give same problem.. > > >> > > >> > > >> login > > >> > > >> > > >> > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- Best Regards Wong Tseng - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Struts2] Ajax anchor tag problem
Thanks Robi, I think you are right but how to come out of this ajax call if something goes wrong.sometimes I am getting some technical error and error page is also opening under target div. Is there anyone who faced this issue early? On Jan 21, 2008 3:29 PM, Roberto Nunnari <[EMAIL PROTECTED]> wrote: > oopss.. sorry.. I read your post to fast and didn't notice you already > tried redirect-action.. > > I believe the problem is that it's not the browser who is getting the > redirect message from the server, but the ajax async call system, and so > it puts the login form in the div, as it was instructed.. but as I'm > not an ajax guru, I could be wrong. > > Best regards. > > -- > Robi > > > Roberto Nunnari wrote: > > try this: > > > > login > > > > Best regards. > > > > -- > > Robi > > > > > > Raghuveer Rawat wrote: > >> Hi, I have a requirement where only logged in users are allowed to put > >> their > >> comment. I have implemented that form with struts2 ajax theme...anchor > >> has > >> theme="ajax" > >> > >> If logged in user puts his comment then everything works fine > >> perfectly..I am able to see text message returned from action in target > >> div > >> > >> But when a user who is not logged in and try to put this comment..I > >> want to > >> redirect user to login page..*but there what is happening here is that > >> login > >> page is also streaming back and it is opening in target div..* > >> > >> Any idea how to redirect user to login page.. > >> > >> Below is my action class method.. > >> > >> public String addComment() { > >> try{ > >> UserTO userTo = null; > >> Object user = this.getSession().get("user"); > >> if(user == null){ > >> return Action.LOGIN; > >> }else{ > >> userTo = (UserTO) user; > >> } > >> this.getCommentTo().setUserId(userTo.getUserId()); > >> this.getCommentTo().setArticleId(this.getArticleId()); > >> > >> this.getCommentService().addComment(this.getCommentTo()); > >> HttpServletResponse response = > >> ServletActionContext.getResponse > >> (); > >> //inputStream = new StringBufferInputStream("Comment Posted > >> Successfully."); > >> String successMsg = "Thanks for posting comment. Your > comment > >> has been added successfully."; > >> byte[] contents = successMsg.getBytes(); > >> response.getOutputStream().write(contents); > >> > >> }catch(Exception ex){ > >> LOG.error("Exception in myArticles():"+ ex); > >> return Action.ERROR; > >> } > >> return null; > >> } > >> > >> > >> This is my comment form... > >> > >> > >> > >> > >> > >> > >> >> cellpadding="2"> > >> > >> Your > >> Comments > >> > >> > >> >> cols="40"> > >> > >> > >> > >> > >> > >> > >> Add > >> Comment > >> > >> > >> > >> > >> > >> Below is struts.xml entry..I am using tiles and default results are > tile > >> definitionsI also tried using redirect-action and redirect but > >> that also > >> give same problem.. > >> > >> > >> login > >> > >> > >> > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: [Struts2] Ajax anchor tag problem
oopss.. sorry.. I read your post to fast and didn't notice you already tried redirect-action.. I believe the problem is that it's not the browser who is getting the redirect message from the server, but the ajax async call system, and so it puts the login form in the div, as it was instructed.. but as I'm not an ajax guru, I could be wrong. Best regards. -- Robi Roberto Nunnari wrote: try this: login Best regards. -- Robi Raghuveer Rawat wrote: Hi, I have a requirement where only logged in users are allowed to put their comment. I have implemented that form with struts2 ajax theme...anchor has theme="ajax" If logged in user puts his comment then everything works fine perfectly..I am able to see text message returned from action in target div But when a user who is not logged in and try to put this comment..I want to redirect user to login page..*but there what is happening here is that login page is also streaming back and it is opening in target div..* Any idea how to redirect user to login page.. Below is my action class method.. public String addComment() { try{ UserTO userTo = null; Object user = this.getSession().get("user"); if(user == null){ return Action.LOGIN; }else{ userTo = (UserTO) user; } this.getCommentTo().setUserId(userTo.getUserId()); this.getCommentTo().setArticleId(this.getArticleId()); this.getCommentService().addComment(this.getCommentTo()); HttpServletResponse response = ServletActionContext.getResponse (); //inputStream = new StringBufferInputStream("Comment Posted Successfully."); String successMsg = "Thanks for posting comment. Your comment has been added successfully."; byte[] contents = successMsg.getBytes(); response.getOutputStream().write(contents); }catch(Exception ex){ LOG.error("Exception in myArticles():"+ ex); return Action.ERROR; } return null; } This is my comment form... cellpadding="2"> Your Comments Add Comment Below is struts.xml entry..I am using tiles and default results are tile definitionsI also tried using redirect-action and redirect but that also give same problem.. login - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Struts2] Ajax anchor tag problem
try this: login Best regards. -- Robi Raghuveer Rawat wrote: Hi, I have a requirement where only logged in users are allowed to put their comment. I have implemented that form with struts2 ajax theme...anchor has theme="ajax" If logged in user puts his comment then everything works fine perfectly..I am able to see text message returned from action in target div But when a user who is not logged in and try to put this comment..I want to redirect user to login page..*but there what is happening here is that login page is also streaming back and it is opening in target div..* Any idea how to redirect user to login page.. Below is my action class method.. public String addComment() { try{ UserTO userTo = null; Object user = this.getSession().get("user"); if(user == null){ return Action.LOGIN; }else{ userTo = (UserTO) user; } this.getCommentTo().setUserId(userTo.getUserId()); this.getCommentTo().setArticleId(this.getArticleId()); this.getCommentService().addComment(this.getCommentTo()); HttpServletResponse response = ServletActionContext.getResponse (); //inputStream = new StringBufferInputStream("Comment Posted Successfully."); String successMsg = "Thanks for posting comment. Your comment has been added successfully."; byte[] contents = successMsg.getBytes(); response.getOutputStream().write(contents); }catch(Exception ex){ LOG.error("Exception in myArticles():"+ ex); return Action.ERROR; } return null; } This is my comment form... Your Comments Add Comment Below is struts.xml entry..I am using tiles and default results are tile definitionsI also tried using redirect-action and redirect but that also give same problem.. login - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Struts2] Ajax anchor tag problem
Hi, I have a requirement where only logged in users are allowed to put their comment. I have implemented that form with struts2 ajax theme...anchor has theme="ajax" If logged in user puts his comment then everything works fine perfectly..I am able to see text message returned from action in target div But when a user who is not logged in and try to put this comment..I want to redirect user to login page..*but there what is happening here is that login page is also streaming back and it is opening in target div..* Any idea how to redirect user to login page.. Below is my action class method.. public String addComment() { try{ UserTO userTo = null; Object user = this.getSession().get("user"); if(user == null){ return Action.LOGIN; }else{ userTo = (UserTO) user; } this.getCommentTo().setUserId(userTo.getUserId()); this.getCommentTo().setArticleId(this.getArticleId()); this.getCommentService().addComment(this.getCommentTo()); HttpServletResponse response = ServletActionContext.getResponse (); //inputStream = new StringBufferInputStream("Comment Posted Successfully."); String successMsg = "Thanks for posting comment. Your comment has been added successfully."; byte[] contents = successMsg.getBytes(); response.getOutputStream().write(contents); }catch(Exception ex){ LOG.error("Exception in myArticles():"+ ex); return Action.ERROR; } return null; } This is my comment form... Your Comments Add Comment Below is struts.xml entry..I am using tiles and default results are tile definitionsI also tried using redirect-action and redirect but that also give same problem.. login
Re: [Struts2] tabbed panel: tab which directly calls other view (like anchor)?
Does nobody have comment about it? anybody who did something similar? Thank you in advance. lbastil wrote: > > Hello, > > I have the following requirement I would like to realize and I ask myself > whether it is possible with struts2 tabbed pane (right now after some > attempts I was not successful): > > I have hierarchical data which are shown in tabs. > > Sample: have Collection of > > now presentation of that is the following: > > - ViewA for has tabed pane with: > * tab 1: (local) main information of > * tab 2: (remote) other information of > * tab 3: (remote) list of , by clicking on special you > are forwarded to: > > - ViewB for has tabed pane with: > * tab 1: (local) main information of > * tab 2: (remote) other information of > > Now here in this view I would like to add a special tab3: > * tab 3: label something like "back", which will forward the user > immediately to ViewA > (in addition it would be nice if this special tab could have some extra > css formating, for instance shown on right side and so on ...) > > So what I mean is pretty much the same like an anchor (-tag), but > rendering as "special tab" on a user friendly position and styled > comparable to the normal tabs ... > > Can anybody tell me whether this is possible > a) with configuring tabbed panes / divs > or > b) some workaround which could realize most of the requirement? > > meanwhile I was able to realize the requirement, but it is really a dirty > hack and render only in firefox: > > ... > > > > > > > > > > > ... > > > Its really dirty (simulates an dojo tab), but from gui perspective it > shows exactly what I want ... > > > Thank you very much for any recommendations in advance, > Basti > -- View this message in context: http://www.nabble.com/-Struts2--tabbed-panel%3A-tab-which-directly-calls-other-view-%28like-anchor%29--tf4640952.html#a13292888 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tabbed panel: tab which directly calls other view (like anchor)?
Hello, I have the following requirement I would like to realize and I ask myself whether it is possible with struts2 tabbed pane (right now after some attempts I was not successful): I have hierarchical data which are shown in tabs. Sample: have Collection of now presentation of that is the following: - ViewA for has tabed pane with: * tab 1: (local) main information of * tab 2: (remote) other information of * tab 3: (remote) list of , by clicking on special you are forwarded to: - ViewB for has tabed pane with: * tab 1: (local) main information of * tab 2: (remote) other information of Now here in this view I would like to add a special tab3: * tab 3: label something like "back", which will forward the user immediately to ViewA (in addition it would be nice if this special tab could have some extra css formating, for instance shown on right side and so on ...) So what I mean is pretty much the same like an anchor (-tag), but rendering as "special tab" on a user friendly position and styled comparable to the normal tabs ... Can anybody tell me whether this is possible a) with configuring tabbed panes / divs or b) some workaround which could realize most of the requirement? meanwhile I was able to realize the requirement, but it is really a dirty hack and render only in firefox: ... http://www.nabble.com/tabbed-panel%3A-tab-which-directly-calls-other-view-%28like-anchor%29--tf4640952.html#a13254946 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts anchor question
Yes that code runs correctly! Try to build the url link with a struts URL tag and use the struts param tag to set the "a" parameter . b if you use the struts anchor tag it works: Test link and if you print the url value yuo have a double amp: "www.something.com&amp;a=b" Slattery, Tim - BLS wrote: > > >> I have Microsoft Internet Explorer 6.0.2 on my computer. >> >> If I use the struts anchor the URL parameters are separated >> by the & character and the link works. >> If I use the html anchor with a struts property the URL >> parameters are separated by the amp; characters and the link >> doesn't work. > > I don't know what to tell you. I've run the following HTML: > > "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";> > http://www.w3.org/1999/xhtml"; xml:lang="en"> > > Test Form submission > > > Test links > > www.something.com&a=b Test link > > > > > In IE 6.0.2900, Netscape 6 and Netscape 7. All handle it correctly. When > the mourse cursor hovers over the link, the correct text shows in the > status bar (www.something.com&a=b). > > -- > Tim Slattery > [EMAIL PROTECTED] > > > ----- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Struts-anchor-question-tf4428839.html#a12669994 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts anchor question
> I have Microsoft Internet Explorer 6.0.2 on my computer. > > If I use the struts anchor the URL parameters are separated > by the & character and the link works. > If I use the html anchor with a struts property the URL > parameters are separated by the amp; characters and the link > doesn't work. I don't know what to tell you. I've run the following HTML: http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";> http://www.w3.org/1999/xhtml"; xml:lang="en"> Test Form submission Test links Test link In IE 6.0.2900, Netscape 6 and Netscape 7. All handle it correctly. When the mourse cursor hovers over the link, the correct text shows in the status bar (www.something.com&a=b). -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts anchor question
Hrm, yeah, it must have been added since then :/ I really don't like the wiki sometimes because of issues like that; it's too easy to get confused (obviously! :) d. --- TonyD <[EMAIL PROTECTED]> wrote: > > Sorry Dave, now I will explain what happed. > > I have struts version 2.0.6 installed and my URL > local documentation > doesn't contain the "escapeAmp" attribute. > That means I must update to the latest struts > version 2.0.9 to use that > attribute? > Because I just used it in my url code and I got an > "Excepion report": > Attribute escapeAmp invalid for tag url accorting to > TLD. > > Thanks and sorry again. > > > newton.dave wrote: > > > > --- TonyD <[EMAIL PROTECTED]> wrote: > >> Why have you sent me this link? > > > > So you'd read what's on the page. > > > >> Do you think I never seen that link? > > > > Apparently not, otherwise you would have seen the > > "escapeAmp" attribute. > > > >> Do you think the answer to my question is in that > > link? > > > > Yes, because if you saw the "escapeAmp" attribute > you > > could use it in the tag to build your > URL > > then use a normal HTML tag with a blank > target > > as I suggested. > > > > d. > > > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: > http://www.nabble.com/Struts-anchor-question-tf4428839.html#a12654874 > Sent from the Struts - User mailing list archive at > Nabble.com. > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts anchor question
Sorry Dave, now I will explain what happed. I have struts version 2.0.6 installed and my URL local documentation doesn't contain the "escapeAmp" attribute. That means I must update to the latest struts version 2.0.9 to use that attribute? Because I just used it in my url code and I got an "Excepion report": Attribute escapeAmp invalid for tag url accorting to TLD. Thanks and sorry again. newton.dave wrote: > > --- TonyD <[EMAIL PROTECTED]> wrote: >> Why have you sent me this link? > > So you'd read what's on the page. > >> Do you think I never seen that link? > > Apparently not, otherwise you would have seen the > "escapeAmp" attribute. > >> Do you think the answer to my question is in that > link? > > Yes, because if you saw the "escapeAmp" attribute you > could use it in the tag to build your URL > then use a normal HTML tag with a blank target > as I suggested. > > d. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Struts-anchor-question-tf4428839.html#a12654874 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts anchor question
--- TonyD <[EMAIL PROTECTED]> wrote: > Why have you sent me this link? So you'd read what's on the page. > Do you think I never seen that link? Apparently not, otherwise you would have seen the "escapeAmp" attribute. > Do you think the answer to my question is in that link? Yes, because if you saw the "escapeAmp" attribute you could use it in the tag to build your URL then use a normal HTML tag with a blank target as I suggested. d. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts anchor question
I have Microsoft Internet Explorer 6.0.2 on my computer. If I use the struts anchor the URL parameters are separated by the & character and the link works. If I use the html anchor with a struts property the URL parameters are separated by the amp; characters and the link doesn't work. I return do my question. How can I use a struts anchor running the link on a new window? The struts documentation is very poor of information. Thanks. Slattery, Tim - BLS wrote: > > > Because the HTML anchor tag with a URL created via >> replaces the "&" character between parameters >> with "amp;" characters and my link doesn't work. > > It should. The xhtml spec insists on that, and it works just fine in the > browsers my employer lets us run (IE6, Netscape 7). > > -- > Tim Slattery > [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Struts-anchor-question-tf4428839.html#a12649863 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts anchor question
Why have you sent me this link? Do you think I never seen that link? Do you think the answer to my question is in that link? You don't need to reply if you don't know the answer with another question. Thanks. newton.dave wrote: > > http://struts.apache.org/2.x/docs/url.html > > --- TonyD <[EMAIL PROTECTED]> wrote: > >> >> Because the HTML anchor tag with a URL >> created via replaces the "&" character >> between parameters with >> "amp;" characters >> and my link doesn't work. >> >> >> >> newton.dave wrote: >> > >> > --- TonyD <[EMAIL PROTECTED]> wrote: >> >> How to obtain the equivalent html anchor in >> struts? >> >> >> >> <.a href= >> >> target="_blank"> >> >>... >> >> <./a> >> >> >> >> I tried with the "targets" parameter but it >> doesn't >> >> work. >> >> >> >> >> >>... >> >> >> > >> > Why not just use an HTML tag with a URL >> > created via ? >> > >> > d. >> > >> > >> > >> > - >> > To unsubscribe, e-mail: >> [EMAIL PROTECTED] >> > For additional commands, e-mail: >> [EMAIL PROTECTED] >> > >> > >> > >> >> -- >> View this message in context: >> > http://www.nabble.com/Struts-anchor-question-tf4428839.html#a12636331 >> Sent from the Struts - User mailing list archive at >> Nabble.com. >> >> >> > - >> To unsubscribe, e-mail: >> [EMAIL PROTECTED] >> For additional commands, e-mail: >> [EMAIL PROTECTED] >> >> > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Struts-anchor-question-tf4428839.html#a12649798 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts anchor question
Hello list, I saw datetimepicker is a very func in the tutorial. However, when I tried this: format="#-#MM-#dd" /> I got the following exceptions, my version is struts.2.0.9, should I use other jar file or only struts2.1 provides this func: Thanks a lot! org.apache.jasper.JasperException: /Test.jsp(33,0) Attribute format invalid for tag datetimepicker according to TLD org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:236) org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:986) org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:706) org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1442) org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2164) org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2214) org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:726) org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1442) org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2164) org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2214) org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2220) org.apache.jasper.compiler.Node$Root.accept(Node.java:457) org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2164) org.apache.jasper.compiler.Validator.validate(Validator.java:1484) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:167) org.apache.jasper.compiler.Compiler.compile(Compiler.java:296) org.apache.jasper.compiler.Compiler.compile(Compiler.java:277) org.apache.jasper.compiler.Compiler.compile(Compiler.java:265) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:299) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:413) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts anchor question
> Because the HTML anchor tag with a URL created via > replaces the "&" character between parameters > with "amp;" characters and my link doesn't work. It should. The xhtml spec insists on that, and it works just fine in the browsers my employer lets us run (IE6, Netscape 7). -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts anchor question
http://struts.apache.org/2.x/docs/url.html --- TonyD <[EMAIL PROTECTED]> wrote: > > Because the HTML anchor tag with a URL > created via replaces the "&" character > between parameters with > "amp;" characters > and my link doesn't work. > > > > newton.dave wrote: > > > > --- TonyD <[EMAIL PROTECTED]> wrote: > >> How to obtain the equivalent html anchor in > struts? > >> > >> <.a href= > >> target="_blank"> > >>... > >> <./a> > >> > >> I tried with the "targets" parameter but it > doesn't > >> work. > >> > >> > >>... > >> > > > > Why not just use an HTML tag with a URL > > created via ? > > > > d. > > > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: > http://www.nabble.com/Struts-anchor-question-tf4428839.html#a12636331 > Sent from the Struts - User mailing list archive at > Nabble.com. > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts anchor question
Because the HTML anchor tag with a URL created via replaces the "&" character between parameters with "amp;" characters and my link doesn't work. newton.dave wrote: > > --- TonyD <[EMAIL PROTECTED]> wrote: >> How to obtain the equivalent html anchor in struts? >> >> <.a href= >> target="_blank"> >>... >> <./a> >> >> I tried with the "targets" parameter but it doesn't >> work. >> >> >>... >> > > Why not just use an HTML tag with a URL > created via ? > > d. > > > ----- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Struts-anchor-question-tf4428839.html#a12636331 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts anchor question
--- TonyD <[EMAIL PROTECTED]> wrote: > How to obtain the equivalent html anchor in struts? > > <.a href= > target="_blank"> >... > <./a> > > I tried with the "targets" parameter but it doesn't > work. > > >... > Why not just use an HTML tag with a URL created via ? d. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts anchor question
I would like to display the URL link in a new window. How to obtain the equivalent html anchor in struts? <.a href= target="_blank"> ... <./a> I tried with the "targets" parameter but it doesn't work. ... Thanks in advance. -- View this message in context: http://www.nabble.com/Struts-anchor-question-tf4428839.html#a12634121 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts anchor question
I would like to display the URL link in a new window. How to obtain the equivalent html anchor in struts? ... I tried with the "targets" parameter but it doesn't work. ... Thanks in advance. -- View this message in context: http://www.nabble.com/Struts-anchor-question-tf4428755.html#a12633865 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help posting a form with an anchor and targets
I've finally found an answer to my question searching in the mail list. Here is the explanation about what is going on and the solution: http://www.mail-archive.com/user@struts.apache.org/msg54844.html Basically the solution consists in not showing the "loadingText" in the target div, because it removes the form elements when setting this text inside the div. Bests regards, Ivan Fontanals
Help posting a form with an anchor and targets
Hi, I'm trying to send a form from an anchor tag, but I've only archieved to send the form without the "targets" attribute. When I put the target ID, the form is not sended but the page redirects correctly. Otherwise it works well but the page is not redirected. My code is: <%-- BUTTONS --%> SAVE Please, could you give me any ida about what is happening? Thank you very much for your time! Ivan Fontanals
Help posting a form with an anchor and targets
Hi, I'm trying to send a form from an anchor tag, but I've only archieved to send the form without the "targets" attribute. When I put the target ID, the form is not sended but the page redirects correctly. Otherwise it works well but the page is not redirected. My code is: <%-- BUTTONS --%> SAVE Please, could you give me any ida about what is happening? Thank you very much for your time! Ivan Fontanals
Re: How to generate an ANCHOR tag dynamically?
Use the Tiles tag that can expose the tiles attribute as a page attribute. Maybe getAsString can do it. But once it is a page attribute, you can do: Paul On 8/8/07, Paul Uszak <[EMAIL PROTECTED]> wrote: > > Hi all. > > Is there any way to make a dynamic anchor tag in a struts link? I'm also > using tiles. The following does not work as the JSP interpreter can't... > > " > > > I'm trying to have a link to a help page that's context sensitive, so > where > ever you are pressing help takes you to the appropriate point on the help > page. > Is there any other way of doing this please? > > Thanks in advance. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
How to generate an ANCHOR tag dynamically?
Hi all. Is there any way to make a dynamic anchor tag in a struts link? I'm also using tiles. The following does not work as the JSP interpreter can't... " > I'm trying to have a link to a help page that's context sensitive, so where ever you are pressing help takes you to the appropriate point on the help page. Is there any other way of doing this please? Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Problems with ajax anchor tag
Hi, I believe I've found the problem origin. I'm working without action-extension (my url looks like www.blablabla.com/Home instead of Home.action or Home.do). For this reason, when ajax theme constructs /struts/dojo/dojo.js call dinamically, struts try to manage .js files as actions (returning an error). Now, the question is: how can I do to work without action-extension and make struts to serve .js files? Otherwise, the .js files have strange path in the dinamic calls in the pages (i.e. /struts/dojo/dojo.js, /struts/simple/dojoRequire.js), that's different from the path they have in the struts-core.jar. It's a good idea to extract .js files from the struts.core.jar? Where to put them? Cheers On 6/13/07, Lucas Garcia <[EMAIL PROTECTED]> wrote: Hi, I'm testing the ajax Anchor tag ( http://struts.apache.org/2.x/docs/ajax-tags.html#AjaxTags-anchorTag). Mi jsp page looks like: <%@ page contentType="text/html; charset=UTF-8" %> <%@ taglib prefix="s" uri="/struts-tags" %> http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"> Div 1 Update divs The AjaxTest action returns a "Hello" content, but when I click in the link, the page is reloaded and the browser displays only a "Hello" page instead of the div1 div with the new content and the link1 link. What I'm doing wrong? (I'm working with Struts 2.0.6)
[S2] Problems with ajax anchor tag
Hi, I'm testing the ajax Anchor tag ( http://struts.apache.org/2.x/docs/ajax-tags.html#AjaxTags-anchorTag). Mi jsp page looks like: <%@ page contentType="text/html; charset=UTF-8" %> <%@ taglib prefix="s" uri="/struts-tags" %> http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"> Div 1 Update divs The AjaxTest action returns a "Hello" content, but when I click in the link, the page is reloaded and the browser displays only a "Hello" page instead of the div1 div with the new content and the link1 link. What I'm doing wrong? (I'm working with Struts 2.0.6)
Re: Dinamic param using anchor (s:a)?
--- Felipe Rodrigues wrote: > But can I set the value of the param inside > from teh tag? > > Something like: > > > > > > >March >April > > The real question is, how to pass a value of a param > from to ? You don't; the parameter is in the variable created by the tag, that's what the tag does (otherwise what would the point of be?) d. 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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dinamic param using anchor (s:a)?
ok, But can I set the value of the param inside from teh tag? Something like: March April The real question is, how to pass a value of a param from to ? thanks any way... Dave Newton-4 wrote: > > --- Felipe Rodrigues wrote: >> Is it possible to send a dinamic parameter using >> tag? > > Sure. > > Since the "href" attribute needs to be built with > anyway, see: > > http://struts.apache.org/2.x/docs/url.html > > d. > > > > > > Finding fabulous fares is fun. > Let Yahoo! FareChase search your favorite travel sites to find flight and > hotel bargains. > http://farechase.yahoo.com/promo-generic-14795097 > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Dinamic-param-using-anchor-%28s%3Aa%29--tf3446629.html#a9614880 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dinamic param using anchor (s:a)?
--- Felipe Rodrigues wrote: > Is it possible to send a dinamic parameter using > tag? Sure. Since the "href" attribute needs to be built with anyway, see: http://struts.apache.org/2.x/docs/url.html d. Finding fabulous fares is fun. Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains. http://farechase.yahoo.com/promo-generic-14795097 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dinamic param using anchor (s:a)?
Hi guys, Is it possible to send a dinamic parameter using tag? I mean, if I click at one link, the param value is 5, if I click at another link the param value is 7. Is that possible? thanks -- View this message in context: http://www.nabble.com/Dinamic-param-using-anchor-%28s%3Aa%29--tf3446629.html#a9611799 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [using #(anchor) in xxx.do][solved]]
Hi Wendy, your link helped me alot and gave me wht i need. thanks Deva Wendy Smoak wrote: On 8/11/06, Deva Pitchai <[EMAIL PROTECTED]> wrote: Is there a possibilty of using a anchor tag like below from the struts action ... I know wht to do in the html side.. but dont dont know how to itegrate it in the struts. This might help: http://wiki.apache.org/struts/StrutsJumpToAnchor -- Regards, Deva. __ Naturesoft Pvt Ltd | Chennai - 600 004 Work : +91 44 2461 7193 Ex: 34 Email : [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [using #(anchor) in xxx.do]
On 8/11/06, Deva Pitchai <[EMAIL PROTECTED]> wrote: Is there a possibilty of using a anchor tag like below from the struts action ... I know wht to do in the html side.. but dont dont know how to itegrate it in the struts. This might help: http://wiki.apache.org/struts/StrutsJumpToAnchor -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[using #(anchor) in xxx.do]
hi all Is there a possibilty of using a anchor tag like below from the struts action http://localhost/dir1/dir2/file.jsp#bottom somthing like ... http://localhost/dir1/dir2/viewfile.do#bottom so that i can view the bootom of the page once the action is executed. I know wht to do in the html side.. but dont dont know how to itegrate it in the struts. any help appreciated. somethign like this... http://www.computerhope.com/issues/ch49.htm#top thnx Deva - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to detect if an action was called from a web form or from an anchor
On 11/9/05, Néstor Boscán <[EMAIL PROTECTED]> wrote: > > Is there a way to know if an action is called from a web form or from an > anchor? > Put a hidden field in the form and check for it-- if the form wasn't submitted, it won't be there. You can also check request.getMethod() to see if it's POST or GET. -- Wendy
How to detect if an action was called from a web form or from an anchor
Hi Is there a way to know if an action is called from a web form or from an anchor? Regards, Néstor Boscán Néstor Boscán - Gerente de Consultoría Teléfono Móvil: +58 416 6070610 Teléfono Oficina: +58 212 2399711 - +58 212 2398198 Fax Oficina: +58 212 2399587 Este mensaje es privado y confidencial, y está dirigido exclusivamente a su(s) destinatario(s). Si usted ha recibido este mensaje por error, debe abstenerse de distribuirlo, copiarlo o usarlo en cualquier sentido. Asimismo, le agradecemos comunicarlo al remitente y borrar el mensaje y cualquier documento adjunto. Cualquier opinión contenida en este mensaje pertenece únicamente al autor remitente y no representa necesariamente la opinión de TCS "Technology Consulting Solution", a menos que ello se señale en forma expresa. Eventualmente, los correos electrónicos pueden ser interceptados o alterados, llegar con demora o incompletos. Al respecto, de TCS "Technology Consulting Solution" no se hace responsable por los errores, defectos u omisiones que pudieran afectar al mensaje original, con motivo de su envío por correo electrónico.
Re: htnm:base rewrites anchor tag
Shekhar Jain wrote: No I'm just using a plain I think you need to look at what the html tag does. http://www.faqs.org/docs/htmltut/linking/_BASE.html Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: htnm:base rewrites anchor tag
No I'm just using a plain wrote: > Shekhar Jain wrote: > > >I have a jsp page which in which I am using the at the top > >of the page. However I find that then all the links to anchor tags get > >rewrriten with the jsp page. Is there any way to prevent this from > >happening > > > > > Are the links-to-anchor-tags struts tags? If so, perhaps consider using > straight html tag if you don't need the struts tags' functionality; one > point of html:base is to allow html:link tags to rewrite appropriately. > > (Or don't use html:base?) > > Dave > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: htnm:base rewrites anchor tag
Shekhar Jain wrote: I have a jsp page which in which I am using the at the top of the page. However I find that then all the links to anchor tags get rewrriten with the jsp page. Is there any way to prevent this from happening Are the links-to-anchor-tags struts tags? If so, perhaps consider using straight html tag if you don't need the struts tags' functionality; one point of html:base is to allow html:link tags to rewrite appropriately. (Or don't use html:base?) Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
htnm:base rewrites anchor tag
I have a jsp page which in which I am using the at the top of the page. However I find that then all the links to anchor tags get rewrriten with the jsp page. Is there any way to prevent this from happening Shekhar Jain - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Possible to go to named anchor via ActionForward?
Jim, I have used: TabTitle in the jsp succesfully to position action output with anchors. I have not tried it but possibly something like: Hope this helps. -Jeff Is there any way I can set up an action mapping so that, if control is redirected back to the "input" JSP page, I can make it so that the browser jumps to a named anchor tag ("errors" in this particular case)? Thanks. --Jim -- ** The information contained in this communication is confidential, private, proprietary, or otherwise privileged and is intended only for the use of the addressee. Unauthorized use, disclosure, distribution or copying is strictly prohibited and may be unlawful. If you have received this communication in error, please notify the sender immediately at (312)653-6000 in Illinois; (972)766-6900 in Texas; or (800)835-8699 in New Mexico. ** == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Possible to go to named anchor via ActionForward?
If you are returning a "redirecting" action forward, it shoul be no problem to append an anchor -- but if your ActionForward results in a RequestDispatcher forward (as in the default case), then the anchor would probably cause the dispatcher to choke. The problem is that errors are normally saved in request scope, and a redirect would cause a new request scope to be created. It is now possible to save errors to session scope, but I don't think anyone has done anything so that you could rig up the framework to do the validation for you and have that happen. But if you move the validation into your action, I think you can get where you're trying to go. Another thing you might try would be to do it on the client side: You have errors and then way down at the bottom of your page... location.hash='errors'; (I've never actually used location.hash, but a quick check of the JS/DHTML cookbook suggests that its the right syntax. Note that you are explicitly intended to leave out the "#" mark in the value to location.hash.) Joe At 5:16 PM -0400 4/21/05, Jim Coble wrote: I have a JSP page in my application that consists of several lines of explanatory text (a screen's worth or so) followed by a form. When the user submits the form, the ActionForm validate method is called and, if there are errors, the user is returned to the same JSP page where html:errors displays the relevant error messages between the initial explanatory text and the beginning of the form. All this works fine. However, when the JSP page redisplays in this validation error scenario, I'd like the browser page to jump to the error messages. Here is what I tried that did not work. Within the JSP page ... In struts-config action mapping, for the "input" attribute of the "action" element ... input="/flts/reservationlab.jsp#errors" When I submit the form with a required field missing, I get ... The requested resource (/flts/reservationlab.jsp#errors) is not available. Is there any way I can set up an action mapping so that, if control is redirected back to the "input" JSP page, I can make it so that the browser jumps to a named anchor tag ("errors" in this particular case)? Thanks. --Jim == Jim Coble Senior Technology Specialist Center for Instructional Technology Email: [EMAIL PROTECTED] Voice: 919-660-5974 Fax: 919-660-5923 Box 90198, Duke University Durham, NC 27708-0198 == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Possible to go to named anchor via ActionForward?
Aehm, document.location.href = document.location.href+'#errors'; At the bottom of your document? I mean, you should remind yourself, that an anchor in your document has nothing to do with the forward. It's like renaming the class file if you need to call method B() of the object instead of method A(). The jsp always contains the whole html source, an anchor is only a directive for the browser, where to position it's viewport. Another possibility is to send a redirect instead of adding a javascript one-liner (haven't tested this one line, but it should work). Regards Leon > -Ursprüngliche Nachricht- > Von: Jim Coble [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 21. April 2005 23:17 > An: user@struts.apache.org > Betreff: Possible to go to named anchor via ActionForward? > > > I have a JSP page in my application that consists of several > lines of explanatory text (a screen's worth or so) followed > by a form. When the user submits the form, the ActionForm > validate method is called and, if there are errors, the user > is returned to the same JSP page where html:errors displays > the relevant error messages between the initial explanatory > text and the beginning of the form. All this works fine. > However, when the JSP page redisplays in this validation > error scenario, I'd like the browser page to jump to the > error messages. > > Here is what I tried that did not work. > Within the JSP page ... > > In struts-config action mapping, for the "input" attribute of > the "action" > element ... > input="/flts/reservationlab.jsp#errors" > > When I submit the form with a required field missing, I get ... > The requested resource (/flts/reservationlab.jsp#errors) is > not available. > > Is there any way I can set up an action mapping so that, if > control is redirected back to the "input" JSP page, I can > make it so that the browser jumps to a named anchor tag > ("errors" in this particular case)? > > Thanks. > --Jim > > == > Jim Coble > Senior Technology Specialist > Center for Instructional Technology > Email: [EMAIL PROTECTED] > Voice: 919-660-5974 Fax: 919-660-5923 > Box 90198, Duke University > Durham, NC 27708-0198 > == > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Possible to go to named anchor via ActionForward?
Aehm, document.location.href = document.location.href+'#errors'; At the bottom of your document? I mean, you should remind yourself, that an anchor in your document has nothing to do with the forward. It's like renaming the class file if you need to call method B() of the object instead of method A(). The jsp always contains the whole html source, an anchor is only a directive for the browser, where to position it's viewport. Another possibility is to send a redirect instead of adding a javascript one-liner (haven't tested this one line, but it should work). Regards Leon > -Ursprüngliche Nachricht- > Von: Jim Coble [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 21. April 2005 23:17 > An: user@struts.apache.org > Betreff: Possible to go to named anchor via ActionForward? > > > I have a JSP page in my application that consists of several > lines of explanatory text (a screen's worth or so) followed > by a form. When the user submits the form, the ActionForm > validate method is called and, if there are errors, the user > is returned to the same JSP page where html:errors displays > the relevant error messages between the initial explanatory > text and the beginning of the form. All this works fine. > However, when the JSP page redisplays in this validation > error scenario, I'd like the browser page to jump to the > error messages. > > Here is what I tried that did not work. > Within the JSP page ... > > In struts-config action mapping, for the "input" attribute of > the "action" > element ... > input="/flts/reservationlab.jsp#errors" > > When I submit the form with a required field missing, I get ... > The requested resource (/flts/reservationlab.jsp#errors) is > not available. > > Is there any way I can set up an action mapping so that, if > control is redirected back to the "input" JSP page, I can > make it so that the browser jumps to a named anchor tag > ("errors" in this particular case)? > > Thanks. > --Jim > > == > Jim Coble > Senior Technology Specialist > Center for Instructional Technology > Email: [EMAIL PROTECTED] > Voice: 919-660-5974 Fax: 919-660-5923 > Box 90198, Duke University > Durham, NC 27708-0198 > == > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Possible to go to named anchor via ActionForward?
I have a JSP page in my application that consists of several lines of explanatory text (a screen's worth or so) followed by a form. When the user submits the form, the ActionForm validate method is called and, if there are errors, the user is returned to the same JSP page where html:errors displays the relevant error messages between the initial explanatory text and the beginning of the form. All this works fine. However, when the JSP page redisplays in this validation error scenario, I'd like the browser page to jump to the error messages. Here is what I tried that did not work. Within the JSP page ... In struts-config action mapping, for the "input" attribute of the "action" element ... input="/flts/reservationlab.jsp#errors" When I submit the form with a required field missing, I get ... The requested resource (/flts/reservationlab.jsp#errors) is not available. Is there any way I can set up an action mapping so that, if control is redirected back to the "input" JSP page, I can make it so that the browser jumps to a named anchor tag ("errors" in this particular case)? Thanks. --Jim == Jim Coble Senior Technology Specialist Center for Instructional Technology Email: [EMAIL PROTECTED] Voice: 919-660-5974 Fax: 919-660-5923 Box 90198, Duke University Durham, NC 27708-0198 == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts ActionForward to HTML anchor
Brian, May of us have tried to solve that same issue using anchors and found them unworkable. Using DOM and JavaScript has given the following working result (From good old[?] Dakota Jack, no less!): > --- Dakota Jack <[EMAIL PROTECTED]> wrote: Also, if you want similar things with other browsers, here is a Mozilla deal: function SetScrollTo(strControlID) { var objControl=document.getElementById(strControlID); document.body.scrollTop = objControl.offsetTop; // maybe object is not focusable, hidden or disabled. try { objControl.focus(); } catch(e) {} } //usage: // SetScrollTo("CONTROL_ID"); //the string is the id of // the desired control in the html document. - His notes say "Mozilla" but I've used it successfully in IE6 and FireFox. Regards, David -Original Message- From: Brian Bezanson [mailto:[EMAIL PROTECTED] Sent: Friday, March 11, 2005 4:42 PM To: user@struts.apache.org Subject: Struts ActionForward to HTML anchor I'd like to know if it is possible to get a ActionForward to scroll my target page to an anchor on the page created with the . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts ActionForward to HTML anchor
I don't think you can do it quite in the manner that you're attempting, but you can achieve this behavior by doing the following: - in your action class, populate a request attribute when this page refresh occurs - forward back to your jsp as normal - in your jsp, check for the existence of this request attribute. - if it exists, call a javascript function that sets the window.location.hash value to your anchor name. HTH, - Scott -Original Message- From: Brian Bezanson [mailto:[EMAIL PROTECTED] Sent: Friday, March 11, 2005 4:42 PM To: user@struts.apache.org Subject: Struts ActionForward to HTML anchor I'd like to know if it is possible to get a ActionForward to scroll my target page to an anchor on the page created with the . Problem Description -- I have a page in struts (rather large form) where I have a drop-down menu near the bottom with some choices. (AKA html:select and html:optionsCollection) When a user selects from that menu, I have a javascript.submit() that occurs where my page action retrieves data based on the menu change and populates another text block on the page below the pop-up. On the page being 'refreshed' it has set the scroll position to the top of the page -- which is the normal behavior. I'd like to return to a named anchor on the page by the drop-down menu. My Action.java code returns a "return (mapping.findForward("myMessage"));" In my struts-config.xml I also have the following: "" In the JSP page (SomePage.jsp) I have: But of course when I try and execute things, I get a 404 error:: HTTP Status 404 - /Main/SomePage.jsp#name_reference type Status report message /Main/SomePage.jsp#name_reference description The requested resource (/Main/SomePage.jsp#name_reference) is not available. Apache Tomcat/5.0.28 Removing the #name_reference from the struts-config.xml file gets things working again -- just no scrolling to my anchor point. Thanks in advance, Brian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts ActionForward to HTML anchor
I'd like to know if it is possible to get a ActionForward to scroll my target page to an anchor on the page created with the . Problem Description -- I have a page in struts (rather large form) where I have a drop-down menu near the bottom with some choices. (AKA html:select and html:optionsCollection) When a user selects from that menu, I have a javascript.submit() that occurs where my page action retrieves data based on the menu change and populates another text block on the page below the pop-up. On the page being 'refreshed' it has set the scroll position to the top of the page -- which is the normal behavior. I'd like to return to a named anchor on the page by the drop-down menu. My Action.java code returns a "return (mapping.findForward("myMessage"));" In my struts-config.xml I also have the following: "" In the JSP page (SomePage.jsp) I have: But of course when I try and execute things, I get a 404 error:: HTTP Status 404 - /Main/SomePage.jsp#name_reference type Status report message /Main/SomePage.jsp#name_reference description The requested resource (/Main/SomePage.jsp#name_reference) is not available. Apache Tomcat/5.0.28 Removing the #name_reference from the struts-config.xml file gets things working again -- just no scrolling to my anchor point. Thanks in advance, Brian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: named anchor and form
Thanks, your solution is exactly what I needed. From: Wendy Smoak <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: Struts Users Mailing List Subject: Re: named anchor and form Date: Wed, 02 Feb 2005 16:09:17 -0700 From: "draegoon Z" <[EMAIL PROTECTED]> > Hey guys, the archive text search ability is temporarily down, sorry. Both http://marc.theaimsgroup.com and http://www.mail-archive.com have this list archived. > Problem is: when the page returns/refreshes I'm at the top, the user is > confused or has to scroll down. > I know I could probably accomplish this with javascipt, but wondering if > there is a struts solution. I have a long page with options to hide/show different sections. Hiding or showing causes a round trip to the server, and I need to put the user back where they clicked. So... in the Action, I do: request.setAttribute( "anchor", "someString" ); and then at the bottom of the JSP, so it won't get executed until the page has loaded all the way... document.location = "#"; HTH, -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: named anchor and form
From: "draegoon Z" <[EMAIL PROTECTED]> > Hey guys, the archive text search ability is temporarily down, sorry. Both http://marc.theaimsgroup.com and http://www.mail-archive.com have this list archived. > Problem is: when the page returns/refreshes I'm at the top, the user is > confused or has to scroll down. > I know I could probably accomplish this with javascipt, but wondering if > there is a struts solution. I have a long page with options to hide/show different sections. Hiding or showing causes a round trip to the server, and I need to put the user back where they clicked. So... in the Action, I do: request.setAttribute( "anchor", "someString" ); and then at the bottom of the JSP, so it won't get executed until the page has loaded all the way... document.location = "#"; HTH, -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
named anchor and form
Hey guys, the archive text search ability is temporarily down, sorry. I have a JSP page with an html:form that on the bottom has location fields, i.e. state/city. Now I have chosen to have the states prepopulated, however, when someone selects a state, the form submits and a hidden field serves as a flag to populate the cities for that state and return. Problem is: when the page returns/refreshes I'm at the top, the user is confused or has to scroll down. I know I could probably accomplish this with javascipt, but wondering if there is a struts solution. Keep in mind that even if I have a named anchor lower in the page, the user is scrolling down, so it doesn't get clicked. And I think, getInputMapping() would the info anyways, but have yet to check for certain. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Tiles] Forwarding to an specific anchor link of a Tile
How about using DOM and Javascript? Set something in your page (href, input tag, etc.) with the id="" attribute, then have Javascript use document.getElementById("someId").focus() to jump down to that part of the page. I tested this in Struts v1.2.4 under Tomcat 5.0.2? where it worked on HREFs. The JSP was served by my "/hey" action mapping. I tested it with both /hey.do and /do/hey servlet mappings. You could probably do this in tiles using a slightly modified tiles template. Your example was: I recommend splitting up the body and anchor components to: Then, in your /itemEdit.jsp, you could probably do something like this: document.getElementById("<tiles:put name="anchor" />").focus(); I tested it on a dummy page, that was so long it required scrolling to get to my link, with a visible href like so: Jump here! AND also with a non-showing href: And with the good old input tag. All three jumped the page up/down as expected. Regards, David -Original Message- From: Daniel Perry [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 10, 2004 7:40 AM To: Struts Users Mailing List Subject: RE: [Tiles] Forwarding to an specific anchor link of a Tile This is not a good idea... As far as i'm aware anchors are not part of the http specification. They are only implemented in html. Eg. You type /myAnchor.do#myAnchor into the url bar in your browser, the browser actually requests /myAnchor.do - it doesnt send the anchor - it just uses it to show the correct part of the page. Now, if a browser sends a request for /myAnchor.do and recieves a redirect to /myAnchor.do#myAnchor the browser will then make a further request - but what should it request? /myAnchor.do#myAnchor is an invalid url If its clever it will spot this and either send: /myAnchor.do (and handle the anchor) or if it's not: /myAnchor.do#myAnchor (and cause errors) /myAnchor.do%23myAnchor (and cause errors) I've come accross this problem in my own apps. In testing Firefox and MOST versions of IE can deal with it... but some versions of IE cause errors. The only solution i came up with is to use forwards (not redirects) and use javascript so that when a form is submitted, or a link is cliked it decides which anchor to select before anything is submitted. Daniel. > -Original Message- > From: David G. Friedman [mailto:[EMAIL PROTECTED] > Sent: 10 November 2004 04:50 > To: Struts Users Mailing List > Subject: RE: [Tiles] Forwarding to an specific anchor link of a Tile > > > Daniel, > > An anchor is HTML, not Java/Struts so why don't you have your > redirect go to > /myAnchor.do#myAnchor ? > > Regards, > David > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: Friday, November 05, 2004 6:43 AM > To: [EMAIL PROTECTED] > Subject: [Tiles] Forwarding to an specific anchor link of a Tile > > > > Hi everybody, > > i need to forward from an Action to an specifig anchor link of a Tile. > > Something like: > > [example definition of Tiles configuration file] > > > > > > but as expected, Tiles engine can't locate the file. > > is it possible to forward from an Action to an specific anchor link of a > Tile? > > Thanks in advance, > Daniel > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Tiles] Forwarding to an specific anchor link of a Tile
This is not a good idea... As far as i'm aware anchors are not part of the http specification. They are only implemented in html. Eg. You type /myAnchor.do#myAnchor into the url bar in your browser, the browser actually requests /myAnchor.do - it doesnt send the anchor - it just uses it to show the correct part of the page. Now, if a browser sends a request for /myAnchor.do and recieves a redirect to /myAnchor.do#myAnchor the browser will then make a further request - but what should it request? /myAnchor.do#myAnchor is an invalid url If its clever it will spot this and either send: /myAnchor.do (and handle the anchor) or if it's not: /myAnchor.do#myAnchor (and cause errors) /myAnchor.do%23myAnchor (and cause errors) I've come accross this problem in my own apps. In testing Firefox and MOST versions of IE can deal with it... but some versions of IE cause errors. The only solution i came up with is to use forwards (not redirects) and use javascript so that when a form is submitted, or a link is cliked it decides which anchor to select before anything is submitted. Daniel. > -Original Message- > From: David G. Friedman [mailto:[EMAIL PROTECTED] > Sent: 10 November 2004 04:50 > To: Struts Users Mailing List > Subject: RE: [Tiles] Forwarding to an specific anchor link of a Tile > > > Daniel, > > An anchor is HTML, not Java/Struts so why don't you have your > redirect go to > /myAnchor.do#myAnchor ? > > Regards, > David > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: Friday, November 05, 2004 6:43 AM > To: [EMAIL PROTECTED] > Subject: [Tiles] Forwarding to an specific anchor link of a Tile > > > > Hi everybody, > > i need to forward from an Action to an specifig anchor link of a Tile. > > Something like: > > [example definition of Tiles configuration file] > > > > > > but as expected, Tiles engine can't locate the file. > > is it possible to forward from an Action to an specific anchor link of a > Tile? > > Thanks in advance, > Daniel > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Tiles] Forwarding to an specific anchor link of a Tile
Daniel, An anchor is HTML, not Java/Struts so why don't you have your redirect go to /myAnchor.do#myAnchor ? Regards, David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, November 05, 2004 6:43 AM To: [EMAIL PROTECTED] Subject: [Tiles] Forwarding to an specific anchor link of a Tile Hi everybody, i need to forward from an Action to an specifig anchor link of a Tile. Something like: [example definition of Tiles configuration file] but as expected, Tiles engine can't locate the file. is it possible to forward from an Action to an specific anchor link of a Tile? Thanks in advance, Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tiles] Forwarding to an specific anchor link of a Tile
Hi everybody, i need to forward from an Action to an specifig anchor link of a Tile. Something like: [example definition of Tiles configuration file] but as expected, Tiles engine can't locate the file. is it possible to forward from an Action to an specific anchor link of a Tile? Thanks in advance, Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Anchor tag
Kiran, Why would you want to set an anchor tag in a forward? If you are talking tag, that should be handled by the browser to 'jump' down the page to the appropriate portion of the page marked by the anchor. Can you give more clear details and examples if this is another problem? Regards, David -Original Message- From: Babu, Kiran (Cognizant) [mailto:[EMAIL PROTECTED] Sent: Monday, September 27, 2004 9:40 AM To: Struts Users Mailing List Subject: Anchor tag Hi, I am have a long page which is scrollable. I have given the achor tags. Now I have mapped the success condition the jsp page that has all these anchors. But how do I add anchors to the actionforward. I tired adding it using the set path but it did not work. Thanks Kiran This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. Visit us at http://www.cognizant.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How can you add an anchor to an action?
I have a jsp that I will return to, and depending on the button pushed I wand to return to a different anchor. I tried adding an anchor name with #stat for example at the end of the .jsp name in the action forward. It says it is not found. What is the solution for this? Thanks, Kristen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: # anchor
okay some wrong key i pressed! so to continue: on body onload onload="location.hash='newBlock'"; > does the trick for me! ATTA - Original Message - From: "atta-ur rehman" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, July 09, 2004 11:28 AM Subject: Re: # anchor > Hello Glenn, > > I've used a little javascript to the trick; though i'm sure there must be > some better way of doing it: > > have an anchor in your jsp: > > > - Original Message - > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, July 09, 2004 10:55 AM > Subject: # anchor > > > > Hi, > > > > This is what I have defined: > > > > > name="pageForm" scope="request" validate="false"> > > > > > > > > > > > scope="request" validate="true" input="/Page.do"> > > > contextRelative="false"> > > > > > path="/Page.do"> > > > > > contextRelative="false"> > > > > > > > > What happens is that the Page.do allows a user to enter report parameters. > > The PageSubmit.do builds the report and then returns the report to the > > Page.do. > > Once here, the user has the report parameters at the top and the report > > under the parameters. > > > > However, the user would like to have the page move down a little so the > > that the report section is more apparent. > > I have tried to use the # anchor but keep getting page not found... > > > > Any help is appreciated! > > Glenn > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: # anchor
Hello Glenn, I've used a little javascript to the trick; though i'm sure there must be some better way of doing it: have an anchor in your jsp: - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, July 09, 2004 10:55 AM Subject: # anchor > Hi, > > This is what I have defined: > > name="pageForm" scope="request" validate="false"> > > > > > scope="request" validate="true" input="/Page.do"> > contextRelative="false"> > > path="/Page.do"> > > contextRelative="false"> > > > > What happens is that the Page.do allows a user to enter report parameters. > The PageSubmit.do builds the report and then returns the report to the > Page.do. > Once here, the user has the report parameters at the top and the report > under the parameters. > > However, the user would like to have the page move down a little so the > that the report section is more apparent. > I have tried to use the # anchor but keep getting page not found... > > Any help is appreciated! > Glenn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]