Can all input components inside a PanelGrid be made readonly.?

I have bunch of html input components inside a panel group.. I want all of them to be readOnly based on my condition.
I have an option of adding readOnly attribute to add individually to all the input components . But , i am looking for some thing more than this.. Can the complete panelGrid be made readonly like with out adding readOnly= true to components inside panel grid..
thanks.
cnu

Try this. This is not a straight forward way.
JSF Code
<h:panelGrid id='readOnlyGrid'>
               <h:inputText disabled="#{employee.test1}" value="#{employee.name}"></h:inputText>
               <h:inputText disabled="#{employee.test2}" value="#{employee.age}"></h:inputText>
               <h:inputText disabled="#{employee.test3}" value="#{employee.name}"></h:inputText>
          </h:panelGrid>
Javascript
function makeReadOnlyGrid() {
       var grid = document.getElementById('myForm:readOnlyGrid');
       var inpObjs = grid.getElementsByTagName('INPUT');
       for(var i=0;i<inpObjs.length;++i) {
            inpObjs.readOnly = inpObjs[i].disabled;
          inpObjs[i].disabled = false;
}Call this javascript function like this:
Before closing the body tagwindow.onload=makeReadOnlyGrid;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Reading all input components from PDS

    Hi experts,
    My requirement is--- based on a manufactured product (procurement type-F) , I have to retrieve  corresponding distribution product (procurement type-E) .
    For this purpose , I think I will have to read the PDS for that manufactured product (procurement type-F).
    How to read the PDS in the z-program?
    I have found a BAPI called BAPI_PDSSRVAPSIF_RECEIVELIST which reads PDS , but I am not able to use the BAPI. In other words , I am not able to get the proper data to use it , example, where to give the F type material,and where to get the corresponding E type materials..Please help..
    If you know any table in APO which contains all PDS input and output components, please suggest it..

    Ajay,
    Can you please give me the link to APO Forum , from where I can get quick replies..

  • How are all the Components available in CCMS

    All,
    I am new to MI, I have one question: Once we register all the components in MCD, Are all these components required to be enabled/made available in CCMS? If so how will that be done?
    Regards
    Sudh

    Hi
    It is not necessary to make an entry of your components in CCMS. It is an optional configuration unless you want to be alerted on some updates. These steps will be defined clearly in your configuration docs.
    regards
    Arun

  • I've installed CS6 and web Premium on a Mac running 10.9.5, and Dreamweaver,Flash and Illustrator wont launch.  All other components work normally.  In Activity monitor it says Adobe switchboard failed to respond.  Can anyone help solve this issue?

    I've installed CS6 and web Premium on a Mac running 10.9.5, and Dreamweaver,Flash and Illustrator wont launch.  All other components work normally.  In Activity monitor it says Adobe switchboard failed to respond.  Can anyone help solve this issue?

    Release: 4/25/2012
    http://support.amd.com/us/gpudownload/windows/Pages/radeonmob_win7-64.aspx

  • How can I disable all the components in a JPanel?

    I want to disable all the components( button, text field ) in a JPanel. I know I can search the panel and disable each of its children component recursively. Is there a better way to do this?

    I want to disable all the components( button, text field ) in a JPanel.You haven't defined what you mean by "disable".
    If you mean you want the component to be repainted in its disabled state, then you would need to set the property of each individual component to disable, which would imply some kind of recursion.
    If you just want to prevent components from receiving key events and mouse events, then you can use a glass pane or maybe a panel with an overlay layout that contains a non-opaque panel that intercepts all events.

  • Can validations  be done inside  FOR ALL and can we use conventional insert

    Hi All,
    I have to move millions of data from one 'table1' to ' table 2'. Table 2 is equal Table 1 columns+ an extra column . data for the extra column is retrieved from table 3 using foreign keys of table 3 and table 1.how shud i do it using bulk collect and for all insert... I have given the sample code for my problem..
    TABLES:
    table 1 columns: emp_name, emp_id , emp_add, emp_txt
    table 2 columns: emp_name, emp_id, emp_add,emp_txt,emp_ref
    table 3 column: emp_txt,emp_ref,emp_size
    CODE:
    create or replace
    procedure bulk_proc IS
    v_emp_ref varchar2(20);
    cursor cur_t1 is
    select * from table 1;
    TYPE bulk_t1 is table of cur_t1%rowtype;
    v_bulk_t1 bulk_t1;
    cursor cur_t3 is
    select a.emp_txt,b.emp_ref from table 1 a, table 3 b where a.emp_txt = b.emp_txt;
    TYPE bulk_t3 is table of cur_t3%rowtype;
    v_bulk_t3 bulk_t3;
    begin
    open cur_t1;
    open cur_t3;
    loop
    fetch cur_t1 bulk collect into v_bulk_t1 ;
    exit when v_bulk_t1.count=0;
    fetch cur_t3 bulk collect into v_bulk_t3 ;
    exit when v_bulk_t3.count=0;
    for i in v_bulk_t1.first..v_bulk_t1.last loop
    for j in v_bulk_t3.first..v_bulk_t3.last loop
    if (v_bulk_t1(i).emp_txt = v_bulk_t3(j).emp_txt) then
    v_emp_ref := v_bulk_t1(i).emp_txt ;
    else
    v_emp_ref := null;
    end if;
    for all m in 1..v_bulk_t1.count
    insert into t2(emp_name, emp_id, emp_add,emp_txt,emp_ref) values
    (v_bulk_t1(m).emp_name,
    v_bulk_t1(m).emp_id,
    v_bulk_t1(m).emp_add,
    v_bulk_t1(m).emp_txt,
    v_emp_ref);
    end loop;
    end loop;
    end loop;
    close cur_t3;
    close cur_t1;
    end bulk_proc;
    can we do validations inside FOR ALL command..i am getting error.is it possible to use conventional insert inside 'for all command' or do we have to use only 'insert ti values v_bulk_t1(i)' like that....Do i have to use only conventional cursor for this problem?...please help me..

    1.I want to push 18 million records from one table to another table with validations....Can i use ur code for it? You can always test how the example Tubby provided works in your environment.
    Usually a single SQL statement is the right way to go.
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:760210800346068768
    (memorize the mantra)
    Another option you have is to use CTAS (Create Table ... As Select ...) or use the APPEND hint while inserting.
    Make sure first that you understand how it works:
    You can find many examples including clear explanations by doing a search on http://asktom.oracle.com
    2.Can we do normal insert and validations inside FOR ALL insert loop... Afaik, you cannot. ( But it wouldn't surprise me if Michael comes up with an example using dynamic SQL ;) )
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/forall_statement.htm#LNPLS01321
    Alternatively you should investigate if it's possible to adjust your query/queries in such a way so that only records that you want to insert are selected.
    In other words: use the WHERE-clause from your query to validate rightaway instead of selecting records thatyou don't want/need at all.
    3.How variables are stored in BULK COLLECT ..Is it storing pattern differs from cursor.......Sorry, I don't understand what you mean here.
    4.In which scenarios we should not use COLLECTIONS ...Please help me...That's totally dependent of the scenario/requirement.
    Example:
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:1058232381458

  • How can i open the directory/​folder and read all the files inside it in order and then close it?

    How can i open the directory/folder and read all the files inside it in order and then close it? any example would be nice.
    thanks

    In the File I/O>>Advanced File Functions Palette is a function named "List directory". This function will give you two arrays. One contains the names of all subdirectories the other the names of all files. If you want to sort them by name use the array sort function. If you want to sort them by another attribute use the File/Directory Info function to get more data. Use a cluster which contains the attribut to sort and the original index of the name. Then sort this array.
    Waldemar
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • All my components are grayed out in multisim11. Path to my config file in global preferences is also grayed out, can't change to standard cfg

    all my components are grayed out in multisim11. Path to my config file in global preferences is also grayed out, can't change to standard cfg
    Solved!
    Go to Solution.

    Hi Escapermark,
    Have a look at these knowledge base articles, the first one should fix the gray out problem:
    http://digital.ni.com/public.nsf/allkb/609A763289E6E81D8625739F0052151F
    http://digital.ni.com/public.nsf/allkb/2719D00E36A4D53A8625721300685B3F
    http://digital.ni.com/public.nsf/allkb/B3D720348D55D0C5862575BA00560908?OpenDocument
    Tien P.
    National Instruments

  • How can get all the components used on the current page

    how can I get list of all components being used on the current page using javascript. I have tried CQ.WCM.getComponentList(CQ.WCM.getPagePath()) but this seems to list all the components available.
    Environment CQ 5.5 Update 1, Widnows 7

    You have to remember that once you are in JS, you are only really able to retrieve markup or representations of the DOM.  The markup is the result of a combination of components, which is technically a "server only" concept.  Components are just a way for CQ to organize executable code, so once a page is rendered a component isn't really a thing.  The closest thing I can think of is to list all of the DIVs that represent a component wrapper that are on the page, but this is error prone and clunky.  You could also make AJAX calls back to the server to retrieve a list of the components by node name, but that approach would not return synthetic resources (ones that render, but do not have a node representing them).
    Why are you trying to do this?  Maybe someone has a better idea, but this has a bad smell to me.

  • How can I list all available  variables inside a movieClip

    I have a lot of movieclips in my file and each movieclip has
    its own set of variables.
    There is any way to trace all available variables inside any
    movieclip? I mean, how can i know what variables and their values
    are inside a movie clip!
    Tks,

    if your movieclip has instance name mm, you can use:

  • All input time series to which you can distribute are fixed

    Hi Experts,
    I ran one macro in the background. Usually it runs without any different message but this time I got following message
    "All input time series to which you can distribute are fixed". Macro has executed successfully & data is also correct but it has taken lots of time to finish. When I checked I got the above message.
    Can anyone help out to find the exact meaning of this message?
    When I digging around the message I got the following explinantion but didn't get the meaning.
    Diagnosis
    All aggregrated time series objects of an aggregate time series are fixed. As such, a change to the characteristic value at aggregate level cannot be disaggregated on any of the aggregated time series objects.
    Procedure
    Remove at least one of the fixings of the aggregated time series objects.
    Please help me to find the solution to avoid the delay in job.
    Regards
    Sujay

    Hi Sujay,
    I think you have some hierarchy in DP .Ex.one product @ diff locations and you have fixed the values of the key fig say Sales Demand at all locations and there you are trying to change some value at product level which due to fixing is not getting distributed/disaggregated on low levels of locations and hence you are getting this message.
    Please refer SAP Note 609074 & 687074  which will be very helpful to you.
    Regards,
    Digambar

  • I hAVE A NEW IMAC,   CS 5.1 will not open, says it does not have all its components---can you help?

    I have a new iMac,   CS5.1 will not open,  says all the components are not there,  can you help?

    We need the exact error message, info on how you installed it, exact system specs etc..
    Mylenium

  • HT2731 i hav iphone and i restart it and delete all the files inside how can i start again my iphoe it say i need a valid sim with no pin lock to activate it again pls help

    i hav iphone and i restart it and delete all the files inside how can i start it again it say i need a valid sim with no pin lock to activate iphone again

    ICCID unknown is a critical failure, usually caused by hacking or jailbreaking the phone. It can not be fixed. The phone will need to be replaced.

  • How can I Print a JPanel including all added Components?

    Hello dear saviours,
    I have a JPanel object which is responsible for displaying a Graph.
    I need to Print the Components of this JPanel as close to what they look like to the user as possible.
    I thought about casting the JPanel into an Image of some kind, but couldn't find anything but how to add am Image to a JPanel (God damned search engines :-).
    But wait, this gets more interesting!
    I need to have control over the scale of the Printed matterial.
    I want the option to choose between a single page and dividing the drawing the JPanel displays into Multiple-Pages.
    In both cases I need full details of all the data (Nodes, Arcs, Text describing the various Nodes and Arcs names or type, etc.).Keeping the sizes of all these components is also important (that means, I don't want the nodes to be tinny-winny and the Fonts to be twice as large as the nodes and so on...).
    Attached is the code of the PrintUtillity class I created as an API for printing the JPanel data:
    package ild;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.print.*;
    /** A simple utility class that lets you very simply print
    * an arbitrary component. Just pass the component to the
    * PrintUtilities.printComponent. The component you want to
    * print doesn't need a print method and doesn't have to
    * implement any interface or do anything special at all.
    * <P>
    * If you are going to be printing many times, it is marginally more
    * efficient to first do the following:
    * <PRE>
    * PrintUtilities printHelper = new PrintUtilities(theComponent);
    * </PRE>
    * then later do printHelper.print(). But this is a very tiny
    * difference, so in most cases just do the simpler
    * PrintUtilities.printComponent(componentToBePrinted).
    * 7/99 Marty Hall, http://www.apl.jhu.edu/~hall/java/
    * May be freely used or adapted.
    public class PrintUtilities implements Printable {
    private Component componentToBePrinted;
    public PrintUtilities(Component componentToBePrinted) {
    this.componentToBePrinted = componentToBePrinted;
    public static void printComponent(Component c) {
    new PrintUtilities(c).print();
    public void print() {
    PrinterJob printJob = PrinterJob.getPrinterJob();
    printJob.setPrintable(this);
    if (printJob.printDialog())
    try {
    printJob.print();
    } catch(PrinterException pe) {
    System.out.println("Error printing: " + pe);
    public int print(Graphics g, PageFormat pageFormat, int pageIndex) {
    if (pageIndex > 0) {
    return(NO_SUCH_PAGE);
    } else {
    Graphics2D g2d = (Graphics2D)g;
    // double scale = 2;
    // g2d.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
    double scaleFactor = java.lang.Math.min((double)this.componentToBePrinted.getSize().width/(double)(pageFormat.getImageableWidth()),
    (double)this.componentToBePrinted.getSize().height/(double)(pageFormat.getImageableHeight()));
    g2d.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
    g2d.scale(1.0/scaleFactor,1.0/scaleFactor);
    // disableDoubleBuffering(componentToBePrinted);
    componentToBePrinted.paint(g2d);
    enableDoubleBuffering(componentToBePrinted);
    return(PAGE_EXISTS);
    /** The speed and quality of printing suffers dramatically if
    * any of the containers have double buffering turned on.
    * So this turns if off globally.
    * @see enableDoubleBuffering
    public static void disableDoubleBuffering(Component c) {
    RepaintManager currentManager = RepaintManager.currentManager(c);
    currentManager.setDoubleBufferingEnabled(false);
    /** Re-enables double buffering globally. */
    public static void enableDoubleBuffering(Component c) {
    RepaintManager currentManager = RepaintManager.currentManager(c);
    currentManager.setDoubleBufferingEnabled(true);

    That's a nice utility, but my JPanel gets truncated when printed. Is there a way to print a JPanel in full.

  • Password Remember Button does not function; Can't input 3rd Party Passwords for Social Networks/Emails.

    My "Remember" button doesn't work. Simple as that. The "Not Now"
    Button still works, and closes the pop-bar. Remember doesn't do anything.
    [Exception... "'User canceled master password entry, login not added.' when calling method: [nsILoginManagerStorage::addLogin]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: file:///C:/Program%20Files/Mozilla%20Firefox/components/nsLoginManager.js :: anonymous :: line 445" data: no]
    Occurs when trying to input 3rd Party extension passwords.
    I have no master password set, I have also read the "Password not remembered topic", and it didn't help.
    Error Console yields this:
    "'''Warning: The 'charCode' property of a keyup event should not be used. The value is meaningless.
    Source File: https://support.mozilla.com/en-US/questions/new?product=desktop&category=d6&search=Password+Remeber+Button+does+not+function%3B+Can%27t+input+3rd+Party+Passwords+for+Social+Networks%2FEmails.&showform=1#question-form
    Line: 0'''"

    Okay, I have started Firefox in Safe Mode, and the Remember button still didn't work. After checking the error console, It had the following message again:
    "Error: uncaught exception: [Exception... "'User canceled master password entry, login not added.' when calling method: [nsILoginManagerStorage::addLogin]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: file:///C:/Program%20Files/Mozilla%20Firefox/components/nsLoginManager.js :: anonymous :: line 445" data: no]"
    After I Evaluated it (In the error console) it gave me a slightly different version:
    "Error: missing ; before statement
    Source File: javascript:%20Error:%20uncaught%20exception:%20[Exception...%20"'User%20canceled%20master%20password%20entry,%20login%20not%20added.'%20when%20calling%20method:%20[nsILoginManagerStorage::addLogin]"%20%20nsresult:%20"0x8057001e%20(NS_ERROR_XPC_JS_THREW_STRING)"%20%20location:%20"JS%20frame%20::%20file:///C:/Program%2520Files/Mozilla%2520Firefox/components/nsLoginManager.js%20::%20anonymous%20::%20line%20445"%20%20data:%20no]
    Line: 1, Column: 8
    Source Code:
    Error: uncaught exception: [Exception... "'User canceled master password entry, login not added.' when calling method: [nsILoginManagerStorage::addLogin]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: file:///C:/Program%2"
    I read the Troubleshooting extensions & Themes, but It didn't help.
    When I tried to read "http://kb.mozillazine.org/Password_Manager" I get a page that says:
    "ERROR
    The requested URL could not be retrieved
    While trying to retrieve the URL: http://kb.mozillazine.org/Password_Manager
    The following error was encountered:
    * Connection Failed
    The system returned:
    (110) Connection timed out
    The remote host or network may be down. Please try the request again.
    Your cache administrator is root. "
    Also, this error occurs in ALL 3rd Party extensions. It can't log me into E-Mail accounts, Facebook, Twitter, anything. The error message has a window title of [JAVASCRIPT APPLICATION] if that says anything.

Maybe you are looking for

  • Help Iphone 5 power button !!

    Hi, I got my iphone 5 just before christmas and just recently the power button has stopped working...If i go to an apple store what are the chances of them replacing it or even fixing it ? Thanks

  • IPhone syncs same 213 songs  and same 21 photos every time

    Lately, every time I plug my iPhone to my computer, the same 213 songs and the same 21 photos sync every time. I have the option checked to convert songs to 128 kbps AAC to free up more room on my phone, but it is annoying because I have to wait for

  • How to create an acitivty inside a Case

    Dear All, Sorry to bother. We are using CRM 7.0 SAP GUI for Case Management and Activity Management. Use t-code SCASE to enter Case Management, to create a new case, save it. Now we are trying to create a new activity inside that case. How can we do

  • Tables in dropdowns cut off when printing

    In a RoboHelp (X5) HTML project, one of our topics has some fairly long tables in dropdowns. When we print these topics (either from the preview or from the compiled CHM), any table in a dropdown that crosses a page break is invisible until the point

  • Standard smart forms

    hi All, Pls give me the details that how to use system defined smart forms and how to copy and change standard smart forms in SAP 4.7EE Thanks, Nitin