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

View: New views
3 Messages — Rating Filter:   Alert me  

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

by veena pandit :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

by Bertrand, Shawn R :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...]
Sent: Wednesday, May 07, 2008 5:00 PM
To: users@...
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

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

by Mathias Walter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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