How to apply style to netui control using JS?

I need to change background of netui textbox on error input.
Code (JS) for regular HTML control is:
field.className = field.className.addClass("error");
However, it doesn't work for netui controls.
Any ideas?

Hi,
If you are using NetUI Text form fields like textbox, you should also assign tagId to these filed to make is accessible from JavaScript
example:
<netui:form action="test" tagId="frm" >
<netui:textBox dataSource="{actionForm.Name}" styleClass="texta" tagId="textbox" />
</netui:form>
Then you can refer this field in JavaScript as follows
document[netui_names.frm][netui_names.textbox].className="textError"
In these way you can manipulate your NetUI Tags.
Cheers,
Tejas Joshi :-D

Similar Messages

  • How to apply style to submit button

    Hi All,
    I am developing an application in struts where I have multiple buttons on a single form. Each button corresponds to different action to be executed, and to achieve this I have used DispatchAction.
    Since I need to submit the data, I am looking for some ways through which I can put some style on submit button, such as putting an image over the submit button,giving it some border, some color and so on. I want to do this through CSS or if not possible through CSS then as inline style.
    I am using struts-html.tld tag library to render all the HTML controls.
    Any idea how to put images over submit buttons, or if putting an image is not possible then how to have style for it so that the look of submit button changes and the user feels as if it is a graphic button.
    Any help is appriciated.
    Thanks.

    You do realise there is an <html:image> tag which
    generates the html graphical submit button (ie <input
    type="image">) ?
    There are two tags in struts:
    <html:img> - generates an image tag: <img src="...">
    <html:image> - generates a graphical submit buttonYea, I do know this. But the problem is I don't have one submit button in my page. There are mroe than one buttons and each button calls a different method of the Action class. I could not get a way to pass the parameter name and parameter value using
    <html:image> tag.
    To be more clear, I need CRUD operations in one page and they all refer to one Action class. If I use html:image tag, I can't call seperate functions as it will then call the execute method. Also I don't want to have any javascript to call the relevant method from the Action class.
    Is there any way out? I am not a pro in struts, just s beginner, so any help is more than appreciated.
    Thanks.

  • How can I reference a winforms control using a variable in Powershell?

    I have a powershell winform that has a lot of text boxes, but for the sake of this post, lets say I have 5. I want to loop through the 5 text boxes to see if their text property is empty. If the textbox contains something, I want to add the text value to
    an array. Here's an example of what I'm trying to do.
    textbox1.text = "Red"
    textbox2.text = ""
    textbox3.text = "Blue"
    textbox4.text = ""
    textbox5.text = ""
    $MyArray = @()
    for ($i = 1; $i -le 5; $i++) {
    If ($textbox[$i].text -ne "") {
    $MyArray += $textbox[$i].text
    I realize the textbox object is not an array so this code will not work. I guess the simple question is, How can I reference a set of static controls using a variable without having to do something like this
    [object[]]$textboxes = New-Object System.Windows.Forms.TextBox
    For ($i = 1; $i -lt 5; $i++) {
    $textboxes += New-Object windows.forms.textbox
    $textboxes[$i].DataBindings.DefaultDataSourceUpdateMode = [System.Windows.Forms.DataSourceUpdateMode]::OnValidation
    $textboxes[$i].Name = $textboxes[$i]
    $BoxItems.Controls.Add($textboxes[$i])

    Hi D-Dub,
    here are two ways to retrieve the text value of $Textbox1:
    $Textbox1.Text
    (Get-Variable "Textbox1").Value.Text
    Now what could you do with the second way, inside a loop, I wonder ... ;)
    Cheers,
    Fred
    There's no place like 127.0.0.1

  • How to apply style sheet (.css) in Weblogic directory listing

    Hi,
    We are migrating a directory listing application from Apache to Weblogic.
    Earlier we did this by Apache httpd.conf entry like below :
    <Directory "/opt/apache/httpd-2.1.9/htdocs/Myreportfolder">
    IndexOptions FancyIndexing FoldersFirst NameWidth=* XHTML
    IndexOrderDefault Descending Date
    IndexStyleSheet "/css/style.css"
    </Directory>
    /opt/apache/httpd-2.1.9/htdocs folder has all it's usual resource files.
    We were able to see documents in "Myreportfolder".
    Now we have moved to Weblogic and using virtual directory mapping as below and we are trying to achieve the same thing:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <wls:weblogic-web-app xmlns:wls="http://www.bea.com/ns/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://www.bea.com/ns/weblogic/weblogic-web-app http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">
    - <wls:container-descriptor>
    <wls:index-directory-enabled>true</wls:index-directory-enabled>
    <wls:index-directory-sort-by>LAST_MODIFIED</wls:index-directory-sort-by>
    </wls:container-descriptor>
    - <wls:virtual-directory-mapping>
    <wls:local-path>/Myreportfolder</wls:local-path>
    <wls:url-pattern>/*</wls:url-pattern>
    </wls:virtual-directory-mapping>
    <wls:context-root>/getreports</wls:context-root>
    </wls:weblogic-web-app>
    We are able to view the reports but we do not get look-and-feel of Apache like directory listing.
    but we encounter below issues:
    1) File/Folder icons are not visible - we want to use style sheets in http header from the response that is returned from weblogic server
    2) Filename is limited to 29 characters when it is showing
    3) Files are not sortable as Descending order - we sorted using tag <wls:index-directory-sort-by>LAST_MODIFIED</wls:index-directory-sort-by> but the latest file is shown at the last
    We are thinking that Weblogic must be having some configuration like Apache httpd.conf where we can apply style sheets (css ).
    We would appreciate af anyone can provide better insight into the issue.
    or is it possible to extend weblogic.servlet.fileservlet class to serve this purpose.
    Thanks & regards,
    Rabi

    Hi Vikash,
    Check the below links which will you idea on the same.
    Stylesheet for WDA without integrating in SAP Portal
    Apply custom css to WebDynpro application
    Thanks
    KH

  • How to apply style sheet to design page

    hi all,
    i have a discussion,
    how to apply a style sheet to design page in webdynpro.
    thanks
    vikash

    Hi Vikash,
    Check the below links which will you idea on the same.
    Stylesheet for WDA without integrating in SAP Portal
    Apply custom css to WebDynpro application
    Thanks
    KH

  • How to apply style sheets to table layout

    hi i want to apply styles to my table layout region, i gave style sheets which are in OAF myhtml\OA_HTML\cabo\styles but i dint find any changes in my table layout, can any give one give me an idea of how to do it....

    Check the OAF personalization guide for details on custom CSS. It won't be possible for me to summarize the whole thing here.
    --Shiv                                                                                                                                                                                                                                                                               

  • How to create subscreens in tabstrip control using  module pool

    hai experts,
    can u plz give me step by step procedure to create subscreens in tabstrip control using  module pool,

    hi,
    You can check this program
    <b>  DEMO_DYNPRO_TABSTRIP_LOCAL </b>
    This will help you in understanding the concept and how to create subscreens.
    Regards
    Nishant

  • How to set style italic when i use ole2 to deal with excel?

    hi ,every body.
    i received a requirement today,in which user want to set style italic?
    pls tell me how can i do it, tks!

    Use
    SET PROPERTY OF GS_FONT 'Italic' = '1' .

  • How to set value for Dropdown control using Querystring filter wepart

    Hi,
    I have a dropdown in my customized list form and need to set the value for the dropdown control using query string filter web part.
    I am able to set value for textbox control using Query String Filer web part.
    But, since the dropdown values are not populated on form load, the value is not set for dropdown control.
    How to load the values in dropdown control on form load and set a value using Query String filter webpart?
    Thanks,
    dhijit

    Hi,
    According to your post, my understanding is that you want to filter choice field using Query String Filter web part.
    To filter using query string filter web part, we can set the default value for the choice field in the query string filter web part panel as below, then connect to the list.
    Now it would be filter by the value you have set.
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • How to apply styles to a column in a datatable based on a condition

    It is like, if some condition is satisfied, i want to apply some style to a column else i have to apply some other style to that column

    HI ,
    Use el expressions to reolve this problem.........
    http://abakalidis.blogspot.com/2007/09/adf-tables-changing-colour-of-negative.html
    go through this link ....it may be usefull to you ......
    Regards
    HAri

  • How to apply Style Sheets to all ComboBoxItems.

    Here in the following code i have referred to stylesheet for each data item. Help me how I can set a stylesheet for all comboboxitems only one time.
    <ComboBox 
                Foreground="Black"
                BorderBrush="Black"
                HorizontalAlignment="Left" Margin="108,280,0,0" VerticalAlignment="Top" Width="200" Style="{StaticResource ComboBoxStyl}">
                <ComboBoxItem Content="One" IsSelected="True" Style="{StaticResource ComboBoxItemStyle1}"/>
                <ComboBoxItem Content="Two" Style="{StaticResource ComboBoxItemStyle1}"/>
                <ComboBoxItem Content="Three" Style="{StaticResource ComboBoxItemStyle1}"/>
                <ComboBoxItem Content="Four" Style="{StaticResource ComboBoxItemStyle1}"/>
                <ComboBoxItem Content="Five" Style="{StaticResource ComboBoxItemStyle1}"/>
            </ComboBox>

    Hi MohanrajKrishnamoorthy,
    I will recommend you create the ComboBox like the following:
    <ComboBox
    Foreground="Black"
    BorderBrush="Black"
    HorizontalAlignment="Left" Margin="108,280,0,0" VerticalAlignment="Top" Width="200">
    <ComboBox.ItemTemplate>
    <DataTemplate>
    //Add style or control in here
    </DataTemplate>
    </ComboBox.ItemTemplate>
    <!--<ComboBoxItem Content="One" IsSelected="True" Style="{StaticResource ComboBoxItemStyle1}"/>
    <ComboBoxItem Content="Two" Style="{StaticResource ComboBoxItemStyle1}"/>
    <ComboBoxItem Content="Three" Style="{StaticResource ComboBoxItemStyle1}"/>
    <ComboBoxItem Content="Four" Style="{StaticResource ComboBoxItemStyle1}"/>
    <ComboBoxItem Content="Five" Style="{StaticResource ComboBoxItemStyle1}"/>-->
    </ComboBox>
    After that all the ComboBox item will use the same style as you define in the DataTemplate.
    Best Regards,
    Amy Peng
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to do a version / release control using APEX?

    Hi,
    I have APEX 4.2 connected thru pl/sql gatewat , 11gr2 DB and using theme 24 cloudy.
    We are currently using forms/reports for our ERP and we are thinking of replacing forms with APEX. We have source code control software that we use to update the development environment to QA then production. This was easy since all programs are represented by physical files. If you have 100 screens you would have 100 files more or less.
    In APEX since everything is stored on the DB how do you control which changes should go to QA and production eventually. How do you make a cutoff if you want to build a new release/baseline/patch/service pack?
    Thanks in advance!

    Hi kvsinfo
    You are making terrific sense, Apex is not only not-version control friendly, but makes version control an almost impossible task.
    Change just one line in a template or page javascript and you will end with lots of differences when committing your changes. It is very difficult to revision control specific objects (like pages or LOVs.) And if you import an application under a different application ID (sometimes it is necessary), all the internal IDs change and when you commit your changes you will end up with hundreds of differences.
    I am also looking for a better way but I am almost convinced that there is none. Apex 4.2 has lots of new functionalities but as far as I know nothing was done to improve integration with revision control systems. It is like they don't care about it, which is frustrating because revision control is extremely important for any system of some complexity. I say this as a constructive criticism.
    We have a hard time here controlling versions of Apex applications. The methodology we use is that an Apex application is a unit. We don't control the versions of individual pages or other objects. We try to promote whole applications across environments whenever possible, by coordinating efforts among developers. If for any reason, for example, we need to deploy change A in page 10 to QA but not change B in page 20, we either:
    - Undo the changes in page 20 and export the app, then apply the changes again
    - Manually edit the export file to remove the undesired change
    (at this point someone could say, just promote page 10; but this is a simple example, in most cases dozens of changes are made to an application across multiple pages, including shared objects, and only a handful should not be promoted)
    This is terrible, terrible, prone to errors and time-consuming, but I don't see any other way of doing it.
    And this is a simple scenario, there are other much complex scenarios. I also would like to hear from other people how they manage this.
    Luis

  • How to apply style to partial text within a tag in xml file

    I have created a webpage using Dreamweaver CS4 Spry Regions. Everything is functioning as expecting, however now I need to apply a style to part of the text. Every occurance of the company name needs to be in italics - the problem is that the company name appears within different parts of the text within a set of tags.
    http://www.certifiedangusbeef.com/private1/sales/facts/index.php
    ie - <description> this is my company name which must appear in italics</description>
    In this example, only "company name" needs to be italicized. We have created an XSL file that applies the italics properly when the XML file is viewed in the browser. But it does not have any effect on the final web page - as though spry is blocking the XSL or we've missed a step in linking all the files together.
    Here's the XSL code:
    <?xml version="1.0" encoding="utf-8"?><!-- DWXMLSource="facts.xml" --><!DOCTYPE xsl:stylesheet  [
    <!ENTITY nbsp   "&#160;">
    <!ENTITY copy   "&#169;">
    <!ENTITY reg    "&#174;">
    <!ENTITY trade  "&#8482;">
    <!ENTITY mdash  "&#8212;">
    <!ENTITY ldquo  "&#8220;">
    <!ENTITY rdquo  "&#8221;">
    <!ENTITY pound  "&#163;">
    <!ENTITY yen    "&#165;">
    <!ENTITY euro   "&#8364;">
    ]>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:template match="node()|@*">
            <xsl:copy>
                <xsl:apply-templates select="node()|@*"/>
            </xsl:copy>
        </xsl:template>
        <xsl:template match="text()[ancestor::description]" name="replace">
            <xsl:param name="pString" select="."/>
            <xsl:choose>
                <xsl:when test="contains($pString,'Certified Angus Beef ®')">
                    <xsl:value-of select="substring-before($pString,'Certified Angus Beef ®')"/>
                    <i>Certified Angus Beef<sup> &reg;</sup> </i>
                    <xsl:call-template name="replace">
                        <xsl:with-param name="pString"
                        select="substring-after($pString,'Certified Angus Beef ®')"/>
                    </xsl:call-template>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:value-of select="$pString"/>
                </xsl:otherwise>
            </xsl:choose>
        </xsl:template>
        <xsl:template match="text()[ancestor::item]" name="replace1">
            <xsl:param name="pString" select="."/>
            <xsl:choose>
                <xsl:when test="contains($pString,'Certified Angus Beef ®')">
                    <xsl:value-of select="substring-before($pString,'Certified Angus Beef ®')"/>
                    <i>Certified Angus Beef<sup> &reg;</sup> </i>
                    <xsl:call-template name="replace">
                        <xsl:with-param name="pString"
                        select="substring-after($pString,'Certified Angus Beef ®')"/>
                    </xsl:call-template>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:value-of select="$pString"/>
                </xsl:otherwise>
            </xsl:choose>
        </xsl:template>
    </xsl:stylesheet>

    An element attribute is set with the method
    setAttribute(String name,
                             String value)or the
    setAttributeNode(Attr newAttr)method.

  • How to apply style to multiple links?

    I'm a newbie here, so maybe this is a simplistic question.  I am having trouble applying a color style to multiple links on a webpage at the same time.  I have a page setup with a layout similar to the Drudge Report, which posts href links separated by horizontal rule lines.  I want to apply a color style to these links, but I'm finding I have to select each link individually in design mode to apply the style.  When I select multiple links in design mode, the color doesn't apply to the text.  It's time consuming to select each link individually.  I can do this easily in Microsoft Visual Web.  How can I do it in Dreamweaver?

    The best way is to put all related links into a division. 
    Let's say you want to have red links in your #header and white links in your #footer which has a black background.
    CSS, set up two sets of link styles:
    #header a {text-decoration:none}
    #header a:link {color:red}     /**unvisited**/
    #header a:visited {color:gray} /**visited**/
    #header a:hover,               /**on mouse over**/
    #header a:active,              /**on click**/
    #header a:focus                /**on tab key**/
        {text-decoration:underline}
    #footer {background: #000;}
    #footer a {text-decoration:none}
    #footer a:link {color:white}
    #footer a:visited {color:yellow}
    #footer a:hover,
    #footer a:active,
    #footer a:focus 
        {text-decoration:underline}
    HTML:
    <div id="header">
    <a href="some-link.html">Link in the header</a> |
    <a href="some-link.html">Link in the header</a> |
    <a href="some-link.html">Link in the header</a> |
    </div>
    <div  id="footer">
    <a href="some-link.html">Footer link</a> |
    <a href="some-link.html">Footer link</a> |
    <a href="some-link.html">Footer link</a> |
    </div>
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com/

  • How to play SWF with AxShockwaveFlash control using a stream rather than a file path?

    My WinForm app downloads and plays SWF files from my server. Currently, I have an object of type AxShockwaveFlash called "flash" display the movie. The code I use to load the SWF is:
    flash.Movie = "http://example.com/file.swf"
    The URL is generated dynamically by the module based on what the user wants to watch.  I'd like to know how can I load the SWF using a memory stream rather than a file path? I have already configured my server to process the url and return the contents
    of the file. What I don't know is how to read those contents within my WinForm application as a stream instead of the default which is to just provide a URL path to the movie.
    For instance I think I can use the Net.HttpWebRequest object to make an HTTP request, and read the response contained in the resulting Net.HttpWebResponse into a stream, but I have no idea what I could do to that stream to feed it to AxShockwaveFlash
    A very similar question was posed on
    stackOverflow but I cannot make sense of the answer (I'm quite inexperienced).
    I'd appreciate your help,
    -Patrick

    Hi Patrick,
    Since this issue is mainly related to a control which belongs to third-party, I would recommend you consider posting this issue on the same site like the following thread because issues related to third-party are not supported.
    https://forums.adobe.com/thread/717505?tstart=0
    Regards.
    Carl
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for