title: reactive expressions and actionButton in Shiny
body: <p>In the shiny code shown below, the output is refreshed (random number changes) every time the button is clicked, irrespective of whether or not the input text changes.  How can this be written so that the output is refreshed only when the button is clicked AND the input is different?</p>
  
  <pre><code>require(shiny)
  
  ui &lt;- shinyUI(
      navbarPage("Test",
          tabPanel("Panel1",
              fluidRow(
                  column(offset=2, width=2,
                      textInput("text", label=h6("Input"), value="test123"),
                      br(),
                      actionButton("actionClick", label="Click")
                  ),
                  column(offset=1, width=2,
                      h6("Output"),
                      verbatimTextOutput(outputId="sessionId")
                  )
              )
          )
      )
  )
  
  server &lt;- function(input, output, session) {
  
      session &lt;- reactive({
          input$actionClick
  
          isolate({
              return(input$text)
          })
      })
  
      output$sessionId &lt;- renderText({paste(session(),runif(1))})
  }
  
  shinyApp(ui = ui, server = server)
  </code></pre>