#include <DQM/TrackerCommon/interface/Select.h>
Public Member Functions | |
void | printHTML (xgi::Output *out) |
void | printHTML (xgi::Output *out) |
Select (std::string the_url, std::string top, std::string left, std::string the_requestID, std::string the_name) | |
Select (std::string the_url, std::string top, std::string left, std::string the_requestID, std::string the_name) | |
void | setOptionsVector (std::vector< std::string > the_options_v) |
void | setOptionsVector (std::vector< std::string > the_options_v) |
~Select () | |
~Select () | |
Private Attributes | |
std::string | name |
std::vector< std::string > | options_v |
std::vector< std::string > | options_v |
std::string | requestID |
Definition at line 14 of file Select.h.
Select::Select | ( | std::string | the_url, | |
std::string | top, | |||
std::string | left, | |||
std::string | the_requestID, | |||
std::string | the_name | |||
) | [inline] |
Select::Select | ( | std::string | the_url, | |
std::string | top, | |||
std::string | left, | |||
std::string | the_requestID, | |||
std::string | the_name | |||
) | [inline] |
void Select::printHTML | ( | xgi::Output * | out | ) | [virtual] |
Implements WebElement.
void Select::printHTML | ( | xgi::Output * | out | ) | [virtual] |
Implements WebElement.
Definition at line 4 of file Select.cc.
References lat::endl(), WebElement::get_pix_left(), WebElement::get_pix_top(), WebElement::get_url(), it, name, btag::LeptonSelector::option(), options_v, requestID, dummy::select(), edm::table, and getDQMSummary::td.
00005 { 00006 std::string position = "position:absolute; left:" + get_pix_left() + "; top:" + get_pix_top(); 00007 00008 // the javascript function makeSelectRequest expects the url of the request and the id of the widget 00009 // Example: makeSelectRequest('https://[ApplicationURL]/Request?RequestID=MyCustomRequest', 'select menu 1'); 00010 std::string applicationURL = get_url(); 00011 std::string requestName = "RequestID=" + requestID; 00012 std::string js_command = "makeSelectRequest('" + applicationURL + "/Request?" + requestName + "'" + 00013 ", '" + name + "')"; 00014 00015 *out << cgicc::div().set("style", position.c_str()) << std::endl; 00016 00017 // The id of the form is the name of the select menu + " Form". 00018 *out << cgicc::form().set("name", name + " Form").set("id", name + " Form") << std::endl; 00019 00020 *out << cgicc::table() << std::endl; 00021 *out << cgicc::tr() << std::endl 00022 << cgicc::td() << std::endl 00023 << name << ":" << std::endl 00024 << cgicc::td() << std::endl; 00025 00026 00027 *out << cgicc::td() << std::endl; 00028 *out << cgicc::select().set("name", name).set("id", name).set("onchange", js_command) << std::endl; 00029 *out << cgicc::option().set("value", "").set("selected") << cgicc::option() << std::endl; 00030 for (std::vector<std::string>::iterator it = options_v.begin(); it != options_v.end(); it++) 00031 { 00032 *out << cgicc::option().set("value", *it) << *it << cgicc::option() << std::endl; 00033 } 00034 *out << cgicc::select() << std::endl; 00035 *out << cgicc::td() << std::endl; 00036 00037 *out << cgicc::tr() << std::endl; 00038 00039 *out << cgicc::table() << std::endl; 00040 00041 *out << cgicc::form() << std::endl; 00042 *out << cgicc::div() << std::endl; 00043 }
void Select::setOptionsVector | ( | std::vector< std::string > | the_options_v | ) | [inline] |
void Select::setOptionsVector | ( | std::vector< std::string > | the_options_v | ) | [inline] |
std::string Select::name [private] |
std::vector<std::string> Select::options_v [private] |
std::vector<std::string> Select::options_v [private] |
std::string Select::requestID [private] |