Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Responsive Classes for Column Hide Not Working With Row Template

DaveArchMay 6 2022

JET Version: 10.0
Hi Community
We are implementing the Editable Form Table pattern in oj-table which utilises the Row Template pattern.
We require responsive column drop so are using the responsive classes for screen sizes to control the rendering in the row template i.e.

<tr>
 <td>
   <oj-bind-text value="[[row.data.EmployeeId]]"></oj-bind-text>
 </td>
 <td class="oj-lg-down-hide">
   <oj-bind-text value="[[row.data.DepartmentName]]"></oj-bind-text>
 </td>
</tr>

The columns are correctly hidden/shown according to the screen dimension however there is an issue in that when a column is hidden, the remaining columns do not stretch to take up the additional space. This contrasts to the pattern where Row Template is not used and the classes are added to the ‘className’ and ‘headerClassName’ column object properties where the remaining columns do stretch to take up the additional space when a column is hidden.

columns='[{"headerText": "Employee Id", 
 "field": "EmployeeId",
 "headerClassName": "oj-sm-only-hide",
 "className": "oj-sm-only-hide",
 "resizable": "enabled"},
{"headerText": "Department Name", 
 "field": "DepartmentName",
 "className": "oj-lg-down-hide",
 "headerClassName": "oj-lg-down-hide"}]'

You can see this in the Cookbook demo for the Row Template pattern. By default, the demo does not include responsive column hide but you can add this using the following steps to highlight the issue:
In demo.html, add ‘class="oj-lg-down-hide"’ to the <td> element for Rating and Sales Target Achievement:

	<td class="oj-lg-down-hide">

In demo.js, add ‘className: "oj-lg-down-hide", headerClassName: "oj-lg-down-hide"’ to this.columnArray for the same columns

{ headerText: "Rating", sortable: "disabled", className: "oj-lg-down-hide", className: "oj-lg-down-hide", headerClassName: "oj-lg-down-hide" },
{ headerText: "Sales Target Achievement", sortable: "disabled", className: "oj-lg-down-hide", headerClassName: "oj-lg-down-hide" },

Click Apply Changes
Zoom in on the browser to something lower than XL.
You will see the Ratings and Sales Target Achievement columns hiding as the view port changes.  Notice though how the whitespace where those columns were remains in place and the remaining columns do not stretch to fill the space. 
table1.PNGtable2.PNGContrast this with the Basic demo which uses responsive classes within the columns template and the columns do stretch to fill the remaining space. Here, I have set the className and headerClassName to 'oj-lg-down-hide' on the column 'Manager Id'. See in the image below how when Manager Id is hidden, the remaining columns fill the available space.
table3.PNGThis issue becomes a significant issue for small screens such as mobiles where as the columns drop off, the whitespace remains. This negates the point of hiding the columns as the remaining columns do not take up the remaining space.
So the question is, how can we use Row Template with responsive column drop where the remaining columns fill the remaining horizontal space when the view port size changes?
Any ideas greatly appreciated.

Comments

390020
Works ok in my environment (note I'm using python 2.5).

-----
$ ipython
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
Type "copyright", "credits" or "license" for more information.

In [1]: import cx_Oracle as ora

In [2]: con_str = "i/me@mine"

In [3]: con = ora.connect(con_str)

In [4]: type(con)
Out[4]: &lt;type 'cx_Oracle.Connection'&gt;

In [5]: con = ora.Connection(con_str)

In [6]: type(con)
Out[6]: &lt;type 'cx_Oracle.Connection'&gt;
-----
Q: what is the output if you do:

type(connection_string)


?

675949
type(connection)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'connection' is not defined
390020
I asked for connection_string, not connection. Also I'm assuming you're running it in the same python session you run the previous code you show us. Is that right?
675949
Here is the code.....

Python 2.6.1 (r261:67517, Dec 4 2008, 16:51:00) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
import cx_Oracle
connection_string = "system/mypass@GLOBAL"
connection = cx_Oracle.Connection(connection_string)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
cx_Oracle.DatabaseError: ORA-24315: illegal attribute type
type(connection_string)
<type 'str'>
>>>




I am doing all this under the same python session.
390020
Since I was unable to find out what is happening, I forwarded your problem to the cx-oracle-users list. You can find an answer over there. Here's [the link|http://sourceforge.net/mailarchive/forum.php?forum_name=cx-oracle-users&max_rows=25&style=nested&viewmonth=200812&viewday=19].
730306
I encountered this problem today, and there was no answer on the web.
This is what I learned, although it is embarassing to admit. I had installed
the Ora11g version of cx_Oracle, but the database is Ora10g. I deleted
the Ora11g cx_Oracle files, installed the Ora10g version, and everything
worked.
&nbsp;&nbsp;&nbsp;&nbsp;--dang
1 - 6

Post Details

Added on May 6 2022
1 comment
333 views