Flex 4 Layouts and States

Hi,
I've recently been thinking about how Layouts can use states and wanted to know what you guys think. I noticed that the way a skin's state is changed in Flex 4 (e.g. FxButtonSkin) is by calling invalidateProperties/invalidateSkinState, which leads to the commitProperties method. Then this method says in there:
if (skinStateIsDirty)
skin.currentState = getCurrentSkinState();
skinStateIsDirty = false;
This is awesome. But it also means the names of the states are hardcoded in the FxComponent class (i.e. in the FxButton class you have "disabled", "down"), which means you must name your skin states with those names, but that's not a big issue. What I was thinking, though, is that you could do the same thing with Layouts!
If I'm reading the code right, it looks like all of the layout manipulations are called through the FxContainer and subclasses. In the layout you have a bunch of items you want to manipulate, such as the FxList and it's embedded VerticalLayout and HorizontalLayout. If you could somehow have your FxContainer (e.g. FxList) get ahold of the names of your custom component's states (check out the comment I made on OpenFlux about possible CoverFlowLayout states), then it could "map" layout states to your layout items' states. So for the CoverFlow, if the item is the "selectedIndex" item (the one facing forward), then the FxContainer class could assign that layout state (selectedIndexState) to your component's state (selectedIndexState, where "I want my center coverflow item to now display some buttons or something"). You could do that by adding something like this to the FxContainer class:
if (componentStateIsDirty)
component.currentState = getCurrentLayoutState();
componentStateIsDirty = false;
That would be really, really powerful. The only issue I could see is in matching the names of your CustomLayout states to your Component's state. This could be done in the layout tag of a FxContainer component by adding a "mapToStates" method that accepts an Object/hash to map layout states to component states:
mapToStates((coverFlowSelectedItemState:myImageSelectedState, coverFlowZoomedState:myImageFullViewState, etc...))
This way, you could dynamically change the states of your component whenever they were in a specific position within the layout. This cuts out the need of having to figure out each and every time you create a new component "how" to change the state. The layout should take care of all that for you.
One other thing. If I wanted to change the FxList layout from Horizontal/Vertical to say CoverFlow, it seems like the layouts are hard coded into the Container class, in the list_keyDownHandler method. It seems like a more separated-out option would be to handle all that stuff in the Layout classes. Then for the FxList you could render it in any of an infinite number of ways. OpenFlux does this really well.
If layouts become this robust, the line between Flex and Flare, for example, is going to become really, really thin. Flex will be able to make some really intense data visualizations that automatically change the state of your component whenever it is in a specific state of the layout.
Any thoughts on this? Sorry it's so long.
I wrote more about the CoverFlowLayout idea, as well as how one might rewrite the FlexStore ProductCatalogPanel layout using a pattern like this, it's here: http://groups.google.com/group/openflux/browse_thread/thread/9670ecc48046fc4
Basically, skins go on components, layouts "go on" containers which have components, so the functionality should be similar. While the FxComponent changes the skin's state, the FxContainer changes the component state through the layout's state.
Best,
Lance

You already have a thread open about this. Whether or not it's state related, the jury is out.

Similar Messages

  • Flex 3 to Flex 4 migration issue (Flex charting and Special char)

    Hi All,
    I have migrated Flex 3 to Flex 4 and in Flex charting axis label, I am not able to see less then sign ( < ). I tried to use &lt;  but it's not working, I have attached sample code.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/mx"
                    minWidth="955" minHeight="600" initialize="init()">
         <fx:Declarations>
             <s:SolidColor id="s1" color="#738994"/>
             <mx:SeriesInterpolate id="seriesInterpolate" duration="800"/>
             <mx:SeriesSlide id="seriesSlide" duration="800" direction="up"/>
             <mx:SeriesZoom id="seriesZoom"
                            duration="1000"
                            minimumElementDuration="50"
                            elementOffset="50"
                            verticalFocus="top"
                            horizontalFocus="left"
                            relativeTo="chart"/>
         </fx:Declarations>
         <fx:Script>
            <![CDATA[
                 import mx.collections.ArrayCollection;
                 [Bindable]
                 public var student:ArrayCollection = new ArrayCollection([
                     {Stream: "Management", Girls:1000, Boys:1400, TotalStudent:2400},
                     {Stream: "&lt;Computer Science", Girls:800, Boys:1200, TotalStudent:2000},
                     {Stream: "< Mechanical", Girls:200, Boys:1500, TotalStudent:1700},
                     {Stream: "> Electical", Girls:800, Boys:850, TotalStudent:1650},
                     {Stream: "Electronics", Girls:500, Boys:1000, TotalStudent:1500},
                     {Stream: "Civil", Girls:300, Boys:900, TotalStudent:1200}
                 private function update():void {
                     var str:String = catfDP.selectedItem.data;
                     if(str == "Girls"){
                         cs1.yField = str;
                         cs1.displayName = str;
                         cs1.setStyle("fill" , "738994");
                     }else if(str == "Boys"){
                         cs1.yField = str;
                         cs1.displayName = str;
                         cs1.setStyle("fill" , "999990");
                     }else{
                         cs1.yField = str;
                         cs1.displayName = str;
                         cs1.setStyle("fill" , "406374");
                 private function init():void{
                     catfDP.selectedIndex= 0;
                     effectDP.selectedIndex= 0;
             ]]>
         </fx:Script>
         <s:Panel title="Chart Effect Example" width="627" height="565">
             <s:layout>
                 <s:VerticalLayout/>
             </s:layout>
             <mx:ApplicationControlBar dock="true" width="625" height="82">
                 <mx:Form>
                     <mx:FormItem label="Category Field:">
                         <s:DropDownList id="catfDP" change="update();" prompt="--Select--" width="136"
                                         height="19">
                             <s:dataProvider>
                                 <mx:ArrayList>
                                     <fx:Object data="Girls" label="Girls" />
                                     <fx:Object data="Boys" label="Boys" />
                                     <fx:Object data="TotalStudent" label="TotalStudent" />
                                 </mx:ArrayList>
                             </s:dataProvider>
                         </s:DropDownList>
                     </mx:FormItem>
                     <mx:FormItem label="Choose Chart Effect:">
                         <s:DropDownList id="effectDP" change="update();" width="136" prompt="--Select--">
                             <s:dataProvider>
                                 <mx:ArrayList>
                                     <fx:Object label="seriesInterpolate" data="{seriesInterpolate}" />
                                     <fx:Object label="seriesSlide" data="{seriesSlide}" />
                                     <fx:Object label="seriesZoom" data="{seriesZoom}" />
                                 </mx:ArrayList>
                             </s:dataProvider>
                         </s:DropDownList>
                     </mx:FormItem>
                 </mx:Form>
             </mx:ApplicationControlBar>
             <mx:ColumnChart id="cchart"
                             dataProvider="{student}"
                             showDataTips="true"
                             width="621"
                             fontFamily="verdana" height="402">
                 <mx:verticalAxis>
                     <mx:LinearAxis title="Number of Students" />
                 </mx:verticalAxis>
                 <mx:horizontalAxis>
                     <mx:CategoryAxis dataProvider="{student}"
                                      categoryField="Stream"
                                      title="Stream"/>
                 </mx:horizontalAxis>
                 <mx:series>
                     <mx:ColumnSeries id="cs1"
                                      xField="Stream"
                                      yField="Girls"
                                      displayName="Girls"
                                      fill="{s1}"
                                      showDataEffect="{effectDP.selectedItem.data}"/>
                 </mx:series>
             </mx:ColumnChart>
             <s:HGroup>
                 <mx:Legend dataProvider="{cchart}"
                            direction="horizontal"/>
                 <s:VGroup>
                 </s:VGroup>
             </s:HGroup>
         </s:Panel>
    </s:Application>

    Thank you very much for you answer.
    I have solved this problem using Itemrenderer.
    <?xml version="1.0" encoding="utf-8"?>
    <s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/mx"
                    autoDrawBackground="true">
        <mx:Label htmlText="{data.text}"/>
    </s:ItemRenderer>
    and in chart I have used labelRenderer. in label I have used  &lt; for ( < ) sign.
    <mx:horizontalAxis>
                    <mx:CategoryAxis
                        dataProvider="{expenses}"
                        categoryField="Month"
                        title="FY 2006"
                        id="a1"
                        />
                </mx:horizontalAxis>
                <mx:horizontalAxisRenderers>
                    <mx:AxisRenderer labelRotation="45" axis="{a1}" labelRenderer="chase.BarChartLabelRenderer"/>
                </mx:horizontalAxisRenderers>
                <mx:verticalAxisRenderers>
                    <mx:AxisRenderer labelRotation="45" axis="{a1}" labelRenderer="chase.BarChartLabelRenderer"/>
                </mx:verticalAxisRenderers>

  • DataGridColumn renderer issues after headerShift and state change

    I have an mx:DataGrid component that is exhibiting some odd behavior.  I have defined two states in the containing parent.  I have also defined itemRenderers and text values for each of the DataGridColumns based on the state of the parent container, as follows:
    <s:Panel>
         <s:states>
              <s:State name="state1"/>
              <s:State name="state2"/>
              </s:states>
         <mx:DataGrid id="myGrid" width="100%" height="100%">
              <mx:columns>
                   <mx:DataGridColumn id="dgc1"
                      dataField="value1"
                      headerText="Static Header Text"
                      itemRenderer="com.renderers.StaticRenderer"/>
                   <mx:DataGridColumn id="dgc2"
                      dataField="value2"
                      headerText.state1="DGC2 State1 Header Text"
                     headerText.state2="DGC2 State2 Header Text"
                      itemRenderer.state1="com.renderers.value2.State1Renderer"
                     itemRenderer.state2="com.renderers.value2.State2Renderer"
                     excludeFrom="state1"/>
                   <mx:DataGridColumn id="dgc3"
                      dataField="value3"
                      headerText.state1="DGC3 State1 Header Text"
                     headerText.state2="DGC3 State2 Header Text"
                      itemRenderer.state1="com.renderers.value3.State1Renderer"
                     itemRenderer.state2="com.renderers.value3.State2Renderer"/>
                   <mx:DataGridColumn id="dgc4"
                      dataField="value4"
                      headerText.state1="DGC4 State1 Header Text"
                     headerText.state2="DGC4 State2 Header Text"
                      itemRenderer.state1="com.renderers.value4.State1Renderer"
                     itemRenderer.state2="com.renderers.value4.State2Renderer"
                     excludeFrom="state1"/>
              </mx:columns>
         </mx:DataGrid>
    </s:Panel>
    This all seems to work fine.  As the parent's 'currentState' property changes, the proper columns are included in the layout and the proper text and items are rendered properly.
    The issues seem to come in once the user starts to shuffle the columns around. More specifically when the user is in state2 (which has more columns visible) and begins to mix things up. Once the user re-arranges the columns (by dragging) and THEN tries to start flipping back and forth between states, odd things happen:
    1. columns that should be excluded seem to be visible (at least the header text would lead you to believe this)
    2. empty columns appear (header text value and no item data)
    3. columns header text values dissappear (no header values displayed)
    4. even columns (like dgc1) which have 'static' values are affected by this (blank values, not visible, etc).
    Has anyone experienced this problem, or does anyone have feedback on using this technique to hide/unhide columns in a DataGrid based on a components 'state' property?
    Thanks,
    Muad'Dib

    I have an mx:DataGrid component that is exhibiting some odd behavior.  I have defined two states in the containing parent.  I have also defined itemRenderers and text values for each of the DataGridColumns based on the state of the parent container, as follows:
    <s:Panel>
         <s:states>
              <s:State name="state1"/>
              <s:State name="state2"/>
              </s:states>
         <mx:DataGrid id="myGrid" width="100%" height="100%">
              <mx:columns>
                   <mx:DataGridColumn id="dgc1"
                      dataField="value1"
                      headerText="Static Header Text"
                      itemRenderer="com.renderers.StaticRenderer"/>
                   <mx:DataGridColumn id="dgc2"
                      dataField="value2"
                      headerText.state1="DGC2 State1 Header Text"
                     headerText.state2="DGC2 State2 Header Text"
                      itemRenderer.state1="com.renderers.value2.State1Renderer"
                     itemRenderer.state2="com.renderers.value2.State2Renderer"
                     excludeFrom="state1"/>
                   <mx:DataGridColumn id="dgc3"
                      dataField="value3"
                      headerText.state1="DGC3 State1 Header Text"
                     headerText.state2="DGC3 State2 Header Text"
                      itemRenderer.state1="com.renderers.value3.State1Renderer"
                     itemRenderer.state2="com.renderers.value3.State2Renderer"/>
                   <mx:DataGridColumn id="dgc4"
                      dataField="value4"
                      headerText.state1="DGC4 State1 Header Text"
                     headerText.state2="DGC4 State2 Header Text"
                      itemRenderer.state1="com.renderers.value4.State1Renderer"
                     itemRenderer.state2="com.renderers.value4.State2Renderer"
                     excludeFrom="state1"/>
              </mx:columns>
         </mx:DataGrid>
    </s:Panel>
    This all seems to work fine.  As the parent's 'currentState' property changes, the proper columns are included in the layout and the proper text and items are rendered properly.
    The issues seem to come in once the user starts to shuffle the columns around. More specifically when the user is in state2 (which has more columns visible) and begins to mix things up. Once the user re-arranges the columns (by dragging) and THEN tries to start flipping back and forth between states, odd things happen:
    1. columns that should be excluded seem to be visible (at least the header text would lead you to believe this)
    2. empty columns appear (header text value and no item data)
    3. columns header text values dissappear (no header values displayed)
    4. even columns (like dgc1) which have 'static' values are affected by this (blank values, not visible, etc).
    Has anyone experienced this problem, or does anyone have feedback on using this technique to hide/unhide columns in a DataGrid based on a components 'state' property?
    Thanks,
    Muad'Dib

  • Changing Layout and RFC used in MSS Attendance Overview iview

    Hi There,
    We are using HTMLB based MSS iviews and need to change layout and information on Attendance overview screen. We got required PAR file and i can create a project based on this PAR as well.
    Now i see so many errors due to missing import, even com.sapportals.html* based import statements are indicated as error..
    If i have missed out something during import of this par file, how can i correct it now.
    Thanks a lot for your suggestions.
    Rgds

    thansk Prakash,
    Finally directed them to server files.. and it did the job )
    Rgds
    Edited by: Sudhir on Oct 13, 2008 10:17 AM

  • [svn:fx-trunk] 9225: Fix bug: Rows disappear in Spark List when using negative gap in layout and using virtualization

    Revision: 9225
    Author:   [email protected]
    Date:     2009-08-11 11:36:09 -0700 (Tue, 11 Aug 2009)
    Log Message:
    Fix bug: Rows disappear in Spark List when using negative gap in layout and using virtualization
    Fix: Change H/V layouts first-visible-element lookup logic to accommodate negative gaps.
    QE notes: None
    Doc notes: None
    Bugs: SDK-22497
    Reviewer: Hans
    Tests run: checkintests,
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-22497
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as

    sorka;
    You can check the LabVIEW Support page.
    There is a troubleshooting section called LabVIEW Installation/Getting Started Resources. It also includes a LabVIEW 7.x Frequently Asked Questions that has a link that reads Issues Fixed in LabVIEW 7.1. However, not much information is provided there.
    Other places where you can post your findings is at the LAVA Forum (check the Bug list forum) and the Info-LabVIEW mailing list. These are not official places, but usually they li
    sten
    Enrique
    www.vartortech.com

  • TitleWindow and State View

    I have an application with a titleWindow. On the titleWindow,
    I have a "Yes" and a "No" button. If the user click "Yes" then the
    button will take them to the next state view. If no, then the
    titleWindow is canceled or closed and take the user back to the
    application. I don't know how to pass that "event" in the
    titleWindow to take the user to another state view. I hope this
    make sense to somebody.
    Thank you so much!

    This forum is for Flex Builder questions. This question is
    about Flex itself and should go in the General Discussion forum.
    Post there and I will try to help.
    But for now, see:
    http://www.cflex.net/showfiledetails.cfm?ChannelID=1&Object=File&objectID=558
    Tracy

  • FlexSession and states

    Hello
    I am a new user, so first of all: I am Sara, I'm italian and
    new to flex and actionscript development :)
    I am trying to build an LDAP browser using Flex 3 and JavaEE
    (Tomcat, Java6, BlazeDS).
    My application is composed by two mx:states, a login state
    and an application state accessible only if the user authenticates
    against out LDAP server.
    The authentication part looks good: I create a RemoteObject
    that performs the various lookups in LDAP. Since I need to store
    LDAP environment informations, I create also a FlexSession object
    in which this information is stored.
    Through the Tomcat SessionManager I can verify that the LDAP
    environmnet data are stored correctly.
    At this point, I need to "populate" my main state, the
    authState, if the user is authenticated.
    I want to show to the user some data regarding his LDAP
    entry, for example the principal. Using the same FlexSession class,
    in the login phase I add to the session some other data such as the
    user's principal string. The Tomcat session manager shows me that
    the attribute "principal" is not null, but the flex client does not
    retrieve this string.
    While debugging I notice that the method by which the client
    should retrieve the string is not called. The flex client correctly
    calls the login() method but not the getPrincipal() method. If I
    try to call it directly from actionscript, for example
    [Bindable]
    public var princ:String = "EMPTY";
    public function doLogin():void
    if (session.login(txUsername.text, txPassword.text)){
    princ = session.getPrincipal().lastResult as String;
    lbWelcome.text = "Welcome, " + princ;
    the client throws an exception because session.getPrincipal()
    returns a null object, BUT the attribute "principal" is populated
    in the session.login() method (and exists in the tomcat session).
    My doubt is: is FlexSession bound to a specific mx:state?
    Should I retrieve the existing session in an other RemoteObject,
    and then try to call attributes in the retrieved session? And how?
    Thanks in advance
    Sara

    You have to write these statements in result hanlder. Coz, here you have just sent a request to server and in the next statement you are checking the result. At that time you will not get any result, actually some time will be spent to comeback from server.
    princ = session.getPrincipal().lastResult as String;
    lbWelcome.text = "Welcome, " + princ;
    So handle everything in coll back.
    <mx:RemoteObject id="Server" destination="ServerDestination" fault="faultHandler(event)">
        <mx:method name="getPrincipal" result="getPrincipalHandler(event)"/>
    </mx:RemoteObject>
    private function getPrincipalHandler(event:ResultEvent):void
        princ = event.result as String;
    Try this, and let me know your results or concerns...

  • I am connected to a time capsule both wirelessly and through ethernet...and state of the time capsule is solid green...the internet however doesn't work...The internet works fine when directly connected to my macbook pro but it won't work through the tc

    I have deleted time machine preferences...restarted the modem a bunch of times, restored time capsule to it's original settings...after I first set it up in Airport Ulitity its shows a page quickly that states there is a internet problem, but the page quickly goes away before I can read what it says exaclty and states the internet connection problem is resolved...
    However it's not resolved, I'm also having trouble doing a back up to my time capsule...I recently purchased a new macbook and retrieved/restore what was on the time capsule to the new computer...that worked fine...wireless worked fine...however when I tried to back up the new macbook...it would faii stating that there isn't enough room on the TC to do a back up...
    I didn't end up keeping the new macbook, I was just using it/trying it out while my current macbook pro was being repaired (logic board)
    Ever since I got my current macbook back from repair...my backups have failed due to their not being enough space to perform the back up...in the past the back ups would happen and old back ups would be replaced...
    I think this has to do with my current computer having a new name after the repair..."Adam's macbook pro 2" vs "Adam's macbook pro"
    The internet was working fine wirelessly through the TC a day ago, but it wasn't allowing my other laptop that was connected via ethernet access to the internet...I had a self assigned IP address error then...I don't have that problem now, but it's not transmitting internet at all...even though it's in a solid green state.
    I have no problem completely wiping out my TC including the previous back ups on it...just don't know how to go about it...I have restored it to factory settings a bunch of times and created the network from scratch...just hasn't fixed the issue
    Is there more prefences files I should delete

    If the modem is also a router, either use the modem in bridge and run pppoe client on the TC.. that is assuming ADSL or similar eg vdsl. If it is cable service.. and the modem is a router, then bridge the TC.. go to internet page and select connect by ethernet and below that set connection sharing to bridge.
    Please tell us more about the modem if the above gives you issues.

  • Implicit vs explicit close of resultsets and statements?

    Hi friends.I am a newbie Java Developer..Okay Here goes
    I have just made a LAN based Java application using Swing,JDBC with backend as MS-Access..The backend is on a shared network drive..
    The application is distributed as jar files on the LAN PCs..
    Everywhere I have connected to the database I have just closed the connection explicitly like this
    con.close();
    I do not close the associated resultset and statement explicitly
    The specification says associated statements and resultsets close when you close
    the connection,even if you don't explicitly close them
    Also I am not using connection pool..its simple basic connection using DriverManager
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String url = "jdbcdbcSN name";
    String user = "";
    String pw = "";
    con = DriverManager.getConnection(url, user, pw);
    Statement stmt = con.createStatement();
    String select = "" ;
    ResultSet rows = stmt.executeQuery(select);
    On the net everyone says to explicitly close everything..but I did not know that
    earlier..
    If specification says everything closes on
    closing connection why do ppl insist on closing everything explicitly..?
    Or is this driver dependent..don't the drivers go through the specification..
    My driver is the Sun JDBC ODBC bridge.....
    I found this method DriverManager.setLogwriter()
    It prints out a trace of all JDBC operations..
    So I ran a sample program with this method included...
    I redirected output to a log file..
    In that program I just explicitly close the connection without closing the
    statements and resultsets explicitly...
    After running the program and seeing the log I saw that the statements
    and resultsets are closed implicitly If I just close the connection explicitly..
    I am putting the log file and the code..
    Have a look at the end of the log file..
    Code
    import java.sql.;
    import java.io.;
    class gc4test
    public static void main(String args[])
    Connection con = null;
    try
    FileWriter fwTrace = new FileWriter("c:\\log.txt");
    PrintWriter pwTrace= new PrintWriter(fwTrace);
    DriverManager.setLogWriter(pwTrace);
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String url = "jdbc:odbc:pravahcon";
    String user = "admin";
    String pw = "ash123";
    con = DriverManager.getConnection(url, user, pw);
    Statement stmt = con.createStatement();
    Statement stmt1 = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
    Statement stmt2 = con.createStatement();
    Statement stmt3 = con.createStatement();
    Statement stmt4 = con.createStatement();
    Statement stmt5 = con.createStatement();
    Statement stmt6 = con.createStatement();
    Statement stmt7 = con.createStatement();
    String select = "SELECT * FROM Users" ;
    ResultSet rows = stmt.executeQuery(select);
    ResultSet rows1 = stmt1.executeQuery(select);
    while(rows.next())
    con.close();
    catch (ClassNotFoundException f)
    System.out.println(f.getMessage());
    System.exit(0);
    catch (SQLException g)
    System.out.println(g.getMessage());
    System.exit(0);
    catch (Exception e)
    System.out.println(e.getMessage());
    System.exit(0);
    End of Log File
    Setting statement option (SQLSetStmtAttr), hStmt=50275112, fOption=25
    Fetching (SQLFetch), hStmt=50274224
    Fetching (SQLFetch), hStmt=50274224
    Fetching (SQLFetch), hStmt=50274224
    Fetching (SQLFetch), hStmt=50274224
    Fetching (SQLFetch), hStmt=50274224
    Fetching (SQLFetch), hStmt=50274224
    Fetching (SQLFetch), hStmt=50274224
    Fetching (SQLFetch), hStmt=50274224
    Fetching (SQLFetch), hStmt=50274224
    Fetching (SQLFetch), hStmt=50274224
    Fetching (SQLFetch), hStmt=50274224
    Fetching (SQLFetch), hStmt=50274224
    Fetching (SQLFetch), hStmt=50274224
    Fetching (SQLFetch), hStmt=50274224
    Fetching (SQLFetch), hStmt=50274224
    Fetching (SQLFetch), hStmt=50274224
    Fetching (SQLFetch), hStmt=50274224
    Fetching (SQLFetch), hStmt=50274224
    Fetching (SQLFetch), hStmt=50274224
    Fetching (SQLFetch), hStmt=50274224
    End of result set (SQL_NO_DATA)
    *Connection.close
    8 Statement(s) to close
    *Statement.close
    Free statement (SQLFreeStmt), hStmt=50281544, fOption=1
    deregistering Statement sun.jdbc.odbc.JdbcOdbcStatement@2e7263
    *Statement.close
    Free statement (SQLFreeStmt), hStmt=50277224, fOption=1
    deregistering Statement sun.jdbc.odbc.JdbcOdbcStatement@1bf216a
    *Statement.close
    *ResultSet.close
    *ResultSet has been closed
    Free statement (SQLFreeStmt), hStmt=50274224, fOption=1
    deregistering Statement sun.jdbc.odbc.JdbcOdbcStatement@156ee8e
    *Statement.close
    Free statement (SQLFreeStmt), hStmt=50280464, fOption=1
    deregistering Statement sun.jdbc.odbc.JdbcOdbcStatement@c20e24
    *Statement.close
    Free statement (SQLFreeStmt), hStmt=50278304, fOption=1
    deregistering Statement sun.jdbc.odbc.JdbcOdbcStatement@12ac982
    *Statement.close
    *ResultSet.close
    *ResultSet has been closed
    Free statement (SQLFreeStmt), hStmt=50275112, fOption=1
    deregistering Statement sun.jdbc.odbc.JdbcOdbcStatement@e0e1c6
    *Statement.close
    Free statement (SQLFreeStmt), hStmt=50276144, fOption=1
    deregistering Statement sun.jdbc.odbc.JdbcOdbcStatement@6ca1c
    *Statement.close
    Free statement (SQLFreeStmt), hStmt=50279384, fOption=1
    deregistering Statement sun.jdbc.odbc.JdbcOdbcStatement@1389e4
    Disconnecting (SQLDisconnect), hDbc=50271048
    Closing connection (SQLFreeConnect), hDbc=50271048
    Closing environment (SQLFreeEnv), hEnv=50270880
    So like what these implicitly closed statements and resultsets are different from explicitly closed
    resultsets and statements..?

    Please do not crosspost/doublepost the same question again. It is rude in terms of netiquette.
    Stick to one topic: [http://forums.sun.com/thread.jspa?threadID=5393387&messageID=10745794#10745794].

  • Closing resultset and statements

    Hi!
    I just got told that I do not need to close my resultsets and statements in the code, it it enough that the connection are closed. Is this correct?
    Eg:
    public method myMethod() {
    ResultSet rs = null;
    Statement sqlStmt = null;
    try {
    query = "SELECT something";
    rs = sqlStmt.executeQuery(query);
    if (rs.next())
    do something...
    // close rs
    if (rs != null) {
    rs.close();
    rs = null;
    sqlStmt.close();
    sqlStmt = null;
    } // end try
    catch (errors)...
    finally {
    if (con != null) {                   <-- Is this line enough to close everything and release connections?
    try {
    con.close();
    catch (exception)...
    } // end finally

    No, you have to explicitly close the resultset, statement, and connection in order to release resources allocated to each of them. Closing the connection will only relase the connection, not the resultset, and statement.
    you could do all of it in the finally as follows:
    finally {
         try {
              if (rs != null) {
                   rs.close();
              if (stmt != null) {
                   stmt.close();
              if (conn != null) {
                   conn.close();
         } catch (Exception e) {}
    also there is no need to set rs = null, stmt = null after the close()

  • Difference between null layout and absolutelayout

    hello
    I would like to know the difference between the null layout and the absolutelayout
    thank you in advance

    http://www.google.com/search?q=absolutelayout
    Next time, please use the search yourself.Do I have to consider this as answer Yes.
    notice that I asked for the difference between both
    of the layout and not about
    absolutelayout only Third link, advertised by
    "I think AbsoluteLayout does more than just setting Layout to null. AbsoluteLayout may even accomodate for changes in font sizes etc. ..."
    already should give you something to think about.
    Furthermore, the search shows that there are several different classes named AbsoluteLayout (ADF, SWT, BUI, samskivert...), and you didn't specify which one you're talking about.
    Still think this wasn't an answer?
    I guess I should stop assuming that you have a brain of your own.

  • Can I mix Pages page layout and word processing together in one document?

    Hello there ! I am quite new to Pages and I am desperate to learn as i want to get rid of everything being Microsoft
    As you all know when you open Pages you can choose between page layout and word processing !
    the thing is i thought that after using a page layout you could just go with word processing easily... well no, you can't, but i'm sure i'm missing something...
    For exemple i really like the catalogue brochure and it would be perfect for me to start a project... but after a few pages, i can just add blank pages and if i want to type text, i have to add text boxes... i don't want that, I want word processing... and another thing in this brochure i can't add table of content because it is not by default in the template...
    So my question is quite basic here, can we link Page layout and word processing without having to use text boxes and everything ?
    Thanks in advance !
    Have a good day

    Alexander,
    Welcome to Apple discussions.
    The simple answer is no. What differentiates page layout from word processing mode is that the PL mode has no text layer. So everything that goes on the page must be an object of some kind. And any pages you add to a PL document must also be PL. You can't mix the two modes. One way around it is to start with a blank page, insert a text box, then stretch the box so that it covers the entire page. You can the type in it as if it were a text layer in a WP file. You can even capture that page so that you can add it automatically when you need it, or save it as a template.
    As for building a Table of Contents, it appears that Pages only sees text styles that are on the text layer, which means it won't see styles that are in objects -- which means it won't work with a PL document. From being a long-time reader of this discussion group, I've noticed it's rare that someone wants to add a ToC to a PL document.
    If you find that you're going to be mixing text and graphics, start with a word processing template. If you really like the Catalog Brochure, you could always copy some or all of its elements over to a blank WP template.
    Hope this helps.
    -Dennis

  • I finally got my iphone out of recovery mode, after 7.1.1 but now it won't accept my Icloud info and states "An error occrured while trying to save the Icloud account?" What do I do????

    I tried updating my iphone 4 to 7.1.1 and it went straight into recovery mode.... I finally got my iphone out of recovery mode, but now it won't accept my Icloud info and states "An error occrured while trying to save the Icloud account?" What do I do????

    Same situation. I installed iOS 8 beta 4 on my iPhone 5 and a few days later my iCloud account disappeared. My contacts and calendar entries are gone.
    My Mac Mini and MacBook do sync as they should with iCloud.
    When I try to log in to iCloud on the iPhone (the username shows "[email protected]" and password shows "required"), I put in my username and password and tap "Sign In", It says "Verifying" at the top and after a while checkmarks appear next to my username and password. Then I get an error message saying "An error occurred while trying to save the iCloud account". If I tap OK the message goes away, leaving my username and password intact (checkmarks are now gone). If I tap "Sign In" again I get a message saying " '[email protected]' is Already Added. This iCloud account has already been added to your iPhone". If I go back to Settings and then go into iCloud again it's not set up and appears as I stated at the beginning of this paragraph.
    Nothing works and the sync does not occur. Contacts are empty and Calendar has no entries.

  • Can you help me with Page Layout and/or Design ideas for a software manual?

    Greetings,
    I am a new InDesign user, and am converting a software manual that I created in MS Word into InDesign. It will be converted to a pdf to view online. I have the basics (3 master pages, page numbers, running headers, 2column pages with text boxes on the left and screenshots on the right), but I want to make it look prettier. Could you please give me some ideas on page layout and/or design to make it look better or more creative?
    A few things that I am considering: borders around screenshots, a watermark, a logo next to the page numbers, different size/type of fonts, etc.
    I am open to any suggestions to make this look better. However, please understand that I am new to InDesign. With that being said, please tell me a few steps when you mention your tips. Thank you!

    Take a look at a few websites on Cannons of Page Construction.
    I think the best idea for you is to look at a few software manuals and take tips from how they accomplished the layouts.
    I'm not saying to copy them - but rather see what works and doesn't work, what worked for them might not necessarily work for you - research some layouts.
    Fonts/type/sizes etc. are pretty much ambigious without context - is this a software manual for kids (soft cuddly big fonts easy to read), technical (small, tight spacing etc), Adult friendly (smooth, crisp clear, well spaced), elderly (large elegant fonts).
    It all really depends on your demographic audience.
    Being new to InDesign I suggest you take up Sandy Cohens Quickstart Visual Guide.
    I think you should look at Michael Murphys Book on Styles
    And you should definitely get your printer (the guys bulk printing) the booklet for you on board from the start to work out optimal sizes to suit their printing presses and workflow etc. And to ensure that you are setup correctly in page sizes, margins, safe type areas, colour profiles and a few other things that your printers prepress can help you with.

  • Retrieve city and state from zip code that is entered by user

    I am trying to use AJAX to retrieve city and state from a table based on a zip code that is entered by the user. Two are text fields (zip code and city) and one is a SELECT field (state).
    1. I defined an application item called TEMPORARY_APPLICATION_ITEM.
    2. I defined an application process called SET_CITY_STATE as follows:
        a. Process point: on demand
        b. type: anonymous block
        c. process text:
    <pre>
    DECLARE
    v_city VARCHAR2 (100);
    v_state VARCHAR2 (2);
    CURSOR cur_c
    IS
    SELECT city, state
    FROM ZIP
    WHERE zip = v ('TEMPORARY_APPLICATION_ITEM');
    BEGIN
    FOR c IN cur_c
    LOOP
    v_city := c.city;
    v_state := c.state;
    END LOOP;
    apex_util.set_session_state('P2_CO_CITY',v_city);
    apex_util.set_session_state('P2_CO_STATE',v_state);
    EXCEPTION
    WHEN OTHERS
    THEN
    apex_util.set_session_state('P2_CITY','Unknown city');
    apex_util.set_session_state('P2_STATE',null);
    END;
    </pre>
    3. Javascript is defined in the region header:
    <pre>
    <script language="JavaScript" type="text/javascript">
    <!--
    function pull_city_state(pValue){
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
    'APPLICATION_PROCESS=Set_City_State',0);
    if(pValue){
    get.add('TEMPORARY_APPLICATION_ITEM',pValue)
    }else{
    get.add('TEMPORARY_APPLICATION_ITEM','null')
    gReturn = get.get('XML');
    get = null;
    //-->
    </script>
    </pre>
    4. In the HTML Form Element Attributes of the P2_CO_ZIP text item: onchange="pull_city_state(this.value)";
    The city and state are not being populated. I checked the select statement and it is retreiving the city and state in SQL WORKSHOP > SQL COMMANDS.
    I would like to use it for the mailing address as well, so I would need to make the application process / javascript a bit more generic to be used in two places.
    I placed the application on apex.oracle.com:
    Workspace: RGWORK
    Application: Online Certification Application (28022)
    Can someone assists, please.
    Thank you,
    Robert
    Edited by: sect55 on Jun 2, 2009 4:11 PM

    Hi Robert,
    Try using XML instead of session state -
    Change the application on demand process with the following script -
    >
    DECLARE
    v_city VARCHAR2 (100);
    v_state VARCHAR2 (2);
    CURSOR cur_c
    IS
    SELECT city, state
    FROM ZIP
    WHERE zip = v ('TEMPORARY_APPLICATION_ITEM');
    BEGIN
    FOR c IN cur_c
    LOOP
    v_city := c.city;
    v_state := c.state;
    END LOOP;
    OWA_UTIL.mime_header ('text/xml', FALSE);
    HTP.p ('Cache-Control: no-cache');
    HTP.p ('Pragma: no-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ('<body>');
    HTP.prn ('<desc>this xml genericly sets multiple items</desc>');
    HTP.prn ('<item id="P2_CO_CITY">' || v_city || '</item>');
    HTP.prn ('<item id="P2_CO_STATE">' || v_state || '</item>');
    HTP.prn ('</body>');
    EXCEPTION
    WHEN OTHERS
    THEN
    OWA_UTIL.mime_header ('text/xml', FALSE);
    HTP.p ('Cache-Control: no-cache');
    HTP.p ('Pragma: no-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ('<body>');
    HTP.prn ('<desc>this xml genericly sets multiple items</desc>');
    HTP.prn ('<item id="P2_CITY">' || 'Unknown city' || '</item>');
    HTP.prn ('<item id="P2_STATE">' || '' || '</item>');
    HTP.prn ('</body>');
    END;
    >
    in your javascript make sure you typing the application process name correctly as it is case sensitive.
    Hope this helps,
    Regards,
    M Tajuddin
    web: http://tajuddin.whitepagesbd.com

Maybe you are looking for

  • Error while installing Oracle Apps server 10.1.3 with Oracle DB 11.2.0.2

    Error while installing Oracle Apps server 10.1.3 with Oracle DB 11.2.0.2 residing in the same server and being used by Apps server as it's metadata. bash-3.00$ export ORACLE_HOME=/data/ora11g/app/ora11g/product/11.2.0 bash-3.00$ cd /data/OAS/install/

  • CVS in JDeveloper

    I have CVS set up in JDeveloper. In JDeveloper, when I select a file that is already in CVS, the only Source Control options it gives my are: Update and Commit. The CVS command I need is Edit. How do I lock or edit individual files? Thanks Travis

  • Where do I find my downloads on iPad air?

    I'm having trouble locating where my downloads are. I purchased 1Password4 and it was downloaded to my Dropbox as a zip file, but I can't locate where it has been downloaded to?

  • Switch recommendation, to add more wired ports to network

    I have a home network that goes from a broad band modem to an Apple AirPort Extreme.  I use the wireless for our iPhones and iPads.  However, ive wired the house so that my computers, NAS, and Apple TV are all wired.  It works great -Time machine is

  • Continue run MDX Query

    I want to execute a query which can continue run till 2 minutes . For Example- If I run below query, that should be run for 2 minutes with completion or Fail SELECT [Date].[Calendar Year].FirstChild on 0 FROM [Adventure Works]; Please Help -Ashish