DB Web-Component Demo Page

file & descriptionDB Web-Component markup in page
FA-simple-table.html

  • Print content of table "island", database "mondial"
  • Additional condition that match the "Ostfriesische Inseln".
  • print all columns of table island
  • Result sorted by column "Area"
    <script type="module" src="http://localhost/dbwc/db.js">
    </script>
    <db-connection url="http://localhost/dbwc"
               database="mondial">
    </db-connection> 
    <db-table table="island" 
              filter="Islands=Ostfriesische Inseln" 
              order="Area">
    </db-table>
FA-cyclic-table.html

  • table component rereads database every 10 sec.
    <script type="module" src="http://localhost/dbwc/db.js">
    </script>
    <db-connection url="http://localhost/dbwc"
               database="mondial">
    </db-connection> 
    <db-table table="country" 
              filter="Population>40000000" 
              refresh-rate="10"
              order="Population">
    </db-table>
FA-table-search-sort.html

  • Print content of table "country", database "mondial"
  • Projection of columns "Name", "Code", "Capital" amd "Population".
  • Table can be seached by formulating restrictions on columns
    (ie. for column Population: < 10000)
  • table can be sorted by clicking on the column headers
    <script type="module" src="http://localhost/dbwc/db.js">
    </script>
    <db-connection url="http://localhost/dbwc"
               database="mondial">
    </db-connection> 
    <db-table table="country" 
              actions="sort,filter" 
              attribute-list="Name,Code,Capital,Population">
    </db-table>
FA-table-search-sort-paging-inline.html

  • Print content of table "country", database "mondial"
  • Fixed page size (30 rows)
  • pagewise scrolling
  • inline edit (double click on field content)
  • Projection of columns "Name" and "Population".
  • search and sort functionality as before ...
  • Inline edit: Please only edit non key fields and single attribute foreign-keys
    <script type="module" src="http://localhost/dbwc/db.js">
    </script>
    <db-connection url="http://localhost/dbwc"
                   database="mondial">
    </db-connection> 
    <db-table table="country" 
              actions="sort,filter,paging,inline" 
              pagesize="30"
              attribute-list="Name,Population,Capital">
    </db-table>
FA-table-search-edit-delete.html

  • table with additional columns to edit/delete datasets
    <script type="module" src="http://localhost/dbwc/db.js">
    </script>
    <db-connection url="http://localhost/dbwc"
               database="mondial">
    </db-connection> 
    <db-table table="island" 
              actions="edit,delete,sort,paging" 
              pagesize="20">
    </db-table>
db-edit-mondial-key.html

  • Edit France with foreign key resolution of capital
  • Bug, when changing capital
    <script type="module" src="http://localhost/dbwc/db.js">
    </script>
    <db-connection url="http://localhost/dbwc" 
                   database="mondial-key">
    </db-connection> 
    <db-edit table-name="country" 
             display-key="on" 
             key="70">
	</db-edit>
db-mondial-login.html

  • requieres login information
  • credentials: test/apitest
    <script type="module" src="http://localhost/dbwc/db.js">
    </script>
    <db-connection url="http://localhost/dbwc"
                   database="mondial-login">
    </db-connection>
    <db-table table="city" xfilter="Country=D" attribute-list="Country, Name, Population, Longitude, Latitude"  actions="edit,delete">
</form>
  </body>
</html>

db-mondial-create-login.html

  • creation of a new city dataset
  • requieres login information
  • credentials: test/apitest
    <script type="module" src="http://localhost/dbwc/db.js">
    </script>
    <db-connection url="http://localhost/dbwc"
                   database="mondial-key-login">
    </db-connection>
    <db-create table="city"