[codeface] [PATCH 5/7] Fix web frontend project comparison

  • From: Wolfgang Mauerer <wolfgang.mauerer@xxxxxxxxxxxxxxxxx>
  • To: <codeface@xxxxxxxxxxxxx>
  • Date: Mon, 7 Sep 2015 15:23:31 +0200

Projects selected for comparison are identified
by their identifier, not their textual description.
Take this into account when preparing the input
for the selection box.

This fixes several follow-up exception in widgets
that are triggered by shiny-internal checks.

Signed-off-by: Wolfgang Mauerer <wolfgang.mauerer@xxxxxxxxxxxxxxxxx>
---
codeface/R/shiny/apps/dashboard/server.r | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/codeface/R/shiny/apps/dashboard/server.r
b/codeface/R/shiny/apps/dashboard/server.r
index 5eeddf5..c0cf35e 100644
--- a/codeface/R/shiny/apps/dashboard/server.r
+++ b/codeface/R/shiny/apps/dashboard/server.r
@@ -65,13 +65,14 @@ widgetbase.output.selectview <- function(w, id) {
## render a selectInput
mychoices <- as.list(isolate({listViews(w)()}))
myselected <- isolate({w$view()})
- myselected <- names(mychoices[mychoices %in% myselected])
-
+ myselected <- mychoices[mychoices %in% myselected]
inputView.id.local <- paste(id, "_selectedview",sep="")
title <- div(id = w$titleid, class = "shiny-text-output widget_title")
+
selector <- selectInput(inputView.id.local, "",
choices = mychoices,
selected = myselected)
+
selector[[2]]$attribs$class <- "widget_view_select"
w$ui <- div(class="title_bar",
tags$table(width="100%", tags$tr(tags$td(title),
tags$td(selector))))
--
2.1.4


Other related posts:

  • » [codeface] [PATCH 5/7] Fix web frontend project comparison - Wolfgang Mauerer