Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8966839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:06:32+00:00 2026-06-15T17:06:32+00:00

I created a sample to demonstrate. I have a view called testView with three

  • 0

I created a sample to demonstrate. I have a view called “testView” with three columns referencing “field1”, “field2”, “field3”.

When I run this XPage all three columns in the display when it should not show the third column. Clicking the button does not hide the second column either.

Can anyone tell me what I have wrong?

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core"
    xmlns:xe="http://www.ibm.com/xsp/coreex"
    xmlns:xc="http://www.ibm.com/xsp/custom">

    <xp:this.beforePageLoad><![CDATA[#{javascript:if ( sessionScope.showCol2 == null ) 
    sessionScope.showCol2 = true;}]]></xp:this.beforePageLoad>
    <xe:restService id="restService1">
        <xe:this.service>
            <xe:viewJsonService viewName="testView"
                defaultColumns="true">
            </xe:viewJsonService>
        </xe:this.service>
    </xe:restService>
    <xp:panel style="margin-left:20.0px;margin-top:20.0px">
        <xe:listView id="listView1" storeComponentId="restService1">
            <xe:listViewColumn id="listViewColumn1" columnName="field1"
                columnTitle="Field1">
            </xe:listViewColumn>
            <xe:listViewColumn id="listViewColumn2" columnName="field2"
                columnTitle="Field2">
            <xe:this.rendered><![CDATA[#{javascript:return sessionScope.showCol2;
}]]></xe:this.rendered></xe:listViewColumn>
            <xe:listViewColumn id="listViewColumn3" columnName="field3"
                columnTitle="Field3" rendered="false">
            </xe:listViewColumn>
        </xe:listView></xp:panel>
    <xp:panel style="margin-top:20.0px;margin-left:20.0px">
        <xp:button id="button1" value="Toggle Column 2">
            <xp:eventHandler event="onclick" submit="true"
                refreshMode="partial" refreshId="listView1">
                <xp:this.action><![CDATA[#{javascript:if (     sessionScope.showCol2 == false ) { 
    sessionScope.showCol2 = true;
}
else { 
    sessionScope.showCol2 = false;
}}]]></xp:this.action>
            </xp:eventHandler></xp:button>
    </xp:panel></xp:view>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T17:06:33+00:00Added an answer on June 15, 2026 at 5:06 pm

    Looks like a bug in ExtLib. But you can hide the column in your code with hidden* property:

    <xp:button id="button1" value="Toggle Column 2">
       <xp:eventHandler event="onclick" submit="true"
          refreshMode="partial" refreshId="listView1">
             <xp:this.action>
                <![CDATA[#{javascript:
                   var cmp = getComponent('listViewColumn2');
                   if( cmp.isHidden() ){
                      cmp.setHidden(false);
                   }else{
                      cmp.setHidden(true);
                   }
                }]]>
             </xp:this.action>
       </xp:eventHandler>
    </xp:button>
    

    *: the property is hidden too

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a sample jsfiddle at http://jsfiddle.net/nair/bv3FG/19/ to demonstrate the problem I am
I have created this simple android Activity to demonstrate my problem. I just want
I have created a sample report with crystal report 10. Now, I wanna to
I have created a sample java socket application. I used Socket s = new
I am trying to read this file I created as sample made up from
I have an issue with an NSPanel acting strangely and have created a Sample
I created sample rails app and deployed into heroku. Rails version is 3.1.3 Ruby
I wanted to learn something about Spring and Maven, so I created sample Maven
I created a sample webservice which contain default 'HelloWorld' function as 'webmethod' when tried
I created a sample application using Android TextView with shared preferences . In my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.