我需要将tabPanel添加到tabsetPanel dynamicaly。我在同一个tabsetPanel中也有一些常量tabPanel。我发现只有一个解决方案(R Shiny - add tabPanel to tabsetPanel dynamically (with the use of renderUI))
我构建了与本文相关的代码。但现在我无法调用这些tabPanel并在那里打印任何信息。
有人可以建议我如何调用我的tabPanel或如何组织tabPanel的动态使用/添加,请
Ext.define('Wts.model.DailyRegister', {
extend: 'Ext.data.Model',
fields: [
{
name: 'Year',
type: 'int',
mapping: 'DailyRegister.Year'
},
{
name: 'Month',
type: 'int',
mapping: 'DailyRegister.Month'
},
{
name: 'Project_ID',
type: 'int',
mapping: 'DailyRegister.Project_ID'
},
{
name: 'Project_Name',
type: 'string'
},
{
name: 'Activity_ID',
type: 'int',
mapping: 'DailyRegister.Activity_ID'
},
{
name: 'Activity_Name',
type: 'string'
},
{
name: 'Activity_UnitCost',
type: 'number'
},
{
name: 'Date',
type: 'date',
dateFormat: 'MS'
},
{
name: 'ActivityType',
type: 'int'
},
{
name: 'Employee_ID',
type: 'int',
mapping: 'DailyRegister.Employee_ID'
},
{
name: 'Day',
type: 'int',
mapping: 'DailyRegister.Day'
},
{
name: 'WorkedHours',
type: 'number',
mapping: 'DailyRegister.WorkedHours',
convert: function(value, record) {
if (record.get('ActivityType') == 1) {
return window.convertNumberToTime(value);
}
return value;
},
serialize: function(value, record) { /
if (record.get('ActivityType') == 1) {
return window.convertTimeToNumber(value);
}
return value;
}
},
{
name: 'Sum',
type: 'number',
mapping: 'DailyRegister.Sum'
},
{
name: 'Comments',
type: 'string',
mapping: 'DailyRegister.Comments',
},
{
name: 'ItWasSended',
type: 'boolean',
mapping: 'DailyRegister.ItWasSended',
},
{
name: 'DataRange',
type: 'bool'
},
{
name: 'EndDate',
type: 'date',
dateFormat: 'MS'
}
]
答案 0 :(得分:2)
如果有人感兴趣,我发现了错误。这非常简单:
WRONG tabPanel(paste('Tab', x), uiOutput('Tab', x))
RIGHT tabPanel(paste('Tab', x), uiOutput(paste('Tab', x)))
: - d