Web Connection
Password not
Gravatar is a globally recognized avatar based on your email address. Password not
  Michael Hogan (Ideate Hosting)
  All
  Jul 30, 2015 @ 09:26am
I have a client using the following object on a page:

<ww:wwWebTextBox ID="wwwtxtNewPW" runat="Server"
CssClass ="inputcontrol"
TextMode ="Password"
IsRequired="True"
ErrorMessageLocation="2"
style="font-weight: bold;" ControlSource=""></ww:wwWebTextBox>

But when it is rendered in the browser as an application, it gets displayed as <input type="text" ... instead of <input type="password"

What might we have set wrong?

TIA

Michael
www.WebConnectionHosting.com

Gravatar is a globally recognized avatar based on your email address. Re: Password not
  Rick Strahl
  Michael Hogan (Ideate Hosting)
  Jul 31, 2015 @ 08:07am

It works for me... Looking at the code in WebControls.prg I can't see a path through that would not render this as password characters.

The only thing I can think of is that some code somewhere changes the value of Textmode back to SingleLine. What happens if you set it to TextMode="Date"? That should set it to use date input. You can basically assign any value other than SingleLine, MultiLine and Password and that value will get set into the type of hte input field.

Best thing to debug this is to step through. In this case it's wwWebTextBox::Render() in webcontrols.prg.


+++ Rick ---



I have a client using the following object on a page:

<ww:wwWebTextBox ID="wwwtxtNewPW" runat="Server"
CssClass ="inputcontrol"
TextMode ="Password"
IsRequired="True"
ErrorMessageLocation="2"
style="font-weight: bold;" ControlSource=""></ww:wwWebTextBox>

But when it is rendered in the browser as an application, it gets displayed as <input type="text" ... instead of <input type="password"

What might we have set wrong?

TIA


Gravatar is a globally recognized avatar based on your email address. Re: Password not
  Michael Hogan (Ideate Hosting)
  Rick Strahl
  Aug 2, 2015 @ 11:40am
Turns out the problem was a space before the '=' sign in TextMode ="Password"

You might want to revise your code to correct that...

Michael

It works for me... Looking at the code in WebControls.prg I can't see a path through that would not render this as password characters.

The only thing I can think of is that some code somewhere changes the value of Textmode back to SingleLine. What happens if you set it to TextMode="Date"? That should set it to use date input. You can basically assign any value other than SingleLine, MultiLine and Password and that value will get set into the type of hte input field.

Best thing to debug this is to step through. In this case it's wwWebTextBox::Render() in webcontrols.prg.


+++ Rick ---



I have a client using the following object on a page:

<ww:wwWebTextBox ID="wwwtxtNewPW" runat="Server"
CssClass ="inputcontrol"
TextMode ="Password"
IsRequired="True"
ErrorMessageLocation="2"
style="font-weight: bold;" ControlSource=""></ww:wwWebTextBox>

But when it is rendered in the browser as an application, it gets displayed as <input type="text" ... instead of <input type="password"

What might we have set wrong?

TIA




Michael
www.WebConnectionHosting.com

Gravatar is a globally recognized avatar based on your email address. Re: Password not
  Rick Strahl
  Michael Hogan (Ideate Hosting)
  Aug 2, 2015 @ 09:33pm
Michael,

Yeah that's a known and documented issue.

The reason for performance since VFP string parsing speed is so terrible and it's not possible to build an efficient proper state machine for parsing that can parse text character by character. Instead I ended up with RegEx and string parsing using extraction and strtran. Accounting for spaces and other things adds tremendous amount overhead as some of the higher level functions wouldn't work, and I made the choice to not support that for this reason. The same is true BTW for the new script and template tags in Web Connection 6.

It's not great, but really shouldn't be a problem as there are proper style guidelines that point at no spaces, and if you use an auto-correcting editor (like Visual Studio, Sublime, WebStorm etc.) which generally will fix spacing as you type.

+++ Rick ---


Turns out the problem was a space before the '=' sign in TextMode ="Password"

You might want to revise your code to correct that...

Michael

It works for me... Looking at the code in WebControls.prg I can't see a path through that would not render this as password characters.

The only thing I can think of is that some code somewhere changes the value of Textmode back to SingleLine. What happens if you set it to TextMode="Date"? That should set it to use date input. You can basically assign any value other than SingleLine, MultiLine and Password and that value will get set into the type of hte input field.

Best thing to debug this is to step through. In this case it's wwWebTextBox::Render() in webcontrols.prg.


+++ Rick ---



I have a client using the following object on a page:

<ww:wwWebTextBox ID="wwwtxtNewPW" runat="Server"
CssClass ="inputcontrol"
TextMode ="Password"
IsRequired="True"
ErrorMessageLocation="2"
style="font-weight: bold;" ControlSource=""></ww:wwWebTextBox>

But when it is rendered in the browser as an application, it gets displayed as <input type="text" ... instead of <input type="password"

What might we have set wrong?

TIA





© 1996-2024