I have a MonoRail page with a grid and a form. When you enter data
into the form and click save, it creates a row in the grid.
If you double click on an item in the grid, it does a post back and
should load the form. however, even though the data gets collected, it
doesn't show.
I have this code in the controller:
if (PropertyBag.Contains("Warning"))
{
Dictionary<int, Dictionary<int, decimal>> Details
= new Dictionary<int, Dictionary<int, decimal>>();
foreach (WarningsDetail detail in ((Warning)
PropertyBag["Warning"]).Details)
{
if (!Details.ContainsKey
(detail.Category.ArchCategory.Section.ID))
Details.Add
(detail.Category.ArchCategory.Section.ID, new Dictionary<int, decimal>
());
Details
[detail.Category.ArchCategory.Section.ID].Add(detail.Category.ID,
detail.Hours);
}
PropertyBag["Details"] = Details; // This is
getting called with data.
}
Then, in the rails page for the form, I have this:
if IsDefined("Details"):
if Details.ContainsKey(sectKey.ID) and
Details
[sectKey.ID].ContainsKey(cat.ID):
output "<td><input
type=\"text\" id=\"" + strID + "\" name=\"" +
strID + "\" value=\"" + Details[sectKey.ID][cat.ID] + "\" /></td>\n"
else:
output "<td><input
type=\"text\" id=\"" + strID + "\" name=\"" +
strID + "\" /></td>\n"
end
else:
output "<td><input type=\"text\" id=\""
+ strID + "\" name=\"" +
strID + "\" /></td>\n"
end/**/
But IsDefined is never true.
How can I tell if the form is getting generated AFTER the PropertyBag
is filled?
How can I troubleshoot what is happening?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---