PDA

View Full Version : SingleCategory



Mathias Weisheit
12 Feb 2010, 5:56 AM
If I use the singlecategory for filtering the viewentries the sourcecode will be that:


var ExtndApp = function() {
return {
init : function(){
this.ui = new Ext.nd.DominoUI({
uiOutline : {
outlineName: 'ActivityTicketsWeb',
useArrows : true,
showIcons : false
//viewDefaults: {
// selModelConfig: {type: 'checkbox'}
//}
},
uiView : {
viewName: 'ActivityTicketsTodayWeb',
viewTitle: 'ActivityTicketsTodayWeb',
//selModelConfig: {type: 'checkbox'},
showSearch: true,
showActionbar : true,
showSingleCategory :strSingleCat, //Restriction / Filtering for Username
showCategoryComboBox : false,
dateTimeFormats : {
dateFormat : 'd/m/y',
timeFormat : 'h:i:s A',
dateTimeFormat : 'Y-M-d h:i:s A'
}
}
});
} // init
} // return
}();

Ext.onReady(ExtndApp.init, ExtndApp, true);

It works with the startview.

But if I open an other view form the outline the filtering is inactive! How can I achieve the the filtering is always present?

I think we must make any changes to the Open function form the outline object.
What do you think about this?

jratcliff
12 Feb 2010, 8:24 AM
for the outline use the 'viewDefaults' property and what it will do is that for each view opened from the outline, it will apply these defaults to the new view that gets opened.

Mathias Weisheit
14 Feb 2010, 11:09 PM
Do you have a little expample?

forefront
17 Mar 2010, 6:57 PM
You want to realize the single category view and set the Filter by Username.common method is embeding the view into form,and set the single category condition.Now in extnd it is parse view data directly,we couldn't use username on view category column.I have got the same problem.

jratcliff
18 Mar 2010, 6:11 PM
Do you have a little expample?
Sorry, I've been away for a while and missed this post. Here's an example (see what's in bold). Basically, for the uiOutline, just add a viewDefaults property and set whatever configs you can do for a view and then, when a view is opened from an outline, these viewDefaults will be apply to the opening view. Make sense?



var ExtndApp = function() {
return {
init : function(){
this.ui = new Ext.nd.DominoUI({
uiOutline : {
outlineName: 'ActivityTicketsWeb',
useArrows : true,
showIcons : false
viewDefaults: {
showSingleCategory :strSingleCat, //Restriction / Filtering for Username
showCategoryComboBox : false
}
},
uiView : {
viewName: 'ActivityTicketsTodayWeb',
viewTitle: 'ActivityTicketsTodayWeb',
//selModelConfig: {type: 'checkbox'},
showSearch: true,
showActionbar : true,
showSingleCategory :strSingleCat, //Restriction / Filtering for Username
showCategoryComboBox : false,
dateTimeFormats : {
dateFormat : 'd/m/y',
timeFormat : 'h:i:s A',
dateTimeFormat : 'Y-M-d h:i:s A'
}
}
});
} // init
} // return
}();

Ext.onReady(ExtndApp.init, ExtndApp, true);

forefront
21 Mar 2010, 6:21 PM
what does the "strSingleCat" mean?viewDefault form name?single category field name?

forefront
22 Mar 2010, 3:41 AM
Which version should I apply?I use it for extnd b1r1,that's no effect.

jratcliff
22 Mar 2010, 6:37 PM
what does the "strSingleCat" mean?viewDefault form name?single category field name?

I was assuming that is a variable that holds the string value of the category that they wish to "restrict to".

jratcliff
22 Mar 2010, 6:39 PM
Which version should I apply?I use it for extnd b1r1,that's no effect.

Hmm, I'm not certain. Beta 1r1 was out about 1 1/2 years ago and beta 3 came out about 6 months ago with beta 2 somewhere in between. Can you try the latest beta 3 version?