Make  grid panel scrollabe

hi,
how can i make a grid or even grop panel scrollable so than no matter how many elements it includes it keeps its size fixed,
i tried to enclose the panel in a div tag and set a style property in the html code "overflw:auto"
but it still doesnt work,
any ideas???
regards,
sssnbj

it's a total hack,
it's a total hack,
it's a total hack !
Now that admission is aside, edit the JSP page and put the components inside a <div style="height: ???px; left: ??px; top: ??px; overflow: auto; position: absolute; width: ???px">
/*place your objects here & replace the question marks with your values */
</div>
Then whenever you want to add a component to the page drop it on and then edit the JSP and make sure it's inside the DIV tags.

Similar Messages

  • Nested Grid Panels

    Hello,
    I'm trying to center my website and the only way i though i could do this was to put all my components into some sort of table or something, and since JSC does not support colspans and rowspans, i had to make do with nested Grid Panels. Boy, was i in for a heck of a time.
    After a few hours of fudging i finally got the layout i wanted, in Design Mode that is. When i deployed it to the App Server 8 and viewed it in IE, the final result was not rendered the same as what i had in design mode. For instance, i had a nested grid panel which contained a button and an empty grid panel. The empty grid panel was basically used to offset the button in a certain direction for better placement (if there is a better way, pls tell me!). Anyway when deployed, this was not rendered properly such that the empty grid panel was not included - the button was centered in the parent grid panel rather than offset to the right (the way i wanted it).
    Another thing which didn't work were some of my image components. Some loaded their images correctly and some others did not - they were blank and had a red cross in the corner.
    Is there a known issue with nested grid panels? I had quite a few levels of nests so maybe the browsers did not like this? Thanks a lot.
    Mitch_J.

    Let me try to clarify what you're seeing here.
    The grid panel component is really intended as a -container- component. In particular, at runtime, if the grid panel has zero components as children, it will take up -zero- space. It might render an empty <table> tag, or it might render nothing - I can't remember what's in the component renderer logic. But the end result is the same: You shouldn't use an empty grid panel component as a "spacing" component.
    Why does it work in the designer then, you're asking?
    That's deliberate designtime behavior to make it easier to work with the component. Let's say you want to drop a grid panel compoent, and then put a button or two in it. First you drop the grid panel. Uh oh - if the designer renders it the same way as it will be at runtime, the grid panel will have size 0,0 (or maybe even be invisible) and you (a) don't see it, and (b) can't drop on it in the designer. (As a workaround, you -can- drop on it in the Outline, but still, this is not what users expect at designtime).,
    So, the component designtime renderer will enforce a minium size on the component for the specific case that the component is empty or invisible, forcing a small border on the component, such that it's easily visible and easily a drop target.
    If you want a spacing component, try a Static Text for example, with some space characters in it.
    -- Tor
    http://blogs.sun.com/tor

  • Make a Panel disappear and appear again

    Hi Team
    I have a frame with Grid Layout where I have 3 Panels - P1, P2 and P3. I want that on the click on a button "+" P2 should disappear and P1 and P2 should align together. Again when the user click "-" button, P2 panel should appear again in its place between P1 and P3.
    The problem with the visible(false) method is that it makes P2 Panel disappear but the space between P1 and P3 panels is still there.
    Could anybody help me with this trivial issue
    Thanks,
    Mo

    user13019661 wrote:
    Hi Team
    I have a frame with Grid Layout where I have 3 Panels - P1, P2 and P3. I want that on the click on a button "+" P2 should disappear and P1 and P2 should align together. Again when the user click "-" button, P2 panel should appear again in its place between P1 and P3.
    The problem with the visible(false) method is that it makes P2 Panel disappear but the space between P1 and P3 panels is still there.
    Could anybody help me with this trivial issue
    Thanks,
    MoIn stead of making the panel invisible, remove it from the frame and trigger the frame to layout again (for example by calling pack() or revalidate()).

  • Display a buttons in the footer of a grid panel

    I display images in a grid panel .I want to know how to add components in the footer part of the panel.
    Because when I add them simply by using
    grid.getChildren().add(component);they are added just after the last displayed image.
    I thought to the VerbatimTag element by adding the
    tag but I didn't found which method to use to add the
    tag into the VerbatimTag.
    Thanks in advance for your help.

    Can you please explain to me because I m really knew with JSF.

  • After editing a photo in another program, the photos return to the library at the end of the grid panel instead of at their original loacation.  How do I avoid this or alternatively, is there a quick way of moving them back to their original position inst

    After editing a photo in another program, the photos return to the library at the end of the grid panel instead of at their original loacation.  How do I avoid this or alternatively, is there a quick way of moving them back to their original position instead of clicking and dragging them?

    Sort your photos by File Name or Capture Date
    Use View->Sort

  • How to specify column span for a row in grid panel

    In a grid panel with 4 columns, how to set one of the rows to span all 4 columns?

    I don't think it's possible with the standard JSF component. There are no hooks to get it to emit a rowspan attribute on the <td> it will render for each cell. There is a hook to get it to add a styleclass, but that won't help with colspans and rowspans.
    -- Tor
    http://blogs.sun.com/tor

  • Bulleted List within a Grid Panel

    Hi,
    I'm trying to format an HTML page, using the Grid Panel component to arrange various text and images.
    In one of the text sections I need a bulledted list, but can't seem to find a way to do that, within the Grid Panel.
    I need this page to be a JSP page, as it is going to be dynamic.
    All help/advice would be appreciated.
    Regards
    Haroon

    Hi Haroon,
    Please go through the below jsp code to get a bulleted list in a grid panel
    <h:panelGrid binding="#{Page1.gridPanel1}" id="gridPanel1" style="left: 48px; top: 48px; position: absolute">
                            <ul>
                                <li>One</li>
                                <li>Two</li>
                                <li>Three</li>
                            </ul>
                        </h:panelGrid>Hope this helps
    Cheers
    Giri

  • Make the panel fit the image so MouseListener only invoke when click  image

    I want to add MouseListener to only the image itself. So I draw the image onto a image panel, add that panel onto the main panel, then add the main panel onto the frame. However, my problem is that the size of my image panel is too large, it take up almost the entire frame. So my mouselistener response not only when I click onto the image, but also anywhere in my image panel. I try to resize the image panel to fit the size of my image, but no luck. Is there a solution for this. I feel like, it got something to do with the layout. Here is my code, if you mind read it. Thank you very much
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Font;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.Image;
    import java.awt.Toolkit;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseMotionListener;
    import javax.swing.*;
    public class ImageRotate
         private static final String LABEL = "MIDI PROTOCOL";
         private JPanel mainPanel = new JPanel();
         private JPanel labelPanel = new JPanel();
         public ImageRotate()
              mainPanel.setOpaque(true);
              mainPanel.setBackground(Color.YELLOW);
              mainPanel.setLayout(new BorderLayout());
              Font labelFont = new Font("serif", Font.BOLD, 30);
              createLabelPanel(LABEL, labelFont);
              labelPanel.setOpaque(false);
              mainPanel.add(labelPanel, BorderLayout.NORTH);
              Drawing d = new Drawing();
              d.setOpaque(true);
              d.addMouseListener(new MouseAdapter(){
                   public void mousePressed(MouseEvent e)
                        System.out.println("Pressing on the image");
              d.addMouseMotionListener(new MouseAdapter(){
                   public void mouseDragged(MouseEvent e)
                        System.out.println("Dragging the image");
                   public void mouseMoved(MouseEvent e)
              mainPanel.add(d, BorderLayout.CENTER);
         private void createLabelPanel(String str, Font font)
              JLabel label = new JLabel(str);
              label.setFont(font);
              label.setForeground(Color.RED);
              labelPanel.add(label);
         public JPanel getPanel()
              return mainPanel;
         public static void main(String args[])
              JFrame frame = new JFrame();
              frame.getContentPane().add(new ImageRotate().getPanel());
              frame.setSize(new Dimension(300, 300));
              frame.setVisible(true);
    class Drawing extends JPanel
         Image img;
         public Drawing()
              setSize(new Dimension(100,100));     //Try to make the panel fit the image...NO LUCK
              setBackground(Color.GREEN);     
              img = Toolkit.getDefaultToolkit().createImage("images/nob.gif");
         public void paintComponent(Graphics g)
              super.paintComponent(g);
              Graphics2D g2D = (Graphics2D)g;
              g2D.drawImage(img, 40, 40, this);
    }

    yunaeyes wrote:
    In class Drawing extends JPanel, I did try to to set the panel to the image size but no luck there,
    both setSize(new Dimension(100,100)), setPreferredSize(new Dimension(100,100)) does not make the panel smallerIt can be made to work. I find it hard to comment on unseen code.
    >
    BigDaddyLoveHandles wrote:
    I think a better approach is to handle the mouse click properly -- see if the click is over the image or not.Can you elaborate on this?The mousePressed method you posted assumes you are over the image. Check the mouse coordinates! If the component is bigger than the image this may not be so.

  • Where i can read about make extended panel for Photoshop cc 2014?

    where i can read about make extended panel for Photoshop cc 2014?

    It was experimental in CC first release its now supported in CC 2014 not experimental.
    Support for Windows touch devices
    New in this release of Photoshop CC
    Photoshop CC now supports Windows 8.1 touch devices like the Microsoft Surface Pro, so you can use pinch, zoom, pan, and rotate. 
    In Photoshop, two-finger touch gestures are used to control the location, rotation, and scaling of the Image > Canvas view. Users may alternate between touch view control and other interactions using the mouse or stylus, but touch may not be used simultaneously with other input. Touch control is convenient when painting on large touchscreen monitors, which are difficult to rotate physically, and on tablets to avoid constantly shifting the device.
    For more information, see Touch gestures.

  • How to align content in Grid panels

    Hello,
    I have a grid panel using the following tag <h:panelGrid> . I have only one column and I want the child component inside it, to be placed in the middle of the panel and not on the left part as it is done by default. I can probably use something like "left 50%; position relative" but I really don't like that. Any other ways?
    Thanks in advance,
    Tony

    Replying to myself...
    using a "text-align:center" in h:panelGrid declaration :-).

  • Fragments in Grid Panels

    I've read in other posts that Creator does not handle page fragments in Grid Panels (at lease not well). I've tried everything I can think of to get fragments to work in a Grid in order to avoid using absolute positioning or inconsistently behaving CSS, and have little to no luck doing so.
    I'm also disappointed that Struts Tiles do not work with Creator. I'm really still evaluating this product, and I'm on the verge of going on to another if I can't find a flexible way of handling fragments.
    For example, I have a footer fragment that I want to "float" at the bottom of my content as the last row in a Grid. Alas, I cannot put the footer in a Grid so I'm forced to use absolute positioning or a css class that behaves differently in various browser types. Other than the limited options with fragments I love Creator; however, I may be forced to go with another tool.
    Am I missing something? Is there actually a way to put a fragment into a Grid Panel and see it show up in my design view (and when deployed)?
    Thanks,
    Tom

    Hi Tom,
    not sure you are missing something. IMHO it is NOT working. I have already posted two subjects on the related theme and there is no consistent answer from Creator team.
    Try to use LayoutPanel and put your fragment using CSS at the bottom of this panel.
    Best regards,
    Alex

  • How to make s:Panel middle in Flex4

    When I use <mx:Panel>,I find <mx:Panel> replaced by <s:Panel>.I can make <mx:Panel> middle by using following parameter:
    paddingTop="10"
    paddingLeft="10"
    layout="vertical"
    horizontalAlign="center"
    verticalAlign="middle"
    Then I use <s:Panel>,but I don't know how to make <s:Panel> middle both horizon and vertical. How to do it?
    Thanks.

    Please try:  horizontalCenter="0" in the s:Panel.

  • How can I make GRID view the default view? The icons for view that used to be located in the upper right top of the page near the 'search library' are gone.

    How can I make GRID view the default view? The icons for view that used to be located in the upper right top of the page near the 'search library' are gone.

    99jon wrote:
    Perhaps it’s a design feature to speed up the Organizer launch.
    I am sure it is.
    - The normal use of the Organizer is not the folder view, it's the thumbnail view with an organization based on categories and folder. That way you should forget completely where your pictures are stored. Anyway, the folder view in the Explorer is not a map of the location of the different bits of your file, it's only a logical representation. That's easy to see when you are doing a defragmentation.
    - The folder view is useful even for those using normally the thumbnail view, but that is only for rare cases when you must change the folder organization, for instance moving files to another drive. The folder view is here to prevent you from changing things from the explorer and outside of the Organizer.
    - The new folder list view, which you find 'funny' is there to help better organizing using tags. Its huge advantage is that such a view is created extremely quickly by extracting the last subfolder in the media table : it's the way the database sees the folders, based on its own content,  totally ignoring the complex folder organization of your disk with media files or any unrelated other kind of data. You should use it in many cases, the main purpose being assigning tags when you have assigned descriptive folder names. I had suggested such a solution to prevent the long standing bugs in the folder view of previous versions.
    So yes, the purpose is:
    - to speed up switching modes
    - to help folder organization fans to migrate to tags organization
    - to hopefully get rid of the old folder organization bugs

  • How can I make a Panel's Title Wordwrap?

    Is there a way to make a panel's title be multiline? I've got a panel where the title is dynamic. I don't know how long the title will be. As it works now, the the title occaisionally gets cut-off. Is there a way to wordwrap a panel's title?
    <mx:Panel id="mySchoolPanel" " 
              title="{myTitle}"
             width="230"
             x="710" y="150"
             headerHeight="50" >
    Thank you.
    -Laxmidi

    The layout logic of Panel appears to assume a single line of text in the title, so to get word-wrapping you may need to extend the class. I had a go at it below - will probably need some tweaking:
    package
        import mx.containers.Panel;
        public class WrappingPanel extends Panel
            // Hard coded padding above and below title text. Should be broken-out
            // into a style.
            private static const HEADER_PADDING : int = 6;
            protected override function createChildren():void
                super.createChildren();
                titleTextField.wordWrap = true;
            protected override function getHeaderHeight():Number
                // Set the header height dynamically based on the height of the title
                return titleTextField.measuredHeight + HEADER_PADDING * 2;
            protected override function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
                super.updateDisplayList( unscaledWidth, unscaledHeight );
                // Set the height of the title to fit all text
                titleTextField.height = titleTextField.measuredHeight;
                // Position the title
                titleTextField.y = HEADER_PADDING;

  • Clear Grid Panel

    I'm using panel Grid to display images .And I use buttons to scroll into the list of the images.But in each listener of the buttons I must clear the panel grid to display the images for the associated page.
    Because the last images still displayed despite the fact that I have created a method named
    findAndRemoveComponentInRoot(componentId);
    to remove components by Id.
    And I also have Exception
    Component ID form1:Results:button0 has already been found in the view.
    I also tried with this
    for(int j=0;j<grid.getChildCount();j++){
                grid.getChildren().remove(j);
            }But I still have the exception.
    How can I do please.
    Thanks.

    Hi,
    The components are of various types like display components, input / output components, containers etc. The grid panel is a container. The containers can only hold other components. There is no action even associated with the container components. Also grid panels are not visible components. How do you propose to click on something that is not visible. It would be better if you explained your use case.
    Cheers
    Giri

Maybe you are looking for

  • Adding a new field to Existing data Datasource

    Hello, If  I want to add extra field to the existence Data Source in SAP R/3 how will you do? and how will you extract the data in SAP BW .could you please explain the steps. I would appreciate. Thanks in Advance. Sri

  • Table Headings in Pivot Table

    Hello Experts, is it possible to view Table Headings in Pivot Table Columns? If not is there a work around for this? Thank You Regards

  • Display and driver issues with Windows 7 on i5 MBP

    Hello- I just purchased one of the i5 Macbook Pros, and set out to get Windows 7 working through boot camp. I did this on an older model (32-bit) previously with no problems. This time around, installation of Windows worked fine, but I have had some

  • Printing problems after updat maverick

    After update to maverick mine hp deskjet 3070a ,cannot print wirelessprinting anymore.the AirPrint is not in the list and, bonjour printing is not in the list *** Well Before i update the printer was working allright with wireless connection. No prob

  • Doubt in assessment cycle

    Hi All, I have the following doubt in assessment cycle :- Consider the following scenario. There are three cost centres :- D015, D020 and D025 . An assessment cycle is being created where D015 is the sender  and D020, D025 are the receivers . A cost