Author: musachy Date: Mon May 28 09:50:52 2007 New Revision: 542273 URL: http://svn.apache.org/viewvc?view=rev&rev=542273 Log: WW-1953 Freemarker templates fail to use the tags defined in the Dojo plugin * The Dojo model was still referencing models from core (submit, anchor and div)
Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AnchorModel.java struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DivModel.java struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/SubmitModel.java Modified: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DojoModels.java Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AnchorModel.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AnchorModel.java?view=auto&rev=542273 ============================================================================== --- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AnchorModel.java (added) +++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AnchorModel.java Mon May 28 09:50:52 2007 @@ -0,0 +1,43 @@ +/* + * $Id$ + * + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.struts2.dojo.views.freemarker.tags; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts2.components.Component; +import org.apache.struts2.dojo.components.Anchor; +import org.apache.struts2.views.freemarker.tags.TagModel; + +import com.opensymphony.xwork2.util.ValueStack; + +/** + * @see Anchor + */ +public class AnchorModel extends TagModel { + + public AnchorModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { + super(stack, req, res); + } + + @Override + protected Component getBean() { + return new Anchor(stack, req, res); + } + +} Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DivModel.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DivModel.java?view=auto&rev=542273 ============================================================================== --- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DivModel.java (added) +++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DivModel.java Mon May 28 09:50:52 2007 @@ -0,0 +1,44 @@ +/* + * $Id$ + * + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.struts2.dojo.views.freemarker.tags; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts2.components.Component; +import org.apache.struts2.dojo.components.Div; +import org.apache.struts2.views.freemarker.tags.TagModel; + +import com.opensymphony.xwork2.util.ValueStack; + + +/** + * @see Div + */ +public class DivModel extends TagModel { + + public DivModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { + super(stack, req, res); + } + + @Override + protected Component getBean() { + return new Div(stack, req, res); + } + +} Modified: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DojoModels.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DojoModels.java?view=diff&rev=542273&r1=542272&r2=542273 ============================================================================== --- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DojoModels.java (original) +++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DojoModels.java Mon May 28 09:50:52 2007 @@ -1,11 +1,24 @@ +/* + * $Id$ + * + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.struts2.dojo.views.freemarker.tags; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.views.freemarker.tags.AnchorModel; -import org.apache.struts2.views.freemarker.tags.DivModel; -import org.apache.struts2.views.freemarker.tags.SubmitModel; import com.opensymphony.xwork2.util.ValueStack; Added: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/SubmitModel.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/SubmitModel.java?view=auto&rev=542273 ============================================================================== --- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/SubmitModel.java (added) +++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/SubmitModel.java Mon May 28 09:50:52 2007 @@ -0,0 +1,43 @@ +/* + * $Id$ + * + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.struts2.dojo.views.freemarker.tags; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts2.components.Component; +import org.apache.struts2.dojo.components.Submit; +import org.apache.struts2.views.freemarker.tags.TagModel; + +import com.opensymphony.xwork2.util.ValueStack; + +/** + * @see Submit + */ +public class SubmitModel extends TagModel { + + public SubmitModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { + super(stack, req, res); + } + + @Override + protected Component getBean() { + return new Submit(stack, req, res); + } + +}