You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by veena pandit <v....@gmail.com> on 2008/05/07 23:00:23 UTC

[TRINIDAD] resizing the size(width and height) of a dialog window

Shawn,

I do not want to hardcode the width and height.  How do I get it to
automatically resize itself based on the data it has to show?

Thanks,

Veena

RE: [TRINIDAD] resizing the size(width and height) of a dialog window

Posted by Mathias Walter <ma...@gmx.net>.
Hi,

> It already automatically resizes the dialog to fit its 
> contents, though
> it is better at it in IE and Firefox in my experience.
> 
> It is my understanding this resizing behavior is built into 
> Trinidad, so
> if it isn't happening for you, there may be a problem with your JSP or
> in the parsing of such.  Not sure...

The automatic resizing does not work very well. I've also a few dialogs
(especially lightweight dialogs) and set the size manually (at the body).

I don't think there is a problem with the source. It's very simple:

<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
	xmlns:tr="http://myfaces.apache.org/trinidad"
xmlns:trh="http://myfaces.apache.org/trinidad/html"
	xmlns:h="http://java.sun.com/jsf/html"
	version="1.2">
	<trh:head>
		<title>Choose Physician</title>
	</trh:head>
	<trh:body inlineStyle="width: 400px">
		<tr:form>
			<tr:panelFormLayout>
				<tr:selectOneChoice label="Physician:"
value="#{physicians.choosed}" required="true">
					<f:selectItems
value="#{physicians.items}" />
				</tr:selectOneChoice>
			</tr:panelFormLayout>
			<tr:separator />
			<tr:panelButtonBar halign="center">
				<tr:commandButton id="save"
action="#{physicians.select}" text="Apply" />
				<tr:commandButton id="cancel"
action="#{physicians.cancelSelect}" text="Cancel" immediate="true" />
			</tr:panelButtonBar>
		</tr:form>
	</trh:body>
</html>

--
Kind regards,
Mathias


RE: [TRINIDAD] resizing the size(width and height) of a dialog window

Posted by "Bertrand, Shawn R" <sh...@tycoelectronics.com>.
It already automatically resizes the dialog to fit its contents, though
it is better at it in IE and Firefox in my experience.

It is my understanding this resizing behavior is built into Trinidad, so
if it isn't happening for you, there may be a problem with your JSP or
in the parsing of such.  Not sure...

If you can reproduce the problem with a simple test case (e.g. using the
Trinidad demo app), it might be best to file an issue on JIRA.

Shawn


-----Original Message-----
From: veena pandit [mailto:v.kris21@gmail.com] 
Sent: Wednesday, May 07, 2008 5:00 PM
To: users@myfaces.apache.org
Subject: [TRINIDAD] resizing the size(width and height) of a dialog
window

Shawn,

I do not want to hardcode the width and height.  How do I get it to
automatically resize itself based on the data it has to show?

Thanks,

Veena