Code structure issue in Mojarra

Hi all,
we are designing a PhaseListener that dynamically can disable UIInput elements. However, the setDisabled() method applies only on the implementation classes, so I have to do something like this:
if (child instanceof HtmlInputTextarea) {
     ((HtmlInputTextarea)child).setDisabled(disabled);
} else if (child instanceof HtmlInputText) {
     ((HtmlInputText)child).setDisabled(disabled);
} else if (child instanceof HtmlInputSecret) {
     ((HtmlInputSecret)child).setDisabled(disabled);
} else if (child instanceof HtmlSelectBooleanCheckbox) {                              ((HtmlSelectBooleanCheckbox)child).setDisabled(disabled);
}Am I overlooking something here or is it just stupidity from the JSF team to not supply a common interface for the editable Html components to provide common methods?
Thank you,
Steven

There is a common interface for editable components. It's called ValueHolder.
You can simplify your code by doing:
   if (child instanceof ValueHolder) {
       child.getAttributes().put("disabled", Boolean.TRUE);
   }The attributes Map call will call through to the java property, if present (if not present, it's stored locally).
Also, it would be appreciated if inflammatory remarks were omitted from future posts. They are not necessary.

Similar Messages

  • Org structure issue

    Hi,
    I have a question related to an org structure issue. Let me explain by taking an example:
    The Org set up we have goes like this, let A1 be the VP of a particular division, he has a director B1 reporting to him. B1 has four different employees C1, C2, C3 and C4 reporting to her. The interesting part here is, C1 and C2 belong to a different cost center (say CC1) and C3, C4 belong to a different one (CC2). Both CC1 and CC2 are managed by B1. The tricky part is CC1 comes under the VP 'A1' while CC2 does not have any supervisior above. B1 is the final supervisor.
    The problem is, when I run the Org report to find all the employees coming under A1, C3 and C4 also show up. How to correct this?
    In our system, the org structure is driven by position of the employee and not by the cost center. However we have an relationship record (A011) in HRP1001 between the Org unit of the employee and the cost center but it does not serve the purpose because B1 is placed in one cost center CC1 and manages the other cost center CC2 too. Since she can be in one cost center at a time say CC1 there is no record pertaining to CC2 for her.
    How to resolve this? what kind of config change needs to done?
    Any leads or suggestion would be helpful.
    Thanks in advance,
    SG

    Hi,
    You can define your organization structure except the cases you have exceptional .
    For the exceptional Objects create them in Expert mode and maintain infotype 1001 depending upon the requirement.
    Warm Regards,
    Kapil Kaushal

  • Compile class file, check for code structure quality

    now i am trying to develop a system for my college final year project..the main function is to help the lecturer to mark the student java assignment
    any way to compile the java file..just to check for the error? if got error then 0 mark..no error got mark..and then check for the code structure and so...base on that ..to decide the student mark..like if good structure 20 mark..bad? 5 mark and so.
    is it possible to do so?
    Junit?
    any sample?

    Checking for errors is easy, just write a script to check if javac completed successfully. You can use similar approaches (possibly needing to parse the output) for jlint/PMD/whatever to check code structure. If there's any custom checks you want to do, though, I suggest you grab a parser (possibly witgh semantic analysis; I've found the Eclipse one is rather easily extracted and is good for this stuff) and write manual checks. It might be easier to write PMD rules, but you won't have the flexibility.

  • GL code Structure

    Dear gurus
    We are going for upgradation from 4.7E to ECC 6.0, in this we would like to convert GL Code structure(6 digit) to 8 digit Structure.
    Is it possible in ECC 6.0, if so, what r the consequence generally face.
    Can we create new GL Structure and can be transferred from 6 digit structure to 8 digit GL Code strucutre
    regards

    Hi,
    I give below my views :
    The chart of Account will hold upto 10 digits.
    You have to change the interval in OBD4 if you have given only 6 digit for accounts groups.
    The transaction data with old GL account numbers cannot be changed.
    The financial statement version derived so will have two accounts with same description.
    All the automatic account assignment has to be changed with new numbers.
    All the primary cost element numbers and the relative assignments in CO area has to be changed.
    The cut off date can be fixed as 31.03.2010 to enable you to take the balance sheet with old gl
    account numbers and thereafter upload the balances in new version is preferred.
    Regards,
    Sadashivan

  • Determining Code Structure

    Does anybody know if there is a way to determine the code structure (variables, statements, loops) of a pl/sql program unit (package, function, procedure, etc)?
    There are some code editors (e.g. PL/SQL developer) that makes avaliable a code structure window and a conventional code editor window. These windows are usually connected, so when you cilck on an item of the code structure window, the matching lines on the code editor window are highlighted.
    How does those kind of code editors determine the structure of a program unit? Do they have a client-side parser to read and analyze source code. Is there any Oracle API to get this information?
    Edited by: user630459 on 12/05/2009 05:10
    Edited by: user630459 on 12/05/2009 05:13
    Edited by: user630459 on 12/05/2009 06:05
    Edited by: user630459 on 12/05/2009 06:06

    Thanks, but unfortunetaly we use Oracle 10g Release 2. Since there aren't other options, I think I'll have to parse source code. I'm going to use an automatic paser generator (e.g. ANTRL framework) to save me from language processing stuff. Do you kown where I could find the PL/SQL Grammar?
    Edited by: user630459 on 12/05/2009 10:35
    Edited by: user630459 on 12/05/2009 10:36
    Edited by: user630459 on 12/05/2009 12:56
    Edited by: fadc80 on 13/05/2009 04:38
    Edited by: fadc80 on 13/05/2009 04:56

  • HT201232 Support Subject : iTunes Cards and Codes Sub Issue : hi i want to change my iTunes account from US Store to Kuwait Store and i want to reset My balance.

    Support Subject : iTunes Cards and Codes
    Sub Issue : hi i want to change my iTunes account from US Store to Kuwait Store and i want to reset My balance.

    Try contacting iTunes Support (these are user-to-user forums) and ask them if they can remove the balance from your account so that you can change countries : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page

  • Best practice for code structure to control multiple devices in a 2 stage-sequ​ence

    I have a question about code architecture and getting multiple devices controlled and sychronized for one experiment. This is an "architecture"-type inquiry, so I am hoping for some suggestions on how to proceed.
    I run an experiment in which I control 2 NI PCI-6733. I am soon to add a Tektronix AFG 3022B, and have long been putting off an opportunity to rewrite my labview code from the ground up. I inherited it from an earlier research, and while functional, I would like to make it easier to modify and break up into subVi's and such. Link to the current program (labview 8.6.1) is here if you would like to see the code that is currently used, and the subvi's are in a zip file. The current version of the experiment consists of just one stage, all the writing of the data to the PCI cards is saved for the end. I need to change this in my new setup though. 
    The new experiment consists of 2 stages. The first will run (looping an output array to the PCI cards) until it hears a "true" from another computer (connected via TCP). At that point, it should switch to stage 2 and run a sequence (usually 10^5 timeunits in length, where the time unit is 0.1 ms) that outputs to the two PCI cards, the AFG 3022B, and with the flexibility to add more devices in the future.
    Most appreciated would be structural advice. How to arrange the VIs, if it's good to use a "master" VI that would control the two subVi's of stage 1 and 2, etc...  Feel free to ask for more details if it would help clarify my question. Thanks!
    Solved!
    Go to Solution.

    Programs of this type usually use a state machine of some sort.  You can find many tutorials on LabVIEW state machines in these forums or the LAVA forums.  If you are doing a rewrite, I would also recommend you consider LabVIEW classes.  They help modularize your code and make the subparts more reuseable.  You may end up with less to maintain, as a result.
    <shamelessPlug>You may also want to consider TestStand.  It was designed to run sequences of tests, so may make your life easier.  It could also be gross overkill.</shamelessPlug>
    Let us know if you run into issues with state machines or classes.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Framework Structure Issue

    I am creating Distributed App outside the Mac App Store on Mac osX 10.9.5 with XCode 6. I have used Developer ID Application certificate, custom Framework which was Developed by me. I have signed this framework with same Developer ID Application certificate which used for Mac App. I have Export a Developer ID signed Application in my Mac.
    Now, The Problem is when I download ".app" from mail in my Mac and double click, It display Alert Message " App can not be open because identity of developer can not be found". I have attached Image of Error.
    When I run codesign command on terminal, It shows "WSBluetoothFramework.framework/: bundle format is ambiguous (could be app or framework)".
    So I checked and found that after export signed app "Headers" folder is missing. But before archive and export Framework contain Proper structure of Framework.
    Before Archive Framework Structure
    After Archive Framework Structure
    I want that When App double click it should ask for Open Permission instead of the Error Message.
    So Can anyone now about this issue?

    You have to structure your workspace properly if you want an embedded framework to work. It should look something like this:
    Project/
         Application/
              Application/
                   Application.xcodeproj
         Application Workspace/
              Application.xcworkspace
         Framework/
              Framework/
                   Framework.xcodeproj
    Hopefully I have the indentation correct, but this is the general idea. Replace "Project" with your project name, "Application" with your app name, and "Framework" with your framework name. It may be possible to get it to work using some other structure, but I know this works. If you have it setup properly, when you add your embedded framework, Xcode should setup all of the copy files and run script build phases to properly embed and code sign your framework.
    In your example, missing the Headers is normal. It the the code signature that you need. It looks like you have code-signed your development version. That won't work. You have to let Xcode do it the way Xcode wants. If you try to fight Xcode, you will always lose.

  • Account-specific (Error code -36) issue -- I'm stumped.

    Hello All:
    I'm at my wits' end trying to figure this one out; I've searched the forums (and about half of the internet), but I haven't yet run across this particular scenario:
    Client's Mac:
    G4/500 running Mac OS X 10.3.9
    (there are 6 other Macs in this office; no others are experiencing this problem)
    Shared PC:
    WinXP SP2 running on an older beige Gateway PIII box.
    Shared folders set up (with sharing permissions verified thoroughly).
    Problem
    The client is unable to connect to shared folders on the WinXP box; every time she tries, she's presented with the error message:
    [quote]The Finder cannot complete the operation because some data in (smb://IPA.DDR.ESS.HERE) could not be read or written.
    (Error code -36).[/quote]
    This happens no matter how I authenticate (using her creds or mine -- I'm a domain admin, so I should have access) when trying to connect from her admin account. However, I am able to connect to any shared volume on the same machine if I log in on another admin account on the Mac (even if I use her credentials).
    Obviously, it's not a connectivity or hardware issue, since the same computer is connecting without a problem (using a different account). Also, none of the other Mac users are having this problem. All users are on the same subnet.
    Here's what I've tried so far in my troubleshooting process:
    1. I verified sharing setup and permissions on the WinXP volume;
    2. I tested to ensure other Macs could see the share -- they all could;
    3. I've run the Mac OS 10.3.9 Combo updater;
    4. I've updated Symantec Antivirus on the WinXP box (per the recommendation of an artice; but clean dogs?never hurts);
    5. I've searched high and low with Google.
    Since I can get to it from other accounts on the same computer, I'm inclined to believe there's some sort of user preference file corruption (or some other account-specific problem).
    Is there a .plist file in the user's account that could be removed (and allowed to rebuild) to restore connectivity to the shared volume? Or is there some sort of utility to "rebuild" a user account? ...or am I barking up the wrong tree here?
    Any assistance would be most appreciated!

    Thanks for the suggestion, Charles.
    I eliminated hardware as a culprit early in the troubleshooting process, since internet connectivity was still robust.
    I also thought that the Directory Access information may have been to blame; that's why I went so far as to do a combo updater (as a sort of "whack on the head" measure).
    But when I was able to log on the same Mac using a different account and I did not experience the issue, I started looking at account-specific issues.
    From what I understand, Directory Access (SMB inclusive) are system-wide settings affecting all user accounts. Given that assumption, I was thinking there might be some sort of user-specific preference file that might be to blame here, but I don't want to just start blowing out .plist files willy-nilly until I can obtain a better understanding of which one(s) might be at fault.
    My fallback plan is to simply create a new account for the user and migrate all her information over folder-by-folder, but I'm hoping there's an easier fix (plus, I'm looking at this as an opportunity for a better understanding of user account structure).

  • What kind of code structure is good when target is to save and read huge amount scalar parameters?

    Hi All,
    LV 8.5.1 + DSC
    In my project I need to save many scalar parameters to file and also read them. There is about 100 logical parameter groups and inside those groups there is about 10 to 50 parameters. Every parameter have own describe name e.g. "TAG1_measurement_upper_limit". Parameter type is string and length about 1 to 7 characters. 
    In my first solution I made a typedef rings for every parameter group. This structure is not good because when there is a new parameter I must update many things manully. This means that number of parameters can vary. One good thing in this structure that it is documenting my code very effcient. I also like to keep my code simply as possible so I wan't write and read all parameters by using only two VIs. All parameters were saved to one CSV-file. Every column is one parameter group and every row is certain parameter. So there are many empty "cells" in this structure.
    I have consired different structures as database, CSV-file etc.. Does anyone thought this same issue before? Is there efficient way to solve this issue.
    -Jim

    Values of FP variables can be easily captured.
    1. Create a reference to the pane of the FP.
    2. With that reference you can fetch all the controls(/indicators) on the FP.
    NOTE: make sure that the label of the control/indicators is unique and have a distinct pattern e.g. IOgrp_IOitem_parameter (use caption for user viewing and label in blockdiagram)
    3. Using the label naming pattern you can store them in a file.
    The label can also be used to restore the value of the control.
    1. Read the file
    2. Get all control references
    3. For each value in the file
    3a. Find label name in control references
    3b. if found set value
    Regards,
    André
    Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)

  • Code page issue - Unix file(s) content display in a report output

    Hi All,
    I am trying to retrieve file from Unix server and display in my report output.
    I have written code as below:
    OPEN DATASET filename FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      DO.
        READ DATASET filename INTO i_tab-line.
      ENDDO.
    CLOSE DATASET.
    1. Now i am able to display files of type .txt in report output but with line numbers above each line.
    How can i avaoid it! I want to display as it looks in AL11 view.
    2. If i am displaying files of type .PDF it is giving dump with below message:
    A character set conversion is not possible.
    At the conversion of text from code page '4110' to '4102' is not possible.
    - a character was found that cannot be displayed in one of the two code pages;
    - or it was detected that this conversion is not supported.
    How can i display the .PDF (or) all types of files in my report as it is viewable in AL11.
    Can anybody solve this this.
    I have tried UTF-8 & NON-UNICODE options with ENCODE also they are also giving same dump.
    Can anybody resolve these issues!
    Thanks in advance.
    Thanks,
    Deep.

    Hi All,
    Any resolution for above posted issue!
    Thanks,
    Deep.

  • Report structure issue

    EPM 10 SP15
    I have a requirement to build a asymmetric column axis and dynamic row expansion input form to be done. If i can do this, that would avoid unnecessary building the same structure with 7 different reports to construct the asymmetric columns. But i am facing an issue that the rows not expanding.
    Based on Vadim static report blog i am convinced that we can have a static asymmetric col axis and have a dynamic row axis but looks like in my report build it is not expanding on the row.
    Here is what i did
    1) Build the column axis as below resulting in EPMOlapMemberO cells referring to other excel cells. Basically I wanted to show i have a asymmetric column axis need.
    ACTUAL        PLAN           PLAN            ACTUAL
    PROD1         PROD2        PROD1          PROD3
    2013.JAN      2013.FEB     2013.JAN       2014.JAN
    2)  Row axis should expand based on parent node like
    Customer Group
    ---Customer 1
    ---Customer 2
    ---Customer 3
    3) Of course i need some page axis overrides
    What i did:
    By enabling member recognition i created the col axis cells referring to the cells i already constructed manually
    I manually entered a dummy member in row axis cell with member recognition on
    It automatically recognized col and rows and created a default report
    So far so good.
    Now i went to row axis selection and made the member selection to Customer Group (member & children selection).
    Then i refreshed the report assuming it would expand on row  but it didn't do anything
    Am i doing something wrong?  Is it possible to have a static col axis with dynamic row axis?
    I also want to ask if this is a safe approach to build a report with static col axis and dynamic row axis. Would it prevent me from inserting local members in col axis later?
    Any help is appreciated..
    ~Dilkins

    You are doing something incorrectly. If you have row axis Customer member definition as:
    Context (Member and Descendants)
    Then if you change context to some parent and refresh - your row axis will be expanded to Member and Descendants of the context parent.
    You can also use =EPMDimensionOverride for Customer.
    "If I follow this construction, can I add local members in between the columns at later time?" - yes, you can insert local member columns.
    "I plan to do PageAxis override" - what do you mean by override? EPMDimensionOverride is applicable only for row and column dimensions! You can use Excel formulas as it's described in the blog.
    Vadim

  • T.Code for  issues return by the user after month closing

    Dear SAPient's,
    Give us the transaction facility available in SAP to account the issues
    return by the user after month closing.
    regards,
    Bijay Jha

    Dear SAPient's,
    Actually I want to know that when the Goods Issued and from that some goods are returned back due to any reason.
    I want to know Is there any T.Code from which i can get full details of Goods which is returned after Issuing in one month.
    Warm Regards,
    Bijay Kumar Jha

  • One Bank Account used by Multiple Company Codes - BRS Issue

    Dear All
    We have a scenario where 1 bank account is maintained under different company codes and used for business purpose.  In this scenario we are able to do Funds Transfer without any issue. When we are going to do BRS, there is a issue.  When we receive Bank Statement, we receive only one statement and when we try to import into system, system will throw the error as system is not able to decide for which company code it has to perform BRS.
    Can anybody help me out in resolving the issue.
    Rayala

    Hi,
    For BRS it is impossbile.   For maintainig account and all technically it is ok.  But it advisable to have different account at least for different company code.
    Thanks
    Kalyan

  • Company code creation issue

    Hi All,
    When I am creating company code I am getting an error as below.
    "you may not change the currency since documents exist with this currency"
    Above issue is coming while new co code creation or copying of existing co code also.
    Please advice on the above issue.
    Regards,
    Riyaz

    Hi,
    I hope you are creating new company code by copying from the exiting company code. If you copy one company code to another company code then you will get few pop- up message like do you want to use same chart of account or do you want to use same currecny like that. So may be you have selected different currecny. Sap has come up with country template for each country. So you can use country template to create the new company code.
    Thanks & Regards
    R.K

Maybe you are looking for