[flexcoders] Re: Dynamicaly shrink expand flex application

2009-05-12 Thread yossi.baram
Thanks for the reply man,
I'm missing something here,
I created my Tree as a tag:

%@ tag import=com.mercury.topaz.webinfra.WebInfraApplicationFactory %
%@ tag import=com.mercury.topaz.webinfra.WebInfraApplication %
%@ tag description=Display Flex Treetable pageEncoding=UTF-8 %
%@ taglib prefix=c uri=/tags/jstl-core %
%@ taglib prefix=fn uri=/functions/jstl %
%@ taglib prefix=utils tagdir=/WEB-INF/tags/act/utils %
%@ taglib prefix=actfn uri=/functions/act %
%@ attribute name=treeTableId type=java.lang.String required=true 
description=The id of the Treetable. %
%@ attribute name=width type=java.lang.Integer required=true 
description=The TreeTable width. %
%@ attribute name=height type=java.lang.Integer required=true 
description=The TreeTable height. %
%@ attribute name=treeTableServiceId type=java.lang.String required=true 
description=The service function name. %

utils:includeScript page=/rfw/static/js/AC_OETags.js /  

c:if test=${empty width}
  c:set var=width value=600/c:set
/c:if

c:if test=${empty height}
  c:set var=height value=400/c:set
/c:if
%
WebInfraApplication webConf = WebInfraApplicationFactory.getInstance();
%
script type=text/javascript
baseUrl =  %=webConf.getBase(request)%;
AC_FL_RunContent(
src, baseUrl + /Charts/TreeTableRenderer,
flashVars, 
treeTableServiceId=${treeTableServiceId}reportStateId=${rfw_state_id}presentationModelName=${renderRequest.presentationModel.name}userUniqueKey=${userUniqueKey}baseURL=
 + baseUrl,
width, ${width},
height, ${height},
align, middle,
id, ${treeTableId},
quality, high,
name, Flex TreeTable,
allowScriptAccess,sameDomain
);

/script

The jsp that wrapps it:

%@ taglib prefix=flex tagdir=/WEB-INF/tags/act/flex %
%@ taglib prefix=c uri=/tags/jstl-core %

c:if test=${createNewDocument}
%@ page import=com.mercury.topaz.webinfra.WebInfraApplicationFactory %
%@ page import=com.mercury.topaz.webinfra.WebInfraApplication %
%
WebInfraApplication webConf = WebInfraApplicationFactory.getInstance();
String baseURL = webConf.getBase(request);
%
html
head
BASE HREF=%=baseURL%
/head
body
/c:if

div id=treeContent_${treeTableId} style= 

/div
flex:TreeTable
  treeTableId = ${treeTableId}
  width = ${treeTableWidth}
  height = ${treeTableHeight}
  treeTableServiceId = ${treeTableServiceId}
/

c:if test=${createNewDocument}
/body
/html
/c:if

As you can see the width  height is sent to the flex engin as attributs in 
pixels :((

If I drop the width  height, the swf doesnt generated.

In my flex AdvancedDataGrid i set the width  height to 100%

Where should I set the percentage???

Thanks man



--- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote:

 Yes, you can set the height and width to percentages and the DataGrid will
 expand and shrink with its container.
 
  
 
 Changing  the swf size in the html wrapper will take some javascript.
 
  
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of yossi.baram
 Sent: Monday, May 11, 2009 4:19 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Dynamicaly shrink  expand flex application
 
  
 
 
 
 
 
 
 Hi helper,
 
 Can I set my DataGrid to dynamicaly shrink  expand as the browser changes
 its width?
 The flex engine expect width  height in pixels when building the swf and
 not in %,
 thats what makes the swf static size,
 Can I make the swf to be of percentage size in the page?
 
 Thanks
 
 Jo





[flexcoders] Re: Dynamicaly shrink expand flex application

2009-05-12 Thread yossi.baram
I think the problem is that the AdvancedDataGrid set its columns width to 100px 
by default.
I add my columns dynamically using AdvancedDataGridColumn,
Can I sett some columns to be percentage width and some not?

Thanks 

--- In flexcoders@yahoogroups.com, yossi.baram yossi.ba...@... wrote:

 Thanks for the reply man,
 I'm missing something here,
 I created my Tree as a tag:
 
 %@ tag import=com.mercury.topaz.webinfra.WebInfraApplicationFactory %
 %@ tag import=com.mercury.topaz.webinfra.WebInfraApplication %
 %@ tag description=Display Flex Treetable pageEncoding=UTF-8 %
 %@ taglib prefix=c uri=/tags/jstl-core %
 %@ taglib prefix=fn uri=/functions/jstl %
 %@ taglib prefix=utils tagdir=/WEB-INF/tags/act/utils %
 %@ taglib prefix=actfn uri=/functions/act %
 %@ attribute name=treeTableId type=java.lang.String required=true 
 description=The id of the Treetable. %
 %@ attribute name=width type=java.lang.Integer required=true 
 description=The TreeTable width. %
 %@ attribute name=height type=java.lang.Integer required=true 
 description=The TreeTable height. %
 %@ attribute name=treeTableServiceId type=java.lang.String 
 required=true description=The service function name. %
 
 utils:includeScript page=/rfw/static/js/AC_OETags.js /  
 
 c:if test=${empty width}
   c:set var=width value=600/c:set
 /c:if
 
 c:if test=${empty height}
   c:set var=height value=400/c:set
 /c:if
 %
 WebInfraApplication webConf = WebInfraApplicationFactory.getInstance();
 %
 script type=text/javascript
 baseUrl =  %=webConf.getBase(request)%;
 AC_FL_RunContent(
 src, baseUrl + /Charts/TreeTableRenderer,
 flashVars, 
 treeTableServiceId=${treeTableServiceId}reportStateId=${rfw_state_id}presentationModelName=${renderRequest.presentationModel.name}userUniqueKey=${userUniqueKey}baseURL=
  + baseUrl,
 width, ${width},
 height, ${height},
 align, middle,
 id, ${treeTableId},
 quality, high,
 name, Flex TreeTable,
 allowScriptAccess,sameDomain
 );
 
 /script
 
 The jsp that wrapps it:
 
 %@ taglib prefix=flex tagdir=/WEB-INF/tags/act/flex %
 %@ taglib prefix=c uri=/tags/jstl-core %
 
 c:if test=${createNewDocument}
 %@ page import=com.mercury.topaz.webinfra.WebInfraApplicationFactory %
 %@ page import=com.mercury.topaz.webinfra.WebInfraApplication %
 %
 WebInfraApplication webConf = 
 WebInfraApplicationFactory.getInstance();
 String baseURL = webConf.getBase(request);
 %
 html
 head
 BASE HREF=%=baseURL%
 /head
 body
 /c:if
 
 div id=treeContent_${treeTableId} style= 
 
 /div
 flex:TreeTable
   treeTableId = ${treeTableId}
   width = ${treeTableWidth}
   height = ${treeTableHeight}
   treeTableServiceId = ${treeTableServiceId}
 /
 
 c:if test=${createNewDocument}
 /body
 /html
 /c:if
 
 As you can see the width  height is sent to the flex engin as attributs in 
 pixels :((
 
 If I drop the width  height, the swf doesnt generated.
 
 In my flex AdvancedDataGrid i set the width  height to 100%
 
 Where should I set the percentage???
 
 Thanks man
 
 
 
 --- In flexcoders@yahoogroups.com, Tracy Spratt tracy@ wrote:
 
  Yes, you can set the height and width to percentages and the DataGrid will
  expand and shrink with its container.
  
   
  
  Changing  the swf size in the html wrapper will take some javascript.
  
   
  
  Tracy Spratt,
  
  Lariat Services, development services available
  
_  
  
  From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
  Behalf Of yossi.baram
  Sent: Monday, May 11, 2009 4:19 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Dynamicaly shrink  expand flex application
  
   
  
  
  
  
  
  
  Hi helper,
  
  Can I set my DataGrid to dynamicaly shrink  expand as the browser changes
  its width?
  The flex engine expect width  height in pixels when building the swf and
  not in %,
  thats what makes the swf static size,
  Can I make the swf to be of percentage size in the page?
  
  Thanks
  
  Jo