Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Left and right border for empty cell in pdf table

Avatar

Level 1
 

I try to make pdf table like this:
[PdfTableExample][1]

[1]: https://i.stack.imgur.com/in0Yr.png

I need if header1 and header2 in line is null - make only left border(or right for htader2)
else make all border except bottom.
My code is:
For header1:

    data.#subform[0].Table1.Row1.MANDT::ready:layout - (JavaScript, client)
//"0" is the top border, 
//"1" is the right border, 
//"2" = bottom and 
//"3" is the left border
if ( this.rawValue == null )
{
//TextField.Border
//  this.ui.oneOfChild.border.getElement("edge",0).presence = "invisible";
//  this.ui.oneOfChild.border.getElement("edge",1).presence = "invisible";
//  this.ui.oneOfChild.border.getElement("edge",2).presence = "invisible";
//  this.ui.oneOfChild.border.getElement("edge",3).presence = "invisible";
//////////////////////////////////////////////////////////////////////////

    this.border.getElement("edge",0).presence = "invisible";
//  this.ui.oneOfChild.border.getElement("edge",1).presence = "invisible";
    this.border.getElement("edge",2).presence = "invisible";
//  this.ui.oneOfChild.border.getElement("edge",3).presence = "invisible";



}
else 
{
////TextField.Border
//  this.ui.oneOfChild.border.getElement("edge",0).presence = "invisible";
//  this.ui.oneOfChild.border.getElement("edge",1).presence = "invisible";
//  this.ui.oneOfChild.border.getElement("edge",2).presence = "invisible";
//  this.ui.oneOfChild.border.getElement("edge",3).presence = "invisible";
//////////////////////////////////////////////////////////////////////////

//  this.border.getElement("edge",0).presence = "invisible";
//  this.ui.oneOfChild.border.getElement("edge",1).presence = "invisible";
    this.border.getElement("edge",2).presence = "invisible";
//  this.ui.oneOfChild.border.getElement("edge",3).presence = "invisible";
}

For header2:
 data.#subform[0].Table1.Row1.MATNR::ready:layout - (JavaScript, client)
//"0" is the top border, 
//"1" is the right border, 
//"2" = bottom and 
//"3" is the left border
if ( this.rawValue == null )
{
//TextField.Border
//  this.ui.oneOfChild.border.getElement("edge",0).presence = "invisible";
//  this.ui.oneOfChild.border.getElement("edge",1).presence = "invisible";
//  this.ui.oneOfChild.border.getElement("edge",2).presence = "invisible";
//  this.ui.oneOfChild.border.getElement("edge",3).presence = "invisible";
//////////////////////////////////////////////////////////////////////////

    this.border.getElement("edge",0).presence = "invisible";
//  this.ui.oneOfChild.border.getElement("edge",1).presence = "invisible";
    this.border.getElement("edge",2).presence = "invisible";
//  this.ui.oneOfChild.border.getElement("edge",3).presence = "invisible";



}
else 
{
////TextField.Border
//  this.ui.oneOfChild.border.getElement("edge",0).presence = "invisible";
//  this.ui.oneOfChild.border.getElement("edge",1).presence = "invisible";
//  this.ui.oneOfChild.border.getElement("edge",2).presence = "invisible";
//  this.ui.oneOfChild.border.getElement("edge",3).presence = "invisible";
//////////////////////////////////////////////////////////////////////////

//  this.border.getElement("edge",0).presence = "invisible";
//  this.ui.oneOfChild.border.getElement("edge",1).presence = "invisible";
    this.border.getElement("edge",2).presence = "invisible";
//  this.ui.oneOfChild.border.getElement("edge",3).presence = "invisible";
}

Why when header1 and header2 is null i cannot see left/right border?

2 Replies