SAPUI5 Panels - Controlling position of content
up vote
0
down vote
favorite
I have a number of Panels which, when expanded, show the corresponding questions for that particular 'Category'
The issue I have is, say for example I answer the questions for the 1st panel, the content will scroll down, eventually hiding the panel... fair enough.
However, when I click on the Next Category (Production Area), I need to the page to scroll back up to the first question in the Category, or maybe even just display the selected category at the top of the page.
Is this possible?
Currently, the user has to continually scroll back if when they select the next Category.
scroll sapui5 panel onfocus
add a comment |
up vote
0
down vote
favorite
I have a number of Panels which, when expanded, show the corresponding questions for that particular 'Category'
The issue I have is, say for example I answer the questions for the 1st panel, the content will scroll down, eventually hiding the panel... fair enough.
However, when I click on the Next Category (Production Area), I need to the page to scroll back up to the first question in the Category, or maybe even just display the selected category at the top of the page.
Is this possible?
Currently, the user has to continually scroll back if when they select the next Category.
scroll sapui5 panel onfocus
I don't think there is any "ui5-out-of-the-box" solution for your problem, but I guess you can use css-anchors. React to the open-event of the panel and navigate to the corresponding anchor of the panel.
– luuksen
Nov 5 at 14:57
You could try to use the wizardstep control. This provides the posibility to go to the next and previous step if i'm correct. And it scrolls to the position of that step. sapui5.hana.ondemand.com/#/api/sap.m.WizardStep
– Joey De Laat
Nov 5 at 14:59
css anchors sounds good. Could you provide an example?
– Adam Harkus
Nov 5 at 16:28
try this: set fokus to first column when any column is clicked, since the fokus is set on the very top the screen should also scroll there on its own
– Erch
Nov 6 at 6:29
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a number of Panels which, when expanded, show the corresponding questions for that particular 'Category'
The issue I have is, say for example I answer the questions for the 1st panel, the content will scroll down, eventually hiding the panel... fair enough.
However, when I click on the Next Category (Production Area), I need to the page to scroll back up to the first question in the Category, or maybe even just display the selected category at the top of the page.
Is this possible?
Currently, the user has to continually scroll back if when they select the next Category.
scroll sapui5 panel onfocus
I have a number of Panels which, when expanded, show the corresponding questions for that particular 'Category'
The issue I have is, say for example I answer the questions for the 1st panel, the content will scroll down, eventually hiding the panel... fair enough.
However, when I click on the Next Category (Production Area), I need to the page to scroll back up to the first question in the Category, or maybe even just display the selected category at the top of the page.
Is this possible?
Currently, the user has to continually scroll back if when they select the next Category.
scroll sapui5 panel onfocus
scroll sapui5 panel onfocus
asked Nov 5 at 13:16
Adam Harkus
276320
276320
I don't think there is any "ui5-out-of-the-box" solution for your problem, but I guess you can use css-anchors. React to the open-event of the panel and navigate to the corresponding anchor of the panel.
– luuksen
Nov 5 at 14:57
You could try to use the wizardstep control. This provides the posibility to go to the next and previous step if i'm correct. And it scrolls to the position of that step. sapui5.hana.ondemand.com/#/api/sap.m.WizardStep
– Joey De Laat
Nov 5 at 14:59
css anchors sounds good. Could you provide an example?
– Adam Harkus
Nov 5 at 16:28
try this: set fokus to first column when any column is clicked, since the fokus is set on the very top the screen should also scroll there on its own
– Erch
Nov 6 at 6:29
add a comment |
I don't think there is any "ui5-out-of-the-box" solution for your problem, but I guess you can use css-anchors. React to the open-event of the panel and navigate to the corresponding anchor of the panel.
– luuksen
Nov 5 at 14:57
You could try to use the wizardstep control. This provides the posibility to go to the next and previous step if i'm correct. And it scrolls to the position of that step. sapui5.hana.ondemand.com/#/api/sap.m.WizardStep
– Joey De Laat
Nov 5 at 14:59
css anchors sounds good. Could you provide an example?
– Adam Harkus
Nov 5 at 16:28
try this: set fokus to first column when any column is clicked, since the fokus is set on the very top the screen should also scroll there on its own
– Erch
Nov 6 at 6:29
I don't think there is any "ui5-out-of-the-box" solution for your problem, but I guess you can use css-anchors. React to the open-event of the panel and navigate to the corresponding anchor of the panel.
– luuksen
Nov 5 at 14:57
I don't think there is any "ui5-out-of-the-box" solution for your problem, but I guess you can use css-anchors. React to the open-event of the panel and navigate to the corresponding anchor of the panel.
– luuksen
Nov 5 at 14:57
You could try to use the wizardstep control. This provides the posibility to go to the next and previous step if i'm correct. And it scrolls to the position of that step. sapui5.hana.ondemand.com/#/api/sap.m.WizardStep
– Joey De Laat
Nov 5 at 14:59
You could try to use the wizardstep control. This provides the posibility to go to the next and previous step if i'm correct. And it scrolls to the position of that step. sapui5.hana.ondemand.com/#/api/sap.m.WizardStep
– Joey De Laat
Nov 5 at 14:59
css anchors sounds good. Could you provide an example?
– Adam Harkus
Nov 5 at 16:28
css anchors sounds good. Could you provide an example?
– Adam Harkus
Nov 5 at 16:28
try this: set fokus to first column when any column is clicked, since the fokus is set on the very top the screen should also scroll there on its own
– Erch
Nov 6 at 6:29
try this: set fokus to first column when any column is clicked, since the fokus is set on the very top the screen should also scroll there on its own
– Erch
Nov 6 at 6:29
add a comment |
3 Answers
3
active
oldest
votes
up vote
0
down vote
you can try to use this control instead which suits your needs
https://sapui5.hana.ondemand.com/#/entity/sap.uxap.ObjectPageLayout
Wizards and Object pages don't really fit the use-case. It's questions stacked vertically, and expandable rather than steps.
– Adam Harkus
Nov 6 at 15:14
add a comment |
up vote
0
down vote
You can achieve it using scrollToElement()
var oPage = sap.ui.getCore().byId("pageId");//you page ID
var oList = sap.ui.getCore().byId("ListId");//element ID to which it has to scroll
if ( oPage && oList )
oPage.scrollToElement(oList, 1000);
Execute the above code inside the panel event expand
add a comment |
up vote
0
down vote
After trying everything, this is what worked for me.
onExpand: function (oEvent) {
if (oEvent.getParameters().expand) {
var focusID = oEvent.getParameter("id");
var elmnt = sap.ui.getCore().byId(focusID);
elmnt.getDomRef().scrollIntoView(true);
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
you can try to use this control instead which suits your needs
https://sapui5.hana.ondemand.com/#/entity/sap.uxap.ObjectPageLayout
Wizards and Object pages don't really fit the use-case. It's questions stacked vertically, and expandable rather than steps.
– Adam Harkus
Nov 6 at 15:14
add a comment |
up vote
0
down vote
you can try to use this control instead which suits your needs
https://sapui5.hana.ondemand.com/#/entity/sap.uxap.ObjectPageLayout
Wizards and Object pages don't really fit the use-case. It's questions stacked vertically, and expandable rather than steps.
– Adam Harkus
Nov 6 at 15:14
add a comment |
up vote
0
down vote
up vote
0
down vote
you can try to use this control instead which suits your needs
https://sapui5.hana.ondemand.com/#/entity/sap.uxap.ObjectPageLayout
you can try to use this control instead which suits your needs
https://sapui5.hana.ondemand.com/#/entity/sap.uxap.ObjectPageLayout
answered Nov 6 at 15:01
jasbir
1167
1167
Wizards and Object pages don't really fit the use-case. It's questions stacked vertically, and expandable rather than steps.
– Adam Harkus
Nov 6 at 15:14
add a comment |
Wizards and Object pages don't really fit the use-case. It's questions stacked vertically, and expandable rather than steps.
– Adam Harkus
Nov 6 at 15:14
Wizards and Object pages don't really fit the use-case. It's questions stacked vertically, and expandable rather than steps.
– Adam Harkus
Nov 6 at 15:14
Wizards and Object pages don't really fit the use-case. It's questions stacked vertically, and expandable rather than steps.
– Adam Harkus
Nov 6 at 15:14
add a comment |
up vote
0
down vote
You can achieve it using scrollToElement()
var oPage = sap.ui.getCore().byId("pageId");//you page ID
var oList = sap.ui.getCore().byId("ListId");//element ID to which it has to scroll
if ( oPage && oList )
oPage.scrollToElement(oList, 1000);
Execute the above code inside the panel event expand
add a comment |
up vote
0
down vote
You can achieve it using scrollToElement()
var oPage = sap.ui.getCore().byId("pageId");//you page ID
var oList = sap.ui.getCore().byId("ListId");//element ID to which it has to scroll
if ( oPage && oList )
oPage.scrollToElement(oList, 1000);
Execute the above code inside the panel event expand
add a comment |
up vote
0
down vote
up vote
0
down vote
You can achieve it using scrollToElement()
var oPage = sap.ui.getCore().byId("pageId");//you page ID
var oList = sap.ui.getCore().byId("ListId");//element ID to which it has to scroll
if ( oPage && oList )
oPage.scrollToElement(oList, 1000);
Execute the above code inside the panel event expand
You can achieve it using scrollToElement()
var oPage = sap.ui.getCore().byId("pageId");//you page ID
var oList = sap.ui.getCore().byId("ListId");//element ID to which it has to scroll
if ( oPage && oList )
oPage.scrollToElement(oList, 1000);
Execute the above code inside the panel event expand
edited Nov 7 at 11:20
answered Nov 7 at 10:04
inizio
921512
921512
add a comment |
add a comment |
up vote
0
down vote
After trying everything, this is what worked for me.
onExpand: function (oEvent) {
if (oEvent.getParameters().expand) {
var focusID = oEvent.getParameter("id");
var elmnt = sap.ui.getCore().byId(focusID);
elmnt.getDomRef().scrollIntoView(true);
add a comment |
up vote
0
down vote
After trying everything, this is what worked for me.
onExpand: function (oEvent) {
if (oEvent.getParameters().expand) {
var focusID = oEvent.getParameter("id");
var elmnt = sap.ui.getCore().byId(focusID);
elmnt.getDomRef().scrollIntoView(true);
add a comment |
up vote
0
down vote
up vote
0
down vote
After trying everything, this is what worked for me.
onExpand: function (oEvent) {
if (oEvent.getParameters().expand) {
var focusID = oEvent.getParameter("id");
var elmnt = sap.ui.getCore().byId(focusID);
elmnt.getDomRef().scrollIntoView(true);
After trying everything, this is what worked for me.
onExpand: function (oEvent) {
if (oEvent.getParameters().expand) {
var focusID = oEvent.getParameter("id");
var elmnt = sap.ui.getCore().byId(focusID);
elmnt.getDomRef().scrollIntoView(true);
answered Nov 7 at 12:05
Adam Harkus
276320
276320
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53155169%2fsapui5-panels-controlling-position-of-content%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I don't think there is any "ui5-out-of-the-box" solution for your problem, but I guess you can use css-anchors. React to the open-event of the panel and navigate to the corresponding anchor of the panel.
– luuksen
Nov 5 at 14:57
You could try to use the wizardstep control. This provides the posibility to go to the next and previous step if i'm correct. And it scrolls to the position of that step. sapui5.hana.ondemand.com/#/api/sap.m.WizardStep
– Joey De Laat
Nov 5 at 14:59
css anchors sounds good. Could you provide an example?
– Adam Harkus
Nov 5 at 16:28
try this: set fokus to first column when any column is clicked, since the fokus is set on the very top the screen should also scroll there on its own
– Erch
Nov 6 at 6:29