You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Antoine van Wel <an...@gmail.com> on 2010/03/09 14:05:11 UTC

jquery/qtip integration troubles - ajax post stopped

Hi everybody,

Integrating a Jquery tooltip (qtip) went smoothly until I tried to do
an Ajax form submit.
The Wicket Ajax Debug panel shows an "Ajax POST stopped because of
precondition check", so an Ajax response is never sent.

What I'm doing is simply render the text for the tooltip on the same
page in a hidden div, then pointing the content of the tooltip to that
div.

the html:

<wicket:head>
	<script type="text/javascript" src="/js/jquery-1.3.2.min.js"></script>
	<script type="text/javascript" src="/js/jquery.qtip-1.0.0-rc3.min.js"></script>
</wicket:head>

<wicket:extend>
	<div wicket:id="content" style="display: none;">
		<form wicket:id="form">
			<input type="submit" wicket:id="clickme" value="click me">
		</form>
	</div>
	
	<span wicket:id="tipme">hover over me</span>
</wicket:extend>

the page class:

public class JQueryTestPage extends BasePage {
	public JQueryTestPage() {
		WebMarkupContainer content = new WebMarkupContainer("content");
		add(content);

		Form<Void> form = new Form<Void>("form");
		content.add(form);
		form.add(new AjaxButton("clickme") {
			@Override
			protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
				System.out.println("testing");
			}
			
		});
		
		WebMarkupContainer qtip = new WebMarkupContainer("tipme");
		add(qtip);
		qtip.add(new QTipBehavior(qtip, content));
	}

}


and finally the QTipBehavior:

public class QTipBehavior extends AbstractBehavior {
	private String componentMarkupId;
	private String contentMarkupId;
	
	public QTipBehavior(Component parent, Component content) {
		contentMarkupId = content.getMarkupId();
		componentMarkupId = parent.getMarkupId();
	}
	
	@Override
	public void renderHead(IHeaderResponse response) {
		String javascript = new StringBuilder()
			.append("$(function() {")
			.append("	$('#" + componentMarkupId + "').qtip({")
			.append("		content: $('#" + contentMarkupId + "').html(),")
			.append("		hide: { fixed: true },")
			.append("		position: { corner: { target: 'topRight', tooltip:
'leftTop' } },")
			.append("	})")
			.append("});")
			.toString();
		response.renderOnDomReadyJavascript(javascript);
	}
}


All pretty straightforward.

So my guess is somehow Wicket is not happy about the redirection I
created by not using the rendered button directly.
I've been trying to debug this using Firebug, obviously without success.

Does anybody have any hints how to solve this? Is the approach I'm
taking flawed? Maybe jWicket or wiQuery could help here?



Antoine

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: jquery/qtip integration troubles - ajax post stopped

Posted by Antoine van Wel <an...@gmail.com>.
Alright, I got this to work in a clean way.

The problem was that the QTip jQuery plugin *cloned* the panel / form.
This was causing trouble for the form submission. Simply adding a
.remove() which removed the original DOM tree fixed the issue.

I ended up with replacing
.append("               content: $('#" + contentMarkupId + "').html(),")

by
.append("               content: $('#" + contentMarkupId + "').remove(),")


and now everything works as a charm.


Antoine.


On Wed, Mar 10, 2010 at 6:04 PM, Antoine van Wel
<an...@gmail.com> wrote:
> Turns out "Wicket.$$(this)" returned false after all. Thanks Richard!
>
> I ended up adapting the AjaxButton by simply kicking out the
> Wicket.$$(this) of the pre-condition check.
>
> So can anybody tell me what this "Wicket.$$(this)" is good for ... I
> got a gut-feeling what I've done is not such a good idea :-)
>
>
> Antoine
>
>
> On Tue, Mar 9, 2010 at 6:44 PM, Antoine van Wel
> <an...@gmail.com> wrote:
>> Hi Richard,
>>
>> Thanks for the reply. It didn't bring me further though.
>> When debugging, Wicket.$$(this) and the other one both return true, so
>> that doesn't seem to be the problem.
>>
>> When tracking the evaluation of the precondition, I end up in wicket-event.js
>>
>> 25 if (Function.prototype.bind == null) {
>> 26 Function.prototype.bind = function(object) {
>> 27 var __method = this;
>> 28 return function() {
>> 29 return __method.apply(object, arguments);
>> 30 }
>> 31 }
>> 32}
>>
>> where line 29 will return false.
>> Does that ring any bells?
>>
>>
>> By the way, in the code I copied-and-pasted in my previous email, two
>> lines were not included which needs to be there:
>> setOutputMarkupId(true) on parent & content components.
>>
>>
>> Antoine
>>
>> On Tue, Mar 9, 2010 at 4:37 PM, Richard Wilkinson
>> <ri...@googlemail.com> wrote:
>>> Hi,
>>>
>>> 'Ajax POST stopped because of precondition check' is probably your
>>> problem.  all wicket ajax can have a precondition, which is basically
>>> a function that returns true or false, and will only execute the ajax
>>> if it returns true.  I expect that for some reason in your case this
>>> function is returning false.
>>>
>>> for an AjaxButton (well AjaxFormSubmitBehavior) the precondition is
>>> this: "return Wicket.$$(this)&&Wicket.$$('" + getForm().getMarkupId()
>>> + "')";
>>>
>>> in the wicket ajax javascript file i see this:
>>>
>>> // returns if the element belongs to current document
>>> // if the argument is not element, function returns true
>>> Wicket.$$ = function(element) {
>>> .......
>>> }
>>>
>>> This must be failing for you, which I presume has something to do with
>>> how you are passing the content into the qtip;
>>>
>>> content: $('#" + contentMarkupId + "').html()
>>>
>>> Hope that helps.
>>>
>>> --
>>> Regards - Richard Wilkinson
>>> Developer,
>>> jWeekend: OO & Java Technologies - Development and Training
>>> http://jWeekend.com
>>>
>>>
>>> On 9 March 2010 13:05, Antoine van Wel <an...@gmail.com> wrote:
>>>> Hi everybody,
>>>>
>>>> Integrating a Jquery tooltip (qtip) went smoothly until I tried to do
>>>> an Ajax form submit.
>>>> The Wicket Ajax Debug panel shows an "Ajax POST stopped because of
>>>> precondition check", so an Ajax response is never sent.
>>>>
>>>> What I'm doing is simply render the text for the tooltip on the same
>>>> page in a hidden div, then pointing the content of the tooltip to that
>>>> div.
>>>>
>>>> the html:
>>>>
>>>> <wicket:head>
>>>>        <script type="text/javascript" src="/js/jquery-1.3.2.min.js"></script>
>>>>        <script type="text/javascript" src="/js/jquery.qtip-1.0.0-rc3.min.js"></script>
>>>> </wicket:head>
>>>>
>>>> <wicket:extend>
>>>>        <div wicket:id="content" style="display: none;">
>>>>                <form wicket:id="form">
>>>>                        <input type="submit" wicket:id="clickme" value="click me">
>>>>                </form>
>>>>        </div>
>>>>
>>>>        <span wicket:id="tipme">hover over me</span>
>>>> </wicket:extend>
>>>>
>>>> the page class:
>>>>
>>>> public class JQueryTestPage extends BasePage {
>>>>        public JQueryTestPage() {
>>>>                WebMarkupContainer content = new WebMarkupContainer("content");
>>>>                add(content);
>>>>
>>>>                Form<Void> form = new Form<Void>("form");
>>>>                content.add(form);
>>>>                form.add(new AjaxButton("clickme") {
>>>>                        @Override
>>>>                        protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
>>>>                                System.out.println("testing");
>>>>                        }
>>>>
>>>>                });
>>>>
>>>>                WebMarkupContainer qtip = new WebMarkupContainer("tipme");
>>>>                add(qtip);
>>>>                qtip.add(new QTipBehavior(qtip, content));
>>>>        }
>>>>
>>>> }
>>>>
>>>>
>>>> and finally the QTipBehavior:
>>>>
>>>> public class QTipBehavior extends AbstractBehavior {
>>>>        private String componentMarkupId;
>>>>        private String contentMarkupId;
>>>>
>>>>        public QTipBehavior(Component parent, Component content) {
>>>>                contentMarkupId = content.getMarkupId();
>>>>                componentMarkupId = parent.getMarkupId();
>>>>        }
>>>>
>>>>        @Override
>>>>        public void renderHead(IHeaderResponse response) {
>>>>                String javascript = new StringBuilder()
>>>>                        .append("$(function() {")
>>>>                        .append("       $('#" + componentMarkupId + "').qtip({")
>>>>                        .append("               content: $('#" + contentMarkupId + "').html(),")
>>>>                        .append("               hide: { fixed: true },")
>>>>                        .append("               position: { corner: { target: 'topRight', tooltip:
>>>> 'leftTop' } },")
>>>>                        .append("       })")
>>>>                        .append("});")
>>>>                        .toString();
>>>>                response.renderOnDomReadyJavascript(javascript);
>>>>        }
>>>> }
>>>>
>>>>
>>>> All pretty straightforward.
>>>>
>>>> So my guess is somehow Wicket is not happy about the redirection I
>>>> created by not using the rendered button directly.
>>>> I've been trying to debug this using Firebug, obviously without success.
>>>>
>>>> Does anybody have any hints how to solve this? Is the approach I'm
>>>> taking flawed? Maybe jWicket or wiQuery could help here?
>>>>
>>>>
>>>>
>>>> Antoine
>



-- 
take your photos everywhere you go - https://www.memolio.com
follow us on Twitter - http://twitter.com/Memolio

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: jquery/qtip integration troubles - ajax post stopped

Posted by Antoine van Wel <an...@gmail.com>.
Turns out "Wicket.$$(this)" returned false after all. Thanks Richard!

I ended up adapting the AjaxButton by simply kicking out the
Wicket.$$(this) of the pre-condition check.

So can anybody tell me what this "Wicket.$$(this)" is good for ... I
got a gut-feeling what I've done is not such a good idea :-)


Antoine


On Tue, Mar 9, 2010 at 6:44 PM, Antoine van Wel
<an...@gmail.com> wrote:
> Hi Richard,
>
> Thanks for the reply. It didn't bring me further though.
> When debugging, Wicket.$$(this) and the other one both return true, so
> that doesn't seem to be the problem.
>
> When tracking the evaluation of the precondition, I end up in wicket-event.js
>
> 25 if (Function.prototype.bind == null) {
> 26 Function.prototype.bind = function(object) {
> 27 var __method = this;
> 28 return function() {
> 29 return __method.apply(object, arguments);
> 30 }
> 31 }
> 32}
>
> where line 29 will return false.
> Does that ring any bells?
>
>
> By the way, in the code I copied-and-pasted in my previous email, two
> lines were not included which needs to be there:
> setOutputMarkupId(true) on parent & content components.
>
>
> Antoine
>
> On Tue, Mar 9, 2010 at 4:37 PM, Richard Wilkinson
> <ri...@googlemail.com> wrote:
>> Hi,
>>
>> 'Ajax POST stopped because of precondition check' is probably your
>> problem.  all wicket ajax can have a precondition, which is basically
>> a function that returns true or false, and will only execute the ajax
>> if it returns true.  I expect that for some reason in your case this
>> function is returning false.
>>
>> for an AjaxButton (well AjaxFormSubmitBehavior) the precondition is
>> this: "return Wicket.$$(this)&&Wicket.$$('" + getForm().getMarkupId()
>> + "')";
>>
>> in the wicket ajax javascript file i see this:
>>
>> // returns if the element belongs to current document
>> // if the argument is not element, function returns true
>> Wicket.$$ = function(element) {
>> .......
>> }
>>
>> This must be failing for you, which I presume has something to do with
>> how you are passing the content into the qtip;
>>
>> content: $('#" + contentMarkupId + "').html()
>>
>> Hope that helps.
>>
>> --
>> Regards - Richard Wilkinson
>> Developer,
>> jWeekend: OO & Java Technologies - Development and Training
>> http://jWeekend.com
>>
>>
>> On 9 March 2010 13:05, Antoine van Wel <an...@gmail.com> wrote:
>>> Hi everybody,
>>>
>>> Integrating a Jquery tooltip (qtip) went smoothly until I tried to do
>>> an Ajax form submit.
>>> The Wicket Ajax Debug panel shows an "Ajax POST stopped because of
>>> precondition check", so an Ajax response is never sent.
>>>
>>> What I'm doing is simply render the text for the tooltip on the same
>>> page in a hidden div, then pointing the content of the tooltip to that
>>> div.
>>>
>>> the html:
>>>
>>> <wicket:head>
>>>        <script type="text/javascript" src="/js/jquery-1.3.2.min.js"></script>
>>>        <script type="text/javascript" src="/js/jquery.qtip-1.0.0-rc3.min.js"></script>
>>> </wicket:head>
>>>
>>> <wicket:extend>
>>>        <div wicket:id="content" style="display: none;">
>>>                <form wicket:id="form">
>>>                        <input type="submit" wicket:id="clickme" value="click me">
>>>                </form>
>>>        </div>
>>>
>>>        <span wicket:id="tipme">hover over me</span>
>>> </wicket:extend>
>>>
>>> the page class:
>>>
>>> public class JQueryTestPage extends BasePage {
>>>        public JQueryTestPage() {
>>>                WebMarkupContainer content = new WebMarkupContainer("content");
>>>                add(content);
>>>
>>>                Form<Void> form = new Form<Void>("form");
>>>                content.add(form);
>>>                form.add(new AjaxButton("clickme") {
>>>                        @Override
>>>                        protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
>>>                                System.out.println("testing");
>>>                        }
>>>
>>>                });
>>>
>>>                WebMarkupContainer qtip = new WebMarkupContainer("tipme");
>>>                add(qtip);
>>>                qtip.add(new QTipBehavior(qtip, content));
>>>        }
>>>
>>> }
>>>
>>>
>>> and finally the QTipBehavior:
>>>
>>> public class QTipBehavior extends AbstractBehavior {
>>>        private String componentMarkupId;
>>>        private String contentMarkupId;
>>>
>>>        public QTipBehavior(Component parent, Component content) {
>>>                contentMarkupId = content.getMarkupId();
>>>                componentMarkupId = parent.getMarkupId();
>>>        }
>>>
>>>        @Override
>>>        public void renderHead(IHeaderResponse response) {
>>>                String javascript = new StringBuilder()
>>>                        .append("$(function() {")
>>>                        .append("       $('#" + componentMarkupId + "').qtip({")
>>>                        .append("               content: $('#" + contentMarkupId + "').html(),")
>>>                        .append("               hide: { fixed: true },")
>>>                        .append("               position: { corner: { target: 'topRight', tooltip:
>>> 'leftTop' } },")
>>>                        .append("       })")
>>>                        .append("});")
>>>                        .toString();
>>>                response.renderOnDomReadyJavascript(javascript);
>>>        }
>>> }
>>>
>>>
>>> All pretty straightforward.
>>>
>>> So my guess is somehow Wicket is not happy about the redirection I
>>> created by not using the rendered button directly.
>>> I've been trying to debug this using Firebug, obviously without success.
>>>
>>> Does anybody have any hints how to solve this? Is the approach I'm
>>> taking flawed? Maybe jWicket or wiQuery could help here?
>>>
>>>
>>>
>>> Antoine

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: jquery/qtip integration troubles - ajax post stopped

Posted by Antoine van Wel <an...@gmail.com>.
Hi Richard,

Thanks for the reply. It didn't bring me further though.
When debugging, Wicket.$$(this) and the other one both return true, so
that doesn't seem to be the problem.

When tracking the evaluation of the precondition, I end up in wicket-event.js

25 if (Function.prototype.bind == null) {
26 Function.prototype.bind = function(object) {
27 var __method = this;
28 return function() {
29 return __method.apply(object, arguments);
30 }
31 }
32}

where line 29 will return false.
Does that ring any bells?


By the way, in the code I copied-and-pasted in my previous email, two
lines were not included which needs to be there:
setOutputMarkupId(true) on parent & content components.


Antoine

On Tue, Mar 9, 2010 at 4:37 PM, Richard Wilkinson
<ri...@googlemail.com> wrote:
> Hi,
>
> 'Ajax POST stopped because of precondition check' is probably your
> problem.  all wicket ajax can have a precondition, which is basically
> a function that returns true or false, and will only execute the ajax
> if it returns true.  I expect that for some reason in your case this
> function is returning false.
>
> for an AjaxButton (well AjaxFormSubmitBehavior) the precondition is
> this: "return Wicket.$$(this)&&Wicket.$$('" + getForm().getMarkupId()
> + "')";
>
> in the wicket ajax javascript file i see this:
>
> // returns if the element belongs to current document
> // if the argument is not element, function returns true
> Wicket.$$ = function(element) {
> .......
> }
>
> This must be failing for you, which I presume has something to do with
> how you are passing the content into the qtip;
>
> content: $('#" + contentMarkupId + "').html()
>
> Hope that helps.
>
> --
> Regards - Richard Wilkinson
> Developer,
> jWeekend: OO & Java Technologies - Development and Training
> http://jWeekend.com
>
>
> On 9 March 2010 13:05, Antoine van Wel <an...@gmail.com> wrote:
>> Hi everybody,
>>
>> Integrating a Jquery tooltip (qtip) went smoothly until I tried to do
>> an Ajax form submit.
>> The Wicket Ajax Debug panel shows an "Ajax POST stopped because of
>> precondition check", so an Ajax response is never sent.
>>
>> What I'm doing is simply render the text for the tooltip on the same
>> page in a hidden div, then pointing the content of the tooltip to that
>> div.
>>
>> the html:
>>
>> <wicket:head>
>>        <script type="text/javascript" src="/js/jquery-1.3.2.min.js"></script>
>>        <script type="text/javascript" src="/js/jquery.qtip-1.0.0-rc3.min.js"></script>
>> </wicket:head>
>>
>> <wicket:extend>
>>        <div wicket:id="content" style="display: none;">
>>                <form wicket:id="form">
>>                        <input type="submit" wicket:id="clickme" value="click me">
>>                </form>
>>        </div>
>>
>>        <span wicket:id="tipme">hover over me</span>
>> </wicket:extend>
>>
>> the page class:
>>
>> public class JQueryTestPage extends BasePage {
>>        public JQueryTestPage() {
>>                WebMarkupContainer content = new WebMarkupContainer("content");
>>                add(content);
>>
>>                Form<Void> form = new Form<Void>("form");
>>                content.add(form);
>>                form.add(new AjaxButton("clickme") {
>>                        @Override
>>                        protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
>>                                System.out.println("testing");
>>                        }
>>
>>                });
>>
>>                WebMarkupContainer qtip = new WebMarkupContainer("tipme");
>>                add(qtip);
>>                qtip.add(new QTipBehavior(qtip, content));
>>        }
>>
>> }
>>
>>
>> and finally the QTipBehavior:
>>
>> public class QTipBehavior extends AbstractBehavior {
>>        private String componentMarkupId;
>>        private String contentMarkupId;
>>
>>        public QTipBehavior(Component parent, Component content) {
>>                contentMarkupId = content.getMarkupId();
>>                componentMarkupId = parent.getMarkupId();
>>        }
>>
>>        @Override
>>        public void renderHead(IHeaderResponse response) {
>>                String javascript = new StringBuilder()
>>                        .append("$(function() {")
>>                        .append("       $('#" + componentMarkupId + "').qtip({")
>>                        .append("               content: $('#" + contentMarkupId + "').html(),")
>>                        .append("               hide: { fixed: true },")
>>                        .append("               position: { corner: { target: 'topRight', tooltip:
>> 'leftTop' } },")
>>                        .append("       })")
>>                        .append("});")
>>                        .toString();
>>                response.renderOnDomReadyJavascript(javascript);
>>        }
>> }
>>
>>
>> All pretty straightforward.
>>
>> So my guess is somehow Wicket is not happy about the redirection I
>> created by not using the rendered button directly.
>> I've been trying to debug this using Firebug, obviously without success.
>>
>> Does anybody have any hints how to solve this? Is the approach I'm
>> taking flawed? Maybe jWicket or wiQuery could help here?
>>
>>
>>
>> Antoine
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
take your photos everywhere you go - https://www.memolio.com
follow us on Twitter - http://twitter.com/Memolio

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: jquery/qtip integration troubles - ajax post stopped

Posted by Richard Wilkinson <ri...@googlemail.com>.
Hi,

'Ajax POST stopped because of precondition check' is probably your
problem.  all wicket ajax can have a precondition, which is basically
a function that returns true or false, and will only execute the ajax
if it returns true.  I expect that for some reason in your case this
function is returning false.

for an AjaxButton (well AjaxFormSubmitBehavior) the precondition is
this: "return Wicket.$$(this)&&Wicket.$$('" + getForm().getMarkupId()
+ "')";

in the wicket ajax javascript file i see this:

// returns if the element belongs to current document
// if the argument is not element, function returns true
Wicket.$$ = function(element) {	
.......
}

This must be failing for you, which I presume has something to do with
how you are passing the content into the qtip;

content: $('#" + contentMarkupId + "').html()

Hope that helps.

-- 
Regards - Richard Wilkinson
Developer,
jWeekend: OO & Java Technologies - Development and Training
http://jWeekend.com


On 9 March 2010 13:05, Antoine van Wel <an...@gmail.com> wrote:
> Hi everybody,
>
> Integrating a Jquery tooltip (qtip) went smoothly until I tried to do
> an Ajax form submit.
> The Wicket Ajax Debug panel shows an "Ajax POST stopped because of
> precondition check", so an Ajax response is never sent.
>
> What I'm doing is simply render the text for the tooltip on the same
> page in a hidden div, then pointing the content of the tooltip to that
> div.
>
> the html:
>
> <wicket:head>
>        <script type="text/javascript" src="/js/jquery-1.3.2.min.js"></script>
>        <script type="text/javascript" src="/js/jquery.qtip-1.0.0-rc3.min.js"></script>
> </wicket:head>
>
> <wicket:extend>
>        <div wicket:id="content" style="display: none;">
>                <form wicket:id="form">
>                        <input type="submit" wicket:id="clickme" value="click me">
>                </form>
>        </div>
>
>        <span wicket:id="tipme">hover over me</span>
> </wicket:extend>
>
> the page class:
>
> public class JQueryTestPage extends BasePage {
>        public JQueryTestPage() {
>                WebMarkupContainer content = new WebMarkupContainer("content");
>                add(content);
>
>                Form<Void> form = new Form<Void>("form");
>                content.add(form);
>                form.add(new AjaxButton("clickme") {
>                        @Override
>                        protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
>                                System.out.println("testing");
>                        }
>
>                });
>
>                WebMarkupContainer qtip = new WebMarkupContainer("tipme");
>                add(qtip);
>                qtip.add(new QTipBehavior(qtip, content));
>        }
>
> }
>
>
> and finally the QTipBehavior:
>
> public class QTipBehavior extends AbstractBehavior {
>        private String componentMarkupId;
>        private String contentMarkupId;
>
>        public QTipBehavior(Component parent, Component content) {
>                contentMarkupId = content.getMarkupId();
>                componentMarkupId = parent.getMarkupId();
>        }
>
>        @Override
>        public void renderHead(IHeaderResponse response) {
>                String javascript = new StringBuilder()
>                        .append("$(function() {")
>                        .append("       $('#" + componentMarkupId + "').qtip({")
>                        .append("               content: $('#" + contentMarkupId + "').html(),")
>                        .append("               hide: { fixed: true },")
>                        .append("               position: { corner: { target: 'topRight', tooltip:
> 'leftTop' } },")
>                        .append("       })")
>                        .append("});")
>                        .toString();
>                response.renderOnDomReadyJavascript(javascript);
>        }
> }
>
>
> All pretty straightforward.
>
> So my guess is somehow Wicket is not happy about the redirection I
> created by not using the rendered button directly.
> I've been trying to debug this using Firebug, obviously without success.
>
> Does anybody have any hints how to solve this? Is the approach I'm
> taking flawed? Maybe jWicket or wiQuery could help here?
>
>
>
> Antoine
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket allow multiple Spring context files?

Posted by Anantha Kumaran <an...@gmail.com>.
i am also splitting the config files into many files and i have no problems
yet.

<beans default-lazy-init="true">
 <import resource="classpath:common.xml" />


<import resource="classpath:persistence.hibernate.xml" />


<!-- import the wicket application specific settiongs -->
<import resource="classpath:SpringHibernate.xml" />

</beans>

perhaps you might follow different method

On Tue, Mar 9, 2010 at 7:01 PM, David Chang <da...@yahoo.com> wrote:

> When I did my Spring web applications, I split Spring context files into a
> few smaller ones (example: one for web beans, one for DAO beans, one for
> Service beans, etc).
>
> I would like to follow the same approach in my Wicket application, but I
> notice a few odd things:
>
> 1. The order of these Context files in web.xml plays a role. If not right,
> Tomcat will not start and report wicket "WebApplication" cannot be found.
>
> 2. Service beans specified through the following:
>
> @SpringBean
> private SupportService supportService;
>
> result in runtime error that the bean of type SuppportService cannot be
> found if a service bean is specified in a different context file other than
> that of wicket "WebApplication".
>
> Any of you had similar experience. Any fix?
>
> Regards.
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
----
Anantha Kumaran(http://ananthakumaran.github.com)

Wicket allow multiple Spring context files?

Posted by David Chang <da...@yahoo.com>.
When I did my Spring web applications, I split Spring context files into a few smaller ones (example: one for web beans, one for DAO beans, one for Service beans, etc). 

I would like to follow the same approach in my Wicket application, but I notice a few odd things:

1. The order of these Context files in web.xml plays a role. If not right, Tomcat will not start and report wicket "WebApplication" cannot be found.

2. Service beans specified through the following:

@SpringBean
private SupportService supportService;

result in runtime error that the bean of type SuppportService cannot be found if a service bean is specified in a different context file other than that of wicket "WebApplication".

Any of you had similar experience. Any fix?

Regards.




      

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org