Keith Chisarik
|
|
Group: StrataFrame Users
Posts: 939,
Visits: 40K
|
So I understand that there is no dropping of BO's on webforms, you create the BO reference in your ApplicationBasePage and it available to the entire website. Check. Does that mean I need to create many BO's if I need them populated differently? For instance I have a BO that contains codes used to fill all my applications dropdowns, I have a BO on each form that calls a fill specific for the proper contents of the BO based on a "codetype" field. So the generic question is this, since BO's essentially don't get instantiated into individual objects on a webform where I can call different fill methods, is the answer to make many BO's specified to their task, or am I on the wrong path?
Keith Chisarik
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
No, just reuse the business object that you declare... the good thing about a web solution is that you will only have one page loaded at a time for the person. Also, any business object that you declare there will get stored in a session variable, so you don't want to go hog wild on the business objects that you define within the ApplicationBasePage.
|
|
|
Keith Chisarik
|
|
Group: StrataFrame Users
Posts: 939,
Visits: 40K
|
Can you please enlighten me as to how I might make the web textbox control either have a darker type or not have as dark a grey background when the BO is in read-only mode. It is very hard to read. I looked in the source, but didn't see the spot. I know I don't want to touch the source, once I know what to change I will create my own control and inherit your textbox.
Keith Chisarik
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
|
Well, you are embarking upon the quest that we have battled from the beginning...Microsoft's inconsistent controls. Just do this, drop on a text box and play with the properties (Backcolor, ForeColor, etc) until you get the look you are going for. Once this is done, just create your own textbox that inherits directly from the .NET control (not ours). Then open up the SF source code, and look at the Web TextBox control. Copy all of the guts out of this thing...in fact, you can copy this whole class and just rename the class to your new class...obviously in a different project than the SF source. There is an interface property called BindingEditable. The code inside of here is what managed the readonly state. You will see that the code currently controls the Enabled property. Place your code here...just keep in mind that the standard .NET control does not let you control the disabled background and foreground colors..thus the problem we have dealt with. It basically will require us doing some rendering, which we just hve not taken the time to do, when the control is disabled.
|
|
|
Keith Chisarik
|
|
Group: StrataFrame Users
Posts: 939,
Visits: 40K
|
ewwww thanks.
Keith Chisarik
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
|
Yeah...sorry for the not so cheery answer
|
|
|
Bastian Töpfer
|
|
Group: Forum Members
Posts: 32,
Visits: 107
|
so.. will you do the extra rendering that is required to be able to change the disabled color? I know this is not your top priority, but so far every client asked me if I can change the disabled color, because it is very hard to read on a lot of screens. thanks for the update!
|
|
|
Keith Chisarik
|
|
Group: StrataFrame Users
Posts: 939,
Visits: 40K
|
bump from 2006 Is this on the radar at all ? I just got a newweb project and this was the first thing they commented on in the demo.
Keith Chisarik
|
|
|
Keith Chisarik
|
|
Group: StrataFrame Users
Posts: 939,
Visits: 40K
|
As a workaround (to not having to do the more time consuming workaround above) I want to programatically set the IgnoreManageUIReadOnlyState to True and the Readonly state to True, if the form is in "view mode" which results in the text being very readable, and not able to be changed by a user. A SF web textbox renders as System.Web.UI.WebControls.TextBox even though it is MicroFour.StrataFrame.UI.Web.TextBox at design time. Conversion attempts so I can get at the SF properties fail: CType(ctrl, MicroFour.StrataFrame.UI.Web.TextBox).IgnoreManageUIReadOnlyState = True I want to loop through all the controls on the form and set the properties as above, how to accomplish? Setting them manualy in the code behind works, but I have like 100 controls and that is messy for maintenance. Me.txtLastName.IgnoreManageUIReadOnlyState = True Me.txtLastName.ReadOnly = True
Keith Chisarik
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
|
Just FYI here Keith, we actually never do this online anymore (the read-only states I mean) when developing online apps. Instead of having two modes, we just let them type away which fires the IsDirtyChanged event which allows us to enable a Save button, etc. Would this work for you?
|
|
|