gwt flowpanel automatically show the bottm of the panel not the top - gwt

I have couple FlowPanels related like pages in a book, when i click the 'next' button it will go to the next page, which is flowPanel too. on one of the page, it have lots of widgets, from previous page to this page, it always goes to the bottom of the page not the top. how can i make it show the top of the page instead? thanks.

If you mean scrolling to the top of the browser window, take a look at Window.scrollTo()

Related

Timeline & iFrame

Can anybody guide about how
does the new FB timeline incorporate the iframe for its pages.
Or is there any new stuffs coming in to replace these stufs?
The way you create and display your iFrame will be the same, except for a size change.
The new iFrame will be 810px wide, instead of 520px - existing tabs (apps) that are set to 520px will just be centered on the page, so they aren't "broken." Giving us 290 extra pixels is great!
You can no longer set a tab as "default landing page". Instead, users always see the main Timeline view and have to actively click through to custom apps.
To edit which apps you display, click the drop-down icon to the right of the tiles, click the ‘+’ button to import your custom apps, and then hover over them and click the pencil to swap them around.
If you have a contest or something on a tab which you would have wanted set as the "default landing page", you can create a post on your page which has a few sentences advertising such, with a link to the tab. You can then "pin" this post to the top of your page, so it will be the first thing users read. "Pinning" and "starring" on your Page act exactly like they do on your personal timeline.
Here's a good explanation of all changes

Show popup/window in a gwt tab

Is it possible to show a popup only in a certain gwt tab or a panel in that tab?
I've found methods to show a popups over the whole page, but not only in specific tabs.
When you switch the gwt tab, the popup should not be visible anymore and new popups should be able to be created, which again are only visible in the switched to gwt tab. Switching back to the other tab should then show the first popup again.
Optionally the rest of the tab, which is not covered by the popup, should not be clickable.
Are there any native methods for this? The gwt Popup Panel only seems to create popups for the whole page.
Edit: I've tried using smartgwts Window which seems to work just the way I want it to. When I switch the gwt-tab, the popup is no longer visible and returns when I switch back. The only problem is, that it isn't displayed right. The frame is placed on the far left side of the browser tab, while the content is displayed on the far left of the gwt-tab. If I move the content, the frame moves too. The frame is visible over the whole browser tab, while the content disappears if I drag it over the gwt-tab edge.
I guess it's because I'm adding a Window to a gwt-Panel. Is there any way to fix this without changing everything to smartgwt?
Not exactly, I think.
But, you can do something in the tab events, like hide the popup in tabs that it doesnt belongs. To avoid the lag of show/hide the popup, you can do this in the BeforeSelectionHandler, like this:
getView().getTabPanel().addBeforeSelectionHandler(new BeforeSelectionHandler<Integer>()
{
#Override
public void onBeforeSelection(BeforeSelectionEvent<Integer> event)
{
showPopupupsForTab(event.getItem());
}
});
In showPopupupsForTab you can show the popups for this tab (you can handle this with a map or something) and hide the others...
Something like this.
Hope it helps.

How to achieve slideToggle effect similar to facebook "New Stories" button with jQuery?

As you may know not long time ago facebook added several new features. One of them was a "New Stories" button which when clicked expands (with what I guess is a slideToggle effect) and shows new stories.
Here is the button I am talking about:
I would like to know How to achieve same slide / toggle effect and fade in effect that comes in after this button is clicked, with a help of jQuery.
I tried searching for this on internet, but all effects I found were regular slideToggle effects, I mean they started showing div from top and slided down to it's bottom (here is what I mean by regular content http://jsfiddle.net/TwxB4/), where as one facebook uses starts from the bottom of the hidden div and sort of slides to the top of it. (You will see what I mean if you check it on facebook).
Edit: I am only looking for a slideToggle effect and nothing else, I want to be abble to expand and shrink hidden div when user clicks on the link that lunches the effect.
Edit: Here is an illustration of the effect I'm looking for:
This example works the way you described, showing bottom content first:
http://jsfiddle.net/SBLNn/16/
Also full screen view here:
http://jsfiddle.net/SBLNn/16/embedded/result/
They may also do it by having the overflow of the feed hidden, and then setting a negative margin on the inner feed wrapper, then when you click they just animate that negative margin down to 0.
Does this works for you
http://jsfiddle.net/wb7h6/1/
updated version
http://jsfiddle.net/wb7h6/9/ I hope this is what you need
You want slideToggle() I think. See this jsFiddle.

Scrolling issues with Facebook Requests dialog

I am trying to call new Requests Dialog from an iframe facebook application by clicking a button located at the bottom of a page (you need to scroll to get there).
This is what happens when you click the button:
Temporary dialog with a progress bar is displayed in the middle of visible screen
Page is getting automatically scrolled to the top
Actual dialog appears in place of that temp loading dialog at the bottom of the page, so it is not visible
Is there a way to make it either not scroll to the top automatically or at least display the final dialog at the top as well so it can be seen?
it's a bug: http://bugs.developers.facebook.net/show_bug.cgi?id=15440

Coda Slider Tab Navigation

I am using Coda-Slider for my website and I want to know if there is a way to change the content of each tab. For example, the user navigates onto tab2 where I placed a link to redirect the user to another page. Is there a way NOT to navigate away from the page nor the tab but instead load the link inside the tab? I was thinking it would look something like a modal box that would stay inside the tab instead of popping up.
see 19. Coda-Slider Sliding Tabs or you might want to try 35. JQuery IDTabs if you want the effect to be non-intrusive