You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by fachhoch <fa...@gmail.com> on 2010/07/20 20:56:50 UTC

show modal window on cometd event using IChannelTarget

I am using wicket  cometd.
in the onEvent method of IChannelListner , I  want to show a  ModalWIndow , 

to show a modaWindow we have to call method show which takes
AjaxRequestTarget, bu in I channleListner I get   IChannelTarget  , please
suggest me how can I open   modal window in onEvent method using 
IChannelTarget   ? 
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/show-modal-window-on-cometd-event-using-IChannelTarget-tp2296068p2296068.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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


Re: show modal window on cometd event using IChannelTarget

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
I haven't used wicket cometd... so what I say might be far from
reality but... if you are in the middle of an AJAX request cycle I
think you can always use AjaxRequestTarget .get() to access the
(thread local) instance of AjaxRequestTarget. I don't know  if you can
use this on your situation but it might be worth giving it a try.

Regards,

Ernesto


On Thu, Jul 22, 2010 at 7:17 PM, fachhoch <fa...@gmail.com> wrote:
>
> please help me
>
>
>
>
>        private final class AuditProgramResetTaskListener implements
> IChannelListener {
>                public void onEvent(final String channel, final Map<String, String> datas,
> final IChannelTarget target) {
>                        Long  wfEntityId=new Long(datas.get(Parameters.PARAM_WF_ENTITY_ID));
>                        if(wfEntityId.equals(wfEntityId)){
>                                CustomModalWindow
> modalWindow=(CustomModalWindow)get("programResetAlert");
>                                modalWindow.show(target);// this line wont compile  it needs
> AjaxRequestTarget , but I have IchannelTarget
>
>                        }
>                }
>        }
>
>
> Please tell me how can I convert IChannelTarget to AjaxRequestTarget ?
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/show-modal-window-on-cometd-event-using-IChannelTarget-tp2296068p2299004.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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: show modal window on cometd event using IChannelTarget

Posted by vineetsemwal <vi...@gmail.com>.

two things that you can try
1)you can try ajaxrequesttarget.get() in listener's onevent it may or may
not give you ajaxrequesttarget,
if it doesn't ,it will give you null,if it gives you null wich is my guess
;),try second point

2) you can just extend modalwindow and just create your own
public void myshow(ichanneltarget target){
//same code as original show method which is not much;
}

similarly with any other methods if there is a need ..


-----
vineet semwal
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/show-modal-window-on-cometd-event-using-IChannelTarget-tp2296068p2299737.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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


Re: show modal window on cometd event using IChannelTarget

Posted by fachhoch <fa...@gmail.com>.
please help me

 


	private final class AuditProgramResetTaskListener implements
IChannelListener {
		public void onEvent(final String channel, final Map<String, String> datas,
final IChannelTarget target) {
			Long  wfEntityId=new Long(datas.get(Parameters.PARAM_WF_ENTITY_ID));
			if(wfEntityId.equals(wfEntityId)){
				CustomModalWindow 
modalWindow=(CustomModalWindow)get("programResetAlert");
				modalWindow.show(target);// this line wont compile  it needs
AjaxRequestTarget , but I have IchannelTarget

			}
		}
	}


Please tell me how can I convert IChannelTarget to AjaxRequestTarget ?
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/show-modal-window-on-cometd-event-using-IChannelTarget-tp2296068p2299004.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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


Re: show modal window on cometd event using IChannelTarget

Posted by fachhoch <fa...@gmail.com>.
I  a using  a modalwindow and on an event I wan to call modalWindow.show()

 the  method   modalWindow.show()   takes AjaxTargetRequest ,as input
parameter, 
the problem I have is I donot have AjaxRequestTarget but I have 
org.wicketstuff.push.IchannelTarget , 
Please tell me how can I can I convert   org.wicketstuff.push.IchannelTarget 
to AjaxRequestTarget ?

  
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/show-modal-window-on-cometd-event-using-IChannelTarget-tp2296068p2298726.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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