Hi All,Can somebody pls help me to do a single category view on a xpage…I need to display all records belongs to a particular combo value on a xpage. View data should change according to combo onchange
Thanks
Shana
Hi All,Can somebody pls help me to do a single category view on a xpage…I need to display all records belongs to a particular combo value on a xpage. View data should change according to combo onchange
Thanks
Shana
Subject: Re: Single Category View
Bind your comboBox to a viewScope variable, setting the onChange to do a partial refresh of a panel that includes your view/repeat.
The important bit is ensure your dominoView data element is within the panel (so within the view or repeat control), not defined as a property of the XPage or custom control itself. If it’s defined outside the panel you’re partially refreshing, it won’t get refreshed.
Then set the keys parameter of your dominoView to use something like this:
(viewScope.category == null) ? @Subset(@DbColumn(@DbName(),“myView”,1),1) : viewScope.category
So, it’s checking to see if the viewScope is null, if so, getting the first category in the view, otherwise using the viewScope.
Set exactKeys parameter to true, just to ensure it doesn’t use a partial match.
I’ve done this on a number of occasions and it works nicely.
Subject: doesn’t work for me…
Thanks…but doesn’t work for me…I’m getting a message “Problem submitting an area of the page” when run the page
Subject: Re: Problem Submitting An Area Of The Page
I have had this problem from time to time when doing a partial refresh, but haven’t got to grips with why it appears. It’s a problem with your partial refresh, not with the functionality of recalculating the view.
First, I’m assuming you’re on 8.5.1, not 8.5, is that correct?
I’m also assuming your ID name is correct, but it’s always a good idea for you to double-check. If it’s correct, try deleting the panel or whatever container control you’re partially refreshing, and then recreate it, re-establishing the link of the partial refresh to the newly-named container control. This has worked for me.