updated uibinder with anchors to page

This commit is contained in:
Francesco Mangiacrapa 2021-08-06 17:42:22 +02:00
parent 16484549ed
commit 34a17253a6
2 changed files with 29 additions and 30 deletions

View File

@ -20,7 +20,6 @@ import com.google.gwt.event.shared.HandlerManager;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
@ -83,14 +82,6 @@ public class GeonaMainTabPanel extends Composite {
private SortFilter currentSortFilter;
private HTML divAnchorTop;
private HTML anchorTop;
private HTML divAnchorBotton;
private HTML anchorBottom;
/**
* Instantiates a new geona main tab panel.
*
@ -105,14 +96,6 @@ public class GeonaMainTabPanel extends Composite {
setCurrentSortFilter(initialSortFilter);
bindEvents();
// Anchor top
divAnchorTop = new HTML("<div id=\"topOfTable\"/>");
anchorTop = new HTML("<a href=\"#topOfTable\" style=\"float:right\">Go to top of table</a>");
// Anchor bottom
divAnchorBotton = new HTML("<div id=\"bottomOfTable\" />");
anchorBottom = new HTML("<a href=\"#bottomOfTable\" style=\"float:right\">Go to bottom of table</a>");
}
/**
@ -204,15 +187,8 @@ public class GeonaMainTabPanel extends Composite {
public void showListOfConcessioniView(GeonaRecordsPaginatedView grpw) {
geonaListOfConcessioniPanel.clear();
VerticalPanel htmllPanel = new VerticalPanel();
htmllPanel.add(divAnchorTop);
htmllPanel.add(anchorBottom);
htmllPanel.add(grpw.getCellPanel());
htmllPanel.add(grpw.getPagerPanel());
htmllPanel.add(anchorTop);
htmllPanel.add(divAnchorBotton);
geonaListOfConcessioniPanel.add(htmllPanel);
}

View File

@ -20,6 +20,17 @@
.margin-top-8 {
margin-top: 8px !important;
}
.margin-top-5 {
margin-top: 5px !important;
}
.float-right {
display: block;
width: 100%;
font-size: 12px;
text-align: right;
}
</ui:style>
<g:HTMLPanel>
<b:PageHeader subtext="data entry facility"
@ -28,25 +39,30 @@
<b:Tab icon="FILE_TEXT" heading="New Project" active="true"
ui:field="tabNewProject">
<b:Navbar>
<b:Brand>New Project</b:Brand>
<b:Brand addStyleNames="{style.margin-top-5}">New Project</b:Brand>
<b:Nav>
<b:NavLink ui:field="buttCreateNewProject"
title="Create a new Project" icon="FILE">Create New Project</b:NavLink>
</b:Nav>
</b:Navbar>
<b:Divider />
<g:HTMLPanel addStyleNames="{style.float-right}">
<div id="topPage"></div>
<a href="#bottomPage">Go to bottom</a>
</g:HTMLPanel>
<r:LoaderIcon ui:field="loader"></r:LoaderIcon>
<g:HTMLPanel ui:field="geonaMainFormPanel"></g:HTMLPanel>
<g:HTMLPanel addStyleNames="{style.float-right}">
<div id="bottomPage"></div>
<a href="#topPage">Go to top</a>
</g:HTMLPanel>
</b:Tab>
<b:Tab icon="TABLE" heading="List of Projects"
ui:field="tabGetListOfProjects">
<b:Navbar>
<b:Brand>List of Projects</b:Brand>
<b:Brand addStyleNames="{style.margin-top-5}">List of Projects</b:Brand>
<b:Nav>
<b:Dropdown text="Sort by" ui:field="dropdownSortBy">
</b:Dropdown>
</b:Nav>
<b:Nav>
<b:TextBox ui:field="textBoxSortBy" readOnly="true"
@ -57,8 +73,15 @@
title="Create a new Project" icon="ROTATE_RIGHT">Reload Projects</b:NavLink>
</b:Nav>
</b:Navbar>
<b:Divider />
<g:HTMLPanel addStyleNames="{style.float-right}">
<div id="topPage2"></div>
<a href="#bottomPage2">Go to bottom</a>
</g:HTMLPanel>
<g:HTMLPanel ui:field="geonaListOfConcessioniPanel"></g:HTMLPanel>
<g:HTMLPanel addStyleNames="{style.float-right}">
<div id="bottomPage2"></div>
<a href="#topPage2">Go to top</a>
</g:HTMLPanel>
</b:Tab>
</b:TabPanel>
</g:HTMLPanel>