I found the solution: It needs two conditions and one should aim at the tabsetpanel-id and the next at the tabpanel-value. Here is the code:
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
conditionalPanel(
condition = "input.tabs == 'a1' && input.tabs_a == 't_ass'", ns = NS(NULL),
h4("Assumptions")
),
conditionalPanel(
condition = "input.tabs == 'a1' && input.tabs_a == 't_scen'", ns = NS(NULL),
h4("Scenarios")
),
conditionalPanel(
condition = "input.tabs == 't1' && input.tabs_c == 't_cara' ", ns = NS(NULL),
h4("Car aggregate")
), # End conditionalPanel
conditionalPanel(
condition = "input.tabs == 't1' && input.tabs_c == 't_carf' ", ns = NS(NULL),
h4("Car fuel")
), # End conditionalPanel
conditionalPanel(
condition = "input.tabs == 't1' && input.tabs_c == 't_carfp' ",
h4("Car fuel power:")
) # End conditionalPanel
), # End sidebarPanel
mainPanel(
tabsetPanel(
type = "tabs", id = "tabs",
tabPanel(id = 'a1', value = 'a1',
"Assumptions and Scenarios",
tabsetPanel(
type = "tabs", id = "tabs_a",
tabPanel(
"Assumptions", value = "t_ass"
), # Close tabpanel t_ass,
tabPanel(
"Scenarios", value = "t_scen"
) # Close tabpanel t_scen
) # Close tabsetpanel
), # Close tabPanel t_Ass
tabPanel(id = "t1", value = "t1",
"Transport results",
tabsetPanel(
type = "tabs", id = "tabs_c",
tabPanel(
"Cars: Aggregated", value = "t_cara"
), # Close tabpanel t_cara
tabPanel(
"Cars: Fuel", value = "t_carf"
), # Close tabpanel
tabPanel(
id = "t_carfp",
"Cars: Fuel vs Power", value = "t_carfp",
) # Close tabpanel t_carfp
) # Close tabset tabs_c
) # Close tabpanel Transport results
) # Close tabset tabs_a
) # End mainPanel
) # End sidebarLayout
) # End fluidPage
server <- function(input, output) {
}
shinyApp(ui = ui, server = server)
Cheers
Renger