Siebel OpenUI: Hiding a Column in List Applet

It seems to be pretty simple and may be stupid  requirement but its a possiblity that you need to expose some Field on applet web layout and in same time you don’t want it to be visible.

Well in OpenUI enhancements, we can access only those fields in PM/PR which are mapped in web layout of applet or you can say exposed in applet. But we don’t want to show it….then we need to hide it from PM/PR using jQuery:

$(“Selector”).hide();

OR

$(“Selector”).attr(“style”,”display:none”);

Unfortunately it works only in form applets, as we have only field control. We can select it and hide/show it.

What about List Applet controls as  we have to hide the whole single column i.e. that column from all rows in this case ???

Thinking ….. 🙂

Well, if you are here then stop thinking…

If you ask a UI Developer or may be google, you can find a straight forward answer…

  1. Hide Header Column
  2. Select all td for that column and hide it.

Hide Header Column:

Its simple, get that particular TH identifier and hide it.

$(“Selector”).hide(); OR $(“Selector”).attr(“style”,”display:none”);

Select all td for that column and hide it:

In this case, we have to loop through TD of all TRs. We can achieve this in many ways, here I am using nth child selector method of jQuery.

Please check this…

$(‘#id table tr td:nth-child(n+2)’).attr(‘style’,’display:none;’);

In above line, we are selecting a table then traverse its all TRs. For each TR, it will select 2nd TD and apply style on it.

This solution works well if your columns resided in the end of list . But later I came up with one more issue with this solution.

Whenever, you are adding a new column from Column Displayed in applet, it will corrupt alignment of list applet…

Thinking for a solution again … 🙁

Friends, I got something more interesting than I can think of…check my next post.

[su_divider]

@AskmeSiebel

 

2 comments for “Siebel OpenUI: Hiding a Column in List Applet

Leave a Reply

Your email address will not be published. Required fields are marked *