[gradebook2-dev] Refreshing column headers

Jim Eng jimeng at umich.edu
Tue Nov 2 14:34:22 PDT 2010


Here is the code that gets the cells to refresh:

					int pageSize = getPageSize();
					String searchString = searchField.getValue();
					if(showWeightedToggleButton != null) {
						showWeightedString = Boolean.toString(showWeightedToggleButton.isPressed());
					} else if(showWeightedString == null) {
						showWeightedString = Boolean.FALSE.toString();
					}
					String sectionUuid = null;
					if (sectionListBox != null) {
						List<ModelData> selectedItems = sectionListBox.getSelection();
						if (selectedItems != null && selectedItems.size() > 0) {
							ModelData m = selectedItems.get(0);
							sectionUuid = m.get(SectionKey.S_ID.name());
						}
					}
					loadConfig = new MultiGradeLoadConfig();
					loadConfig.setLimit(0);
					loadConfig.setOffset(pageSize);
					((MultiGradeLoadConfig) loadConfig).setSearchString(searchString);
					((MultiGradeLoadConfig) loadConfig).setShowWeighted(showWeightedString);
					((MultiGradeLoadConfig) loadConfig).setSectionUuid(sectionUuid);
					((BasePagingLoader)newLoader()).useLoadConfig(loadConfig);
					newLoader().load(0, pageSize);





On Nov 2, 2010, at 5:06 PM, Jim Eng wrote:

> I made some screenshots to make clearer what I'm asking.  First here's the UI showing the "Show Weighted" button next to the search form in the grid tool bar:
> 
> <gb2-points.png>
> 
> 
> Notice that the column header for HW1 says "HW1 [10 pts]".  When I click the "Show Weighted" button, the cells in the grid get updated, but the column headers do not, as shown by the next screen shot:
> 
> <gb2-percent.png>
> 
> Notice that the column header for HW1 still says "HW1 [10 pts]".  I can get the column headers to change by editing any item (by double clicking the title in the left panel and then clicking the "Save/Close" button in the edit dialog).  The column headers will then get updated, as shown in the next screen shot:
> 
> <gb2-percent-updated.png>
> 
> Notice that the column header for HW1 now says "HW1 [4%]". If we click the "Show Weighted" button again, the cells get updated correctly but the column headers do not get updated:
> 
> <gb2-points-updated.png>
> 
> What we'd like is for clicking the "Show Weighted" button to update both the cells in the grid *AND* the column headers.  
> 
> Any suggestions about how to trigger that?  
> 
> BTW, the branch we are working in is based on the 1.3.0 tag.
> 
> Thanks.
> 
> Jim
> 
> 
> 
> On Nov 2, 2010, at 4:27 PM, Jim Eng wrote:
> 
>> My question is in the context of clicking the "Show Weighted" button. David added this button.  When I click the button, the cells in the grid change and display percentages instead of points, but the column headers still show points. I I am in the "Show Weighted" mode, edit an item and save the item, the column headers get refreshed.  But then they stay that way until something happens that changes them back.  We'd like that change to occur whenever you click the "Show Weighted" button.  We'd appreciate any suggestions.
>> 
>> Thanks.
>> 
>> Jim
>> 
>> 
>> 
>> 
>> On Nov 2, 2010, at 4:16 PM, Jim Eng wrote:
>> 
>>> Hi,
>>> 
>>> Our work on GRBK-483 is almost complete (mostly David's work, actually).  I am trying to finish up one detail.  David has added code to provide new labels for the columns to show the values as a percentage of the semester total, but we are still having trouble getting the column header row to update.  Can you suggest how we might do that? 
>>> 
>>> Thanks.
>>> 
>>> Jim
>>> _______________________________________________
>>> gradebook2-dev mailing list
>>> gradebook2-dev at collab.sakaiproject.org
>>> http://collab.sakaiproject.org/mailman/listinfo/gradebook2-dev
>>> 
>>> 
>> 
>> 
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/gradebook2-dev/attachments/20101102/109d111f/attachment.html 


More information about the gradebook2-dev mailing list