on 09-21-2004 4:53 PM
Hi all,
does WD suppy a method where I can get the width of the visible area of the browser frame? Like the JavaScript property Window.innerWidth?
Best regards,
Christian
Hi Christian
I was just curious why you would want want to find the browser width . The width of UI elements also take in percentages by putting a % at the end of the value
Regards
Pran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pran,
we're using percentage width in the most cases. Actually we want to use it everywhere of cause.
But we have a very strange behaviour. When we use a scrollcontainer with percentual width and therein we have a table with a width eg. of approx. 4000px the width of the window gets 4000px!! This doesn't happen if the scrollcontainer has a fixed width.
Best regards,
Christian
No.
1. There are no methods defined in public API
3. It is not implemented even in core classes (as of SP6 / SSR)
Sample code:
import com.sap.tc.webdynpro.services.session.IWindow;
import com.sap.tc.webdynpro.services.session.api.WDCssSize;
import com.sap.tc.webdynpro.services.task.TaskBinder;
...
private static String val(final WDCssSize size)
{
if ( WDCssSize.UNDEFINED.equals( size ) )
return "<null>";
else
return size.toString();
}
private void test()
{
final IWindow wndMain = TaskBinder.getCurrentTask().getApplicationWindow();
final WDCssSize top = wndMain.getWindowPositionTop();
final WDCssSize left = wndMain.getWindowPositionLeft();
final WDCssSize height = wndMain.getWindowHeight();
final WDCssSize width = wndMain.getWindowWidth();
wdComponentAPI.getMessageManager().reportSuccess
(
"Rect: " +
"x1 = " + val(left) + ", " +
"y1 = " + val(top) + ", " +
"w = " + val(width) + ", " +
"h = " + val(height)
);
}
Embedd test() call in any component and you will see <b>null</b> both for <i>width(w)</i> and <i>height(h)</i>
Good luck
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.