struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Griffith, Michael *" <Michael.Griff...@fda.hhs.gov>
Subject RE: AjaxTag 1.3 support?
Date Fri, 01 Feb 2008 23:48:21 GMT
Dave, 

Thanks for the reply. I guess I should have said freemarker instead of
sitemesh...?  At any rate, when the docs don't match the release, it's a
bad thing.

I shouldn't need to do any of this should I? Can you point me at a
simple, minimalist example of the <s:autocompleter> tag?

mg

-----Original Message-----
From: Dave Newton [mailto:newton.dave@yahoo.com] 
Sent: Friday, February 01, 2008 5:42 PM
To: Struts Users Mailing List
Subject: Re: AjaxTag 1.3 support?

--- "Griffith, Michael *" <Michael.Griffith@fda.hhs.gov> wrote:
> public class QuestionAction extends BaseAction implements
> ModelDriven<Question>, Preparable, ServletRequestAware,
> ServletResponseAware {
> 	public String getSearchTerm() throws Exception {
> 		System.out.println("**** Question Search Term:" + qt);
> 		List<Question> results=
questionService.getQuestions(qt);
> 		AjaxXmlBuilder builder= new AjaxXmlBuilder();
> 		builder.addItems(results, "questionType", "text");
> 		
> 		 response.setContentType("text/xml");
> 		 response.setHeader("Cache-Control", "no-cache");
> 		 ServletOutputStream out = response.getOutputStream();
> 		 out.print(builder.toString());
> 		 out.close();
> 		
> 		return SUCCESS;
> 	}
> 
> My struts mapping:
> 
> 	<package name="question" extends="base-pkg"
> namespace="/question">
> 		<action name="get-term" method="getSearchTerm"
> class="...QuestionAction">
> 			<result name="success"
> type="tiles">question.panel</result>
> 		</action>
> 	</package>

If you're writing directly to the stream I doubt you'd even want to
return
anything other than a null from the action, no? What is the
"question.panel"
tile?

> The struts 2 Ajax documentation seems manic and dated. It seems the S2
> Ajax implementation is tied closely to sitemesh, which I am not using.

SiteMesh? The Ajax implementation isn't tied to SiteMesh at all.

Dated? Much of the S2 Ajax documentation is for S2.1, which isn't even
released yet. If anything, it's pre-dated.

Dave



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message