Forum  Commercial Foru...  Commercial Foru...  Custom XSLT
Previous Previous
 
Next Next
New Post 4/30/2012 12:50 AM
  Valter.Venturini
131 posts
5th Level Poster


Custom XSLT 

 Hi,

I need to customize my XSLT file in order to add some additional functionality to a textbox (similar to an example on KB).

I have created a new skinable textbox named ITSTextBox with custom style ITSTextBoxSkin.

I have changed the XSLT adding a template under the tag:   <xsl:templatematch="WC:Tags.TextBox[@Attr.CustomStyle='ITSTextBoxSkin' and not(@Attr.Multiline)]"mode="modContent">

I have already registered the control in my web.config.

I do not know why, when I run my form with one textbox in it, the form does not show me the textbox. Is it because the xslt file is wrong? If I remove the ITSTextboxSkin in my custom style, the textbox works fine, but it loads the default XSLT.

6.4.0d .NET 4 VS2010

Thanks in advance,

Daniele


R&D Team - Italstudio
 
New Post 4/30/2012 9:58 AM
  palli
14323 posts
1st Level Poster




Re: Custom XSLT 

Hi Daniele,

Please email to support a demo project with your custom control inside and we will take a look. Remember to include in that email the full Http reference to this thread and also please add a post here when you have sent the email.

The email address for support can be found within my signature below.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 5/2/2012 2:01 AM
  Valter.Venturini
131 posts
5th Level Poster


Re: Custom XSLT 

 Hi palli,

thank you for the reply, I sent you a sample this morning.

Thanks again,

Daniele


R&D Team - Italstudio
 
New Post 5/2/2012 2:48 PM
  palli
14323 posts
1st Level Poster




Re: Custom XSLT 

Hi Daniele,

I confirm that the sample has been received to the support mailbox and we will process it at the first available time.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 5/2/2012 5:49 PM
  palli
14323 posts
1st Level Poster




Re: Custom XSLT 

Hi Daniele,

I have taken a look at your sample and it seems that the main reason for your problems is that you don't place the Skin attribute on the custom TextBox class, telling it to use the skin you are modifying. If the Skin attribute is missing, the control will default to the skin of it's parent class, the TextBox, and in there it can't find any matching template for your custom style, so nothing is rendered for the textbox.

You can fix this by modifying your class declaration to:

    [Skin(typeof(ITSTextboxGenericoSkin ))]
    [Serializable()]
    public class ITSTextboxGenerico : TextBox
    {
        public ITSTextboxGenerico()
        {
            this.CustomStyle = "ITSTextboxGenericoSkin";
        }
    }

In addition, please note that the web.config file of your TEST project did not have the control registered. Secondly, the javascript file within the skin of your control does not have the correct properties set for Presentation and PresentationRole. Make sure to check that, else you will get errors when your JavaScript is called.

Hope this helps,

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
Previous Previous
 
Next Next
  Forum  Commercial Foru...  Commercial Foru...  Custom XSLT
.NET HTML5 Web, Cloud and Mobile application delivery | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2012 Visual WebGui®       Visual WebGui weblog on ASP.NET Gizmox Blog Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS