You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by sieppl <qu...@gmx.de> on 2007/01/24 19:11:19 UTC

[Tobago 1.1.0] Clean code for opening Popups from sheet columns

Hi!

I have read about the new way (and I think simple one) to open Popups from
buttons, links etc. without using Actions or ActionListeners. Furtermore I
have understood the purpose of the PopUpReferenceTag and how to use it. But
I have still problems to write a clean code for opening popups from sheet
columns. 
1. Rendered attribute does not work anymore due to latest changes.
2. Putting a button or a link into the column and use a facet for the popup
does not work from inside the sheet row. The same code works fine when the
button is placed anywhere outside the sheet column.
3. Placing a hidden button with popup anywere on the form and call it via a
reference tag is very dirty.

Could anyone give me a hint or a piece of clean and working code? We need
that popups all over our pages. :)

Regards

Sebastian

PS: Keep up the good work on Tobago!
-- 
View this message in context: http://www.nabble.com/-Tobago-1.1.0--Clean-code-for-opening-Popups-from-sheet-columns-tf3083633.html#a8569223
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Solution

Posted by sieppl <qu...@gmx.de>.
Hi Bernd,

you were completey right. Folllowing peace of code works perfect:

<layout:page>
	<jsp:body>

		<tc:panel>

			<f:facet name="popup">
				<tc:popup width="640" height="480" id="itemDetailPopup">
						<tc:panel>
							<tc:button label="Cancel">
								<tc:attribute name="popupClose" value="immediate" />
							</tc:button>				
						</tc:panel>
				</tc:popup>
			</f:facet>
			
			<tc:panel>
				<tc:sheet value="#{myController}"
					id="sheet" columns="50px" var="item"

					<tc:column label="action" sortable="false" align="center">
					
						<tc:panel>
							<tc:link id="link1" image="img/show.gif"
								actionListener="#{doSomething}">
								<f:param name="value" value="#{myValue}" />
								<tc:popupReference for=":page:itemDetailPopup" />
							</tc:link>
							
							<tc:link id="link2" image="img/edit.gif" />
							
						</tc:panel>
					</tc:column>
				</tc:sheet>
			</tc:panel>

	</jsp:body>
</layout:page>

Thank you!

Regards

Sebastian

sieppl wrote:
> 
> Hi!
> 
> I have read about the new way (and I think simple one) to open Popups from
> buttons, links etc. without using Actions or ActionListeners. Furtermore I
> have understood the purpose of the PopUpReferenceTag and how to use it.
> But I have still problems to write a clean code for opening popups from
> sheet columns. 
> 1. Rendered attribute does not work anymore due to latest changes.
> 2. Putting a button or a link into the column and use a facet for the
> popup does not work from inside the sheet row. The same code works fine
> when the button is placed anywhere outside the sheet column.
> 3. Placing a hidden button with popup anywere on the form and call it via
> a reference tag is very dirty.
> 
> Could anyone give me a hint or a piece of clean and working code? We need
> that popups all over our pages. :)
> 
> Regards
> 
> Sebastian
> 
> PS: Keep up the good work on Tobago!
> 

-- 
View this message in context: http://www.nabble.com/-Tobago-1.1.0--Clean-code-for-opening-Popups-from-sheet-columns-tf3083633.html#a8639985
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: [Tobago 1.1.0] Clean code for opening Popups from sheet columns

Posted by sieppl <qu...@gmx.de>.
Hi Bernd,

thank you very much for your quick reply. I will test it tomorrow again and
post the
working code here.  Did you reinclude the rendered attribute within the last
two weeks?
Maybe our snapshot is out of date..

Regards

Sebastian


Bernd Bohmann wrote:
> 
> Hello Sebastian,
> 
> if you are using a value binding for the rendered attribute this should 
> work again.(For the current snapshot and the upcoming 1.0.10 release :-)
> 
> But you don't need to add a hidden button with a popup to the page. You 
> can place the popup on the page where you want (without a button) and 
> use the PopUpReferenceTag. Maybe you should place the popup before the 
> sheet?
> 
> Regards
> 
> Bernd
> 
> sieppl wrote:
>> Hi!
>> 
>> I have read about the new way (and I think simple one) to open Popups
>> from
>> buttons, links etc. without using Actions or ActionListeners. Furtermore
>> I
>> have understood the purpose of the PopUpReferenceTag and how to use it.
>> But
>> I have still problems to write a clean code for opening popups from sheet
>> columns. 
>> 1. Rendered attribute does not work anymore due to latest changes.
>> 2. Putting a button or a link into the column and use a facet for the
>> popup
>> does not work from inside the sheet row. The same code works fine when
>> the
>> button is placed anywhere outside the sheet column.
>> 3. Placing a hidden button with popup anywere on the form and call it via
>> a
>> reference tag is very dirty.
>> 
>> Could anyone give me a hint or a piece of clean and working code? We need
>> that popups all over our pages. :)
>> 
>> Regards
>> 
>> Sebastian
>> 
>> PS: Keep up the good work on Tobago!
> 
> 

-- 
View this message in context: http://www.nabble.com/-Tobago-1.1.0--Clean-code-for-opening-Popups-from-sheet-columns-tf3083633.html#a8572239
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: [Tobago 1.1.0] Clean code for opening Popups from sheet columns

Posted by Bernd Bohmann <be...@atanion.com>.
Hello Sebastian,

if you are using a value binding for the rendered attribute this should 
work again.(For the current snapshot and the upcoming 1.0.10 release :-)

But you don't need to add a hidden button with a popup to the page. You 
can place the popup on the page where you want (without a button) and 
use the PopUpReferenceTag. Maybe you should place the popup before the 
sheet?

Regards

Bernd

sieppl wrote:
> Hi!
> 
> I have read about the new way (and I think simple one) to open Popups from
> buttons, links etc. without using Actions or ActionListeners. Furtermore I
> have understood the purpose of the PopUpReferenceTag and how to use it. But
> I have still problems to write a clean code for opening popups from sheet
> columns. 
> 1. Rendered attribute does not work anymore due to latest changes.
> 2. Putting a button or a link into the column and use a facet for the popup
> does not work from inside the sheet row. The same code works fine when the
> button is placed anywhere outside the sheet column.
> 3. Placing a hidden button with popup anywere on the form and call it via a
> reference tag is very dirty.
> 
> Could anyone give me a hint or a piece of clean and working code? We need
> that popups all over our pages. :)
> 
> Regards
> 
> Sebastian
> 
> PS: Keep up the good work on Tobago!