json fixes

This commit is contained in:
Peter Schojer 2008-09-18 11:08:30 +00:00
parent ec1997c2e5
commit 7ac9af2f5b
8 changed files with 17 additions and 1 deletions

View File

@ -146,6 +146,8 @@ bool ComboBoxCell::serializeJSON(std::ostream& out, const std::string& name)
else
out << getFormatter()->format(sel);
}
else
out << "''";
return true;
}

View File

@ -70,6 +70,8 @@ bool DateFieldCell::serializeJSON(std::ostream& out, const std::string& name)
{
out << "'" << getFormatter()->format(getValue()) << "'";
}
else
out << "''";
return true;
}

View File

@ -171,7 +171,7 @@ const Any& ListBoxCell::getSelected() const
bool ListBoxCell::serializeJSON(std::ostream& out, const std::string& name)
{
out << name;
out << name << ":";
if (hasSelected())
{
const Poco::Any& sel = getSelected();
@ -180,6 +180,8 @@ bool ListBoxCell::serializeJSON(std::ostream& out, const std::string& name)
else
out << ":" << getFormatter()->format(sel);
}
else
out << "''";
return true;
}

View File

@ -61,6 +61,8 @@ bool NumberFieldCell::serializeJSON(std::ostream& out, const std::string& name)
{
out << getFormatter()->format(getValue());
}
else
out << "''";
return true;
}

View File

@ -59,6 +59,8 @@ bool PasswordFieldCell::serializeJSON(std::ostream& out, const std::string& name
{
out << "'" << getFormatter()->format(getValue()) << "'";
}
else
out << "''";
return true;
}

View File

@ -80,6 +80,8 @@ bool TextEditCell::serializeJSON(std::ostream& out, const std::string& name)
{
out << "'" << getFormatter()->format(getValue()) << "'";
}
else
out << "''";
return true;
}

View File

@ -99,6 +99,8 @@ bool TextFieldCell::serializeJSON(std::ostream& out, const std::string& name)
{
out << "'" << getFormatter()->format(getValue()) << "'";
}
else
out << "''";
return true;
}

View File

@ -85,6 +85,8 @@ bool TimeFieldCell::serializeJSON(std::ostream& out, const std::string& name)
{
out << "'" << getFormatter()->format(getValue()) << "'";
}
else
out << "''";
return true;
}