Maybe here is not suitable place to post this question but I really cannot find a solution about this. Is any way to popup a windows with certain tapestry page or URL under onNavigate? I can redirect the page with cycle.activate & URL with RedirectException but cannot find a good solution for popup. Please comment, thanks.
regards
wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This doesn't answer your question, but did you try to use the NewWindowLink_Tap4 component (at tassel) to render the links you want to be shown in a new window?
Of course that works only with the Java-modelled version
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your reply. Maybe I missed some key point. From Tap4, contrib:PopupLink can do pop up and we can redirect to some page or URL later on. (but a component needed) At onNavigate, we receive the id click and preform further action under Java coding. I wonder how to link with the component within Java coding. I tried to link them up with something like http://localhost:8080/proj/app?component=_popup_Page&page=Home&service=direct but exception generated (seems listener missing). Any hints would be appreciate, thanks.
regards
wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I can't see contrib:PopupLink in the Tapestry documentation. This was Tapestry 3, wasn't it?
Anyway must be the same stuff as NewWindowLink_Tap4.
To make a popup link, a redirect is not a good strategy, since javascript openWindow(..) usually is blocked by the browser's default options.
A Popup Window must be opened by JavaScript on the browser when the user clicks the link. Not at the time, the browser receives the response.
The onNavigate method just affects the server's response. If that response is shown in a new window or in the same window
is defined at click-time on the browser.
I tried out pop up links with the NewWindowLink_Tap4 component inside the menu.
It works fine, but you have to nest the component in a span tag. This has the little drawback, that only the central field of the item
is click-sensitive, but it works well.
Render your items you want to open in a new window like this
Dear all
Maybe here is not suitable place to post this question but I really cannot find a solution about this. Is any way to popup a windows with certain tapestry page or URL under onNavigate? I can redirect the page with cycle.activate & URL with RedirectException but cannot find a good solution for popup. Please comment, thanks.
regards
wayne
This doesn't answer your question, but did you try to use the NewWindowLink_Tap4 component (at tassel) to render the links you want to be shown in a new window?
Of course that works only with the Java-modelled version
Thanks for your reply. Maybe I missed some key point. From Tap4, contrib:PopupLink can do pop up and we can redirect to some page or URL later on. (but a component needed) At onNavigate, we receive the id click and preform further action under Java coding. I wonder how to link with the component within Java coding. I tried to link them up with something like http://localhost:8080/proj/app?component=_popup_Page&page=Home&service=direct but exception generated (seems listener missing). Any hints would be appreciate, thanks.
regards
wayne
I can't see contrib:PopupLink in the Tapestry documentation. This was Tapestry 3, wasn't it?
Anyway must be the same stuff as NewWindowLink_Tap4.
To make a popup link, a redirect is not a good strategy, since javascript openWindow(..) usually is blocked by the browser's default options.
A Popup Window must be opened by JavaScript on the browser when the user clicks the link. Not at the time, the browser receives the response.
The onNavigate method just affects the server's response. If that response is shown in a new window or in the same window
is defined at click-time on the browser.
I tried out pop up links with the NewWindowLink_Tap4 component inside the menu.
It works fine, but you have to nest the component in a span tag. This has the little drawback, that only the central field of the item
is click-sensitive, but it works well.
Render your items you want to open in a new window like this
<span jwcid="@menu:JSCookMenu" source="ognl:menuModel"
value="ognl:menuItem" theme=".." >
<span jwcid="contentRenderer@Any">
<a href="#" jwcid="@popup:NewWindowLink"
listener="listener:onNavigate" parameters="ognl:menuItem.value" >
<span jwcid="@Insert" value="ognl:menuItem.value" />
</a>
</span>
</span>
popup:NewWindowlink is the component from the NewWindowLink_Tap4 library.
If contrib:PopUpLink really exists for Tap4, sure you can use it in a very similar way.
cheers
Burkhard
Thanks, using NewWindowLink and resulted disirable outcome. Found that related coding update at CVS also ,thanks a lot.