Style Elements - defining your own ?

hi,
I have a list of typography elements to define styles
for - can map most to 'heading1', 'heading2', 'Portlet
Header', etc. style elements in the portal style.
however, to make more meaningful names for our site -
e.g. 'Content Header', 'copy text' etc - would be
useful to define our own style elements (while still
utilising the portal's 'edit style' page - don't want
to have to resort to our own css style sheets).
I have used item attributes to force new elements on
the Item Element Type - and this will work (exposes
our own defined style elements in the style sheet, and
allows our own naming system).
question is - are there any other ways of achieving
this? has anyone else done something similar?
also - can we rename 'heading1','heading2' etc to
our own more meaningful names?
also - anyone else think it would be useful to be
able to specify pixels as well as point for font
size?
thanks
kev

That has nothing to due with C's enum construct.
No there isn't. I think it will be in the next
version.
Have a look here how to make one:
http://developer.java.sun.com/developer/Books/effective
ava/Chapter5.pdfic, so iz it something like generics?

Similar Messages

  • Defining your own type in java...?

    is there anything similar to C's enum in java for defining your own types?
    i.e. id like to make my own boolean type which isnt restricted to just true or false, but rather can be also undefined.
    any help will be appreciated

    That has nothing to due with C's enum construct.
    No there isn't. I think it will be in the next
    version.
    Have a look here how to make one:
    http://developer.java.sun.com/developer/Books/effective
    ava/Chapter5.pdfic, so iz it something like generics?

  • How to define your own context in an EJB environment - possibly distributed

    I would like to setup a context (an object accissible per logical thread) in an EJB environment, but I am too unfamiliar with the options I may have.
    My objective is to create a context in which I may set a value, then invoke a method on an object (which in turn invokes a method on another object and so forth) and eventually get back the value from the context. In other words I am trying to pass a value without passing it as a parameter. More specifically, I have written a JDBC Driver wrapper in which I want to intercept a number of method calls and based on the context settings perform one or the other JDBC preprocessing. The reason for not passing the values as parameters is to interfere as little as possible with any environment in which this code is to be integrated. I simply want to set the context and get the context (in my JDBC wrapper) without the surrounding code needing to change.
    I have succeded partially by using a ThreadLocal object to hold my context. I can set and get the values to and from the context and actually pass values to my Driver wrapper without explicitly passing them as parameters. This works well in a non-EJB environment. My concern arises when I switch to the EJB environment.
    If my context is set in a session bean, which invokes an entity bean, am I then guaranteed that these will execute in the same physical thread?
    If the session and the entity beans are hosted on seperate machines then the answer would certainly be NO. Is there any way to have the container manage the context and propagate it accross containers when needed?
    Any thoughts or suggestions on this topic are wellcome, even if they don't solve the issue entirely.
    Looking forward to hear from you all!
    /poul

    In an EJB environment, you have absolutely no control over threading issues. (It was purposefully designed that way.) However, you do have your own little "sandbox" in the EJB ClassLoader - which is why there is a lot of use of the Singleton pattern for factories and (very carefully!) as small caching mechanisms. You might want to look into that avenue - but you have to know how your EJB vendor's ClassLoader scheme works (there does appear to be a convergence in this area) and you must be very sensitive to potential thread-blocking operations that may take a while to complete.

  • Modify style elements ...

    hi,
    I'd ideally like to modify a style -
    (a) to rename - e.g. Heading1 to HeadlineCopyText
    (b) to add more elements
    any ideas on if this is possible?
    clearly would require modify db table content - is this
    possible for a single style?
    thanks
    kev

    You can define your own styles and override the Portal styles by using the unstructured UI template feature. The names and element list of the Portal styles cannot be modified.
    Regards,
    Jerry
    PortalPM

  • How to define our own selection screen for logical database  in abap-hr?

    Hi Friends,
    Can u please help me
    How to define your own selection screens for  logical database.
    we use to do like(goto->attributes-HRReportcatagerious ).but How to desin using  customer table like t599c, t599f and how to add to my logical database?
    Thanks in advance
    charan

    check out this online help
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/dba65c35c111d1829f0000e829fbfe/frameset.htm
    Regards
    Raja

  • AP Check printing setups for printing checks on your own

    HI
    I am wondering if there a good document which deals with AP check printing with MICR and signature on your own check stock
    thanks

    Recently we started to deal with AP check printing in our organizatin. It was a daunting task with the information and resources scattered all over and missing critical pieces of information to make sense out of the whole process flow. We attempted to go through the AP check printing internally and succeded.
    I decided to post the information for the benefit of people about the our experience
    Check Printing Basics and Beyond for Printing Checks on Your Own
    by
    Sarma Chilukuri
    This article deals with what is needed to get your own checks printed. It is a first attempt to uncover all the hidden rules that one should be aware to get your own checks printed. The first section deals with the basic AP check printing setup, while the 2nd half explores some of the flow of events that make it possible to print the check.
    Part I – Basic Setup
    AP Setup for check printing
    There are multiple steps in the AP check printing. First set of steps deal with the AP side setups. The second step is to get the System side setups. The system side setup deals with printer setup and program options setups. The last step would be to make the print format files configured with the vendor provided escape sequences in the laser print format file.
    Step 1: login as Payable Manager
    Step 2: Bank Setup: Navigate to Setup: Payments > Banks
    1.     Make sure the Bank # etc are present
    2.     Tab to “Bank Accounts”, and make sure your account # has been setup
    3.     On the Bank Accounts screen, tab to the “Payables Documents” and verify that Payment format (E.g., COK Laser Format) has been entered. This “Payment format links to next section where we associate it to the right payment program.
    Fig 1. AP Payment Bank Setup Screen
    Step 3: Program Setup (Setup: Payments > Programs)
    As we know there are only 5 formats 3 of which are “Ever Green Laser” (APXPBFE G|L|F) which are explained in the AP Users Guide. For your own form printing, you have to associate the format to APXPFEL (laser format) program. Also, the APXPBFEL or APXPBFEF call the APXPBFEG, which is the base program that pulls the data from oracle base tables. APXPBFEL is the one which allows us to print the checks with MICR and signature on a plain paper not on a pre printed stationery.
    Fig. 2 AP Payment Format Setup Screen
    Printer Styles, Drivers setup
    The above process summarizes the AP Setup. As a DBA, the printer setup needs to be validated. The base install provides the right setup to some extent. But the differences in printers and print queues may add some complexity to the final configuration. The following section discusses the set up the base install provides and changes as needed.
    Step 1. Login as system Administrator
    Step 2: Style (Install : Printer > Style)
    Look for the “PORTRAITHPLJ4LASCHECK”. This one is associated with the SRW Driver Called, “APLASP” (AP Laser printer format).
    Step 3: Driver (Install : Printer > Driver).
         1. The “PORTRAITHPLJ4LASCHECK” is associated with a “User Driver” of PORTRAIT for HPLJ4 and and a SRW driver of “APLASP”
         2. Also notice that there is an Initialization string at the bottom of it. This initialization string gets called as pre-report trigger for the APXPBFEG program (APXPBFEG.rdf) file. It sets the kind of format it should be. Please see the Appendix A for details on these printer pcl code translations. The Initialization string was as follows:
    Initialization: /eE/e&l0o2a7C/e(s0P/e(8U
    Step 4: Printer type (Install : Printer > Register)
    Each printer type is associated with a set of styles. Make sure the printer that was selected has the above style and its associated driver listed against that.
    Fig. 3 System Administrator Printer Seups
    Step 5: Program Setup (Concurrent > Program > Define)
    This step holds the key for check printing. It is necessary to define whether you need the check on top followed by the Stub or the other way around. The way it is controlled is based on the APXPBFEG.rdf, the report definition file and the APLASP.prt (Printer Style associate with the Portrait laser check format SRW driver). The APLASP.prt file ($FND_TOP/reports) has two identical setups called the 100 series and the 200 series. Those identical sets of setups define where the MICR and signature print on the check. The following table lists the some of the codes in the 100 series. Please refer to Doc ID #146452.1 for complete details.
    Fig. 4 System Administrator Concurrent Program Definitions
    CODE #     Code Definition
    100     Electronic check activation string
    101     1st Check #
    102     2nd Check #
    104     Deactivate check number mode string
    111     Activate MICR line
    112     MICR Deactivation / reset the printer head position
    121     1st Signature
    122     2nd Signature
    141     Address font activation string
    199     Return to default state string
    Table 1. APLASP.prt -- MICR Activation Codes
    The above code block repeats itself the same way in the 200 series. The decision to activate one way or the other controls the Check printing.
    Step 2: Setting up the Option block
    In the concurrent program definition for the APXPBFEL, there is an Options block in the middle. You need to list the codes that you want to activate. Please refer to Doc ID # 186640.1 for some explanation on these.
    E.g.,
    p_printer_code_mask="201,211,221,241" p_sig2_amount="" p_sig3_amount="" p_sig1_vendnum="" p_sig2_vendnum="" p_sig3_vendnum="" p_country_to_ignore="US" p_continuous_stationery="N"
    Step 3: Output format is Text
    Text format is sufficient, as the printer will pick up these escape sequences anyway.
    Fig. 5 System Administrator Concurrent Program APXPBFEL Options Definition
    UIPRINT.TXT, UIFONTS.ALI
    One needs to be aware of a few more pieces in this puzzle. The UIPRINT.TXT identifies to the Oracle Applications the print queues that were setup. This file is needed to set your PCL / Post Script printer definitions. I did not have to really tinker with these files other than identifying the PCL and Post Script Q’s that were setup on the UNIX box.
    Part II: Integrating all the pieces
    The above setups are all documented in various articles. We need to understand a few more steps to see how all these pieces come together.
    What you need to know about APXPBFEG.rdf
    APXPBFEG (.rdf) is the report file which when called pulls the data from Oracle. If you open the APXPBFEG.rdf in the Oracle reports, there is initialization to the report called, SRW.Init. This will bring in the initialization string associated with the PORTRAITHPLJ4LASCHECK driver definition file. Also, please be very careful with this report format file. When you open it, there is small tiny empty block. in the first block which calls the printer initialization code 100/200 under the Format Mask (from APLASP.prt). If this portion gets changed or messed up, one can end up with some unexpected results. Each of those blocks like MICR, CHECK etc… have associated format triggers and printer codes.
    Please make sure that the printer mask is properly handled. I noticed that the 200 series MICR (211) and Signature (221) printer masks were tied to 111 and 121 respectively. These should have been 211 and 221. The other place you need to be careful was the printer code before and after is proper.
    For E.g.,
    For the MICR, the ”printer code before and after columns “ should be 111 and 112 (or 211 / 212) respectively while Format Trigger should reference to 111 (211).
    Fig. 6 APXPBFEG rdf file printer mask and Format Triggers
    The escape sequences in the APLASP.prt file for these codes will play the crucial role in getting our format around the report output that gets generated from the APXPBFEG program. Please refer to the explanation of these escape sequence codes in the APPENDIX A.
    At this point when you run the program, you will see that the formatted output report file will have all the initialization strings and the output associated with that. You can compare the fields and verify the results. Let us closely examine the parts of the 111 and 121 where the micr and signature prints. The key to this to code the escape sequences the right way to get the associate MICR and signature print out correctly.
    Fig. 7 APXPBFEG rdf file MICR printer mask and Format Triggers
    Code 111 and Code 112 from the APLASP.prt file.
    I broke the line into pieces to illustrate the exact escape sequence code.
    Code "211"
    Part 1: esc "&f0S" esc "&f0y0X" esc "&l0E" esc "&a0L"
    Part 2: esc "(8M" esc "(s0p8.00h8.0v0s0b80T" --- This will be provided by the ROM
    Cartridge provider
    Part 3: esc "&k15H" esc "*p3215Y" esc "&a13.8C"
    code "212"
    Part 1 : esc "&f1x3x8X"
    Part 2 : esc "&f1S"
    Let us go over these 2 sets of codes carefully.
    Escape Code     Meaning     Comment
    esc "&f0S"      Push Cursor Position     
    esc "&f0y0X"     Define Macro ID 0 and Start Macro Definition     
    esc "&l0E"      Define Top Margin at 0 Lines     
    esc "&a0L"      Define Left Margin at Column 0     
    esc "(8M"     8M Symbol SetNote : As per pcl codes this happens to be Font Primary JIS Math 8 symbol     MICR Part 1 : Provided by the Vendor from where you the ROM cartridge
    esc "(s0p8.00h8.40s0b0T"     {Fixed Pitch}{pitch 8.00 cpi}{Font Style 8.40}{Medium Weight}{Typeface 0}     MICR Part 2 : Provided by the Vendor
    esc "&k15H" esc "*p907Y"     Set HMI = 15/120" Vert position = 907 Dots     
    esc "&a13.8C"     Move to Column 13.8     
         CODE 112     
    esc "&f1x3x8X"     {End Macro Definition}{Call Macro}{Delete Macro ID}     
    esc "&f1S"     {Pop Cursor Position}     At this point, the MICR gets printed
    Table 2. Escape Sequences in APLAP.prt file Explanation
    Fig. 8 APXPBFEG rdf file Signature printer mask and Format Triggers
    The signature piece (221) has also similar meaning.
    Escape Code     Meaning     Comment
    esc "&f0S"     Push Cursor Position     
    esc "*t300R"     300 DPI Graphics resolution     
    esc "*p1500X"     Horiz position = 1500 Dots     
    esc "*p650Y"     Vert position = 470 Dots     
    esc "(4B" esc "(s1p53v0s0b102T"esc "&f0S!"     Symbol SetProportionalPoint Size 53UprightMedium WeightTypeface 102Push Cursor Position!     Vendor gave the us esc "(4B"esc"(s1p53v0s0b102T!"Note: the ! when the it pushes the ! and that is where it prints the signature piece. The first part forms the symbol set , say (4B and the later part forms the signature font and ! is the piece. I took the ! from the above and let it stay with the 3rd part of it so that signature does not print twice.
    esc "&f1S"      Pop Cursor Position     
    esc "*p+121Y"     Move down 121 Dots     
    esc "&f1S"     Pop Cursor Position     
    Table 3. Escape Sequences for Signature in APLAP.prt file and Explanation
    Summary
    One can print their own checks using the above steps. This can work as a cost effective solution for small organizations where the budgetary constraints are tighter. We are successful in getting the AP Checks printed using the above method.
    References
    Metalink Doc ID # 186640.1, Different Payment Formats …
    Metalink Doc ID # 60936.1, Step by Step Guide to Setup a Printer in Oracle Applications
    Metalink Doc ID # 250543.1, How to Create An Initialization String for a Payable Check Format
    Metalink Doc ID # 48680.1, Accounts Payable FAQ – Payment Batch, Check
    Metalink Doc ID # 1074792.6, Exclamation Point (!) Prints On Check When Using APXPBFEL And Cartridge
    Metalink Doc ID # 158486.1, APXPBFEL Evergreen (Long Laser)
    Metalink Doc ID # 146452.1, Listing of p_printer_code_mask Default Values for APXPBFEL
    Chapter 2, Oracle Payables user guide
    Appendix A
    APLASP.prt printer codes explanation
    code "200" esc "&l0o2a6d66p8.000c2e1x0l63f1H" esc "&k12.00H" esc "(8U"
    esc "(s0p10.00h12.00v0s0b3T" esc "&k11.75H" esc "&a1l0R" control(M) esc"&f3005y4X"
    {Portrait}
    {Letter}
    {6 LPI}
    {Define Page Length to 66 Lines}
    {Set VMI = 8.000/48"}
    {Define Top Margin at 2 Lines}
    {Select 1 Copies}
    {Disable Perf Skip}
    {Define Text Length as 63 Lines}
    {Feed from Tray 1 (upper)}
    0.1 esc "&k12.00H"
    {Set HMI = 12.00/120"}
    0.2 esc "(8U"
    {Roman-8 Symbol Set}
    0.3 esc "(s0p10.00h12.00v0s0b3T"
    {Fixed Pitch}
    {pitch 10.00 cpi}
    {Point Size 12.00}
    {Upright}
    {Medium Weight}
    {Typeface 3}
    0.4 esc "&k11.75H"
    {Set HMI = 11.75/120"}
    0.5 esc "&a1l0R"
    {Define Left Margin at Column 1}
    {Move to Row 0}
    control(M)
    0.6 esc"&f3005y4X"
    {Define Macro ID 3005}
    {Enable Overlay}
    code "201" esc "&f0S" esc "&a1.25r70C" esc "(8U" esc "(s1p14v0s3b4148T"
    {Push Cursor Position} esc "&f0S"
    1.1 esc "&a1.25r70C"
    {Move to Row 1.25}
    {Move to Column 70}
    1.2 esc "(8U"
    {Roman-8 Symbol Set}
    1.3 esc "(s1p14v0s3b4148T"
    {Proportional}
    {Point Size 14}
    {Upright}
    {Bold}
    {Typeface 4148}
    code "202" esc "&f0S" esc "&a20.25r70C" esc "(8U" esc "(s1p14v0s3b4148T"
    {Push Cursor Position}
    2.1 esc "&a20.25r70C"
    {Move to Row 20.25}
    {Move to Column 70}
    2.2 esc "(8U"
    {Roman-8 Symbol Set}
    2.3 esc "(s1p14v0s3b4148T"
    {Proportional}
    {Point Size 14}
    {Upright}
    {Bold}
    {Typeface 4148}
    code "211" esc "&f0S" esc "&f0y0X" esc "&l0E" esc "&a0L"
    esc "(0Q" esc "(s0p8.00h8.40s0b0T" esc "&k15H" esc "*p907Y" esc "&a13.8C"
    {Push Cursor Position}
    11.1 esc "&f0y0X"
    {Define Macro ID 0}
    {Start Macro Definition}
    11.2 esc "&l0E"
    {Define Top Margin at 0 Lines}
    11.3 esc "&a0L"
    {Define Left Margin at Column 0}
    11.4 esc "(0Q"
    {0Q Symbol Set}
    11.5 esc "(s0p8.00h8.40s0b0T"
    {Fixed Pitch}
    {pitch 8.00 cpi}
    {Font Style 8.40}
    {Medium Weight}
    {Typeface 0}
    11.6 esc "&k15H" esc "*p907Y"
    {Set HMI = 15/120"}
    {Vert position = 907 Dots}
    11.7 esc "&a13.8C"
    {Move to Column 13.8}
    code "212" esc "&f1x3x8X" esc "&f1S"
    {End Macro Definition}
    {Call Macro}
    {Delete Macro ID}
    12.1 esc "&f1S"
    {Pop Cursor Position}
    code "221" esc "&f0S" esc "*t300R" esc "*p1500X" esc "*p470Y"
    esc "(30C" esc "(4B" esc "(s1p53v0s0b102T!"
    esc "&f0S!" esc "&f1S" esc "*p+121Y" esc "&f1S"
    esc "&f0S"
    {Push Cursor Position}
    21.1 esc "*t300R"
    {300 DPI Graphics resolution}
    21.2 esc "*p1500X"
    {Horiz position = 1500 Dots}
    21.3 esc "*p470Y"
    {Vert position = 470 Dots}
    21.4 esc "(30C"
    {30C Symbol Set}
    21.5 esc "(4B"
    {4B Symbol Set}
    21.6 esc "(s1p53v0s0b102T!"
    {Proportional}
    {Point Size 53}
    {Upright}
    {Medium Weight}
    {Typeface 102}
    21.7 esc "&f0S!"
    {Push Cursor Position}
    21.8 esc "&f1S"
    {Pop Cursor Position}
    21.9 esc "*p+141Y"
    {Move down 121 Dots}
    21.10 esc "&f1S"
    {Pop Cursor Position}
    code "222" esc "&f0S" esc "*t300R" esc "*p1500X" esc "*p650Y"
    esc "(30A" esc "(s0p.426h35.25v0s0b128T" esc "&f0S!"
    esc "&f1S" esc "*p+141Y" esc "&f1S"
    {Push Cursor Position}
    22.1 esc "*t300R"
    {300 DPI Graphics resolution}
    22.2 esc "*p1500X"
    {Horiz position = 1500 Dots}
    22.3 esc "*p650Y"
    {Vert position = 650 Dots}
    22.4 esc "(30A
    {30A Symbol Set}
    22.5 esc "(s0p.426h35.25v0s0b128T"
    {Fixed Pitch}
    {pitch .426 cpi}
    {Point Size 35.25}
    {Upright}
    {Medium Weight}
    {Typeface 128}
    22.6 esc "&f0S!"
    {Push Cursor Position}
    22.7 esc "&f1S"
    {Pop Cursor Position}
    22.8 esc "*p+141Y"
    {Move down 141 Dots}
    22.9 esc "&f1S"
    {Pop Cursor Position}
    code "241" esc "&a-100V" esc "&l5.8C" esc "(8U" esc "(s0p12.00h10.00v0s3b3T" esc "&k11.75H"
    41.0 esc "&a-100V"
    {Move up 100 Decipoints}
    41.1 esc "&l5.8C"
    {Set VMI = 5.8/48"}
    41.2 esc "(8U"
    {Roman-8 Symbol Set}
    41.3 esc "(s0p12.00h10.00v0s3b3T"
    {Fixed Pitch}
    {pitch 12.00 cpi}
    {Point Size 10.00}
    {Upright}
    {Bold}
    {Typeface 3}
    41.4 esc "&k11.75H"
    {Set HMI = 11.75/120"}
    code "299" esc "(8U" esc "(s0p10.00h12.00v0s0b3T" esc "&k11.75H" esc "&l6D"
    {Roman-8 Symbol Set}
    99.1 esc "(s0p10.00h12.00v0s0b3T"
    {Fixed Pitch}
    {pitch 10.00 cpi}
    {Point Size 12.00}
    {Upright}
    {Medium Weight}
    {Typeface 3}
    99.2 esc "&k11.75H"
    {Set HMI = 11.75/120"}
    99.3 esc "&l6D"
    {6 LPI}

  • How do you connect your photoshop elements on your computer to your account online? and how do you create a customized url? how does the gallery work and how do you access it? i have trouble signing in on my program from my computer to connect to the onli

    how do you connect your photoshop elements on your computer to your account online? and how do you create a customized url? how does the gallery work and how do you access it? i have trouble signing in on my program from my computer to connect to the online photoshop, and I really want to create my own customized url and post photos to my gallery and share them with the world, family, and friends, but i need help because i can't figure how to do any of this, would really appreciate feedback and assistance, thanks, - claire conlon

    To add to sig's reply, "calibrating" does not calibrate Lithiu-Ion batteries, it calibrates the charge reporting circuitry.  If you look at the effect of deep discharging Lithium-Ion batteries in the data from the independent test group, Battery University, you will see that doing so shortens the life of the battery significantly. It looks like an optimum balance between use and life is at a discharge level of 50%.

  • SSI Validation Error: doc type does not allow styles element in body of page

    When I validate my index page with wc.org, I get 2 errors regarding having styles elements h1-h6 in the body vs the head of the page.  My Nav and Footer are SSIs and I have used styles h1-h6 on them.
    Q.  Should I delete the h1-h6 styles from the beginning code of the Nav.htm and Footer.htm?
    Q.  If I delete that code, will they use the styles.css inserted in the head code of each pate?
    Thanks.

    The problem is this block of code belongs in the Head of yoru page, not in a TD  in the Body!  And you also have it below in the Footer.  So now I understand better yoru 2 original quesitons.  Yes, but htis code only in the Head of the page and it will work for the entire page, even for html inserted via Includes.  So remove this style block from all yoru Includes unless some fo them are designed to write into the Head of the page only.
    <style type="text/css">
    <!--
    h1 {
         font-family: Arial, Helvetica, sans-serif;
         font-size: 16px;
         font-weight: bold;
         color: #008000;
    h2 {
         font-family: Arial, Helvetica, sans-serif;
         font-size: 16px;
         font-style: italic;
         font-weight: bold;
         color: #E3372E;
    h3 {
         font-family: Arial, Helvetica, sans-serif;
         font-size: 16px;
         font-weight: bold;
         color: #AB003C;
    h4 {
         font-family: Arial, Helvetica, sans-serif;
         font-size: 16px;
         font-style: italic;
         font-weight: bold;
         color: #E62B86;
    h5 {
         font-family: Arial, Helvetica, sans-serif;
         font-size: 14px;
         font-style: italic;
         font-weight: bolder;
         color: #E3372E;
    h6 {
         font-family: Arial, Helvetica, sans-serif;
         font-size: 18px;
         font-weight: bold;
         color: #AB003C;
    -->
    </style>
    Or even better would be to put this into an external style sheet that
    all your pages can call (not the Includes, just the "real" pages!
    E. Michael Brandt
    www.divahtml.com
    www.divahtml.com/products/scripts_dreamweaver_extensions.php
    Standards-compliant scripts and Dreamweaver Extensions
    www.valleywebdesigns.com/vwd_Vdw.asp
    JustSo PictureWindow
    JustSo PhotoAlbum, et alia

  • N00b query: Why would anyone ever want to define their own Exception class?

    I've been reading thru my Java textbook for the past couple hours.
    Exceptions are a wonderful thing. I already found several instances where I could've implemented try/cacth in my earlier programs.
    Anyway, getting back to the point. My question is, can someone give me a realistic situation/example where a custom Expcetion class is REQUIRED? (the key word here is "required"!)
    I can see why someone would want to have his own Exception class..... e.getMessage() as custom error messages are SO DAMN COOL!!!!!! :P
    hehe
    But seriously, if you are making intermidiate/advanced Java programs, would you ever REQUIRE to make your own Exception class? Afterall, even a custom made Exception class always "extends" from a pre-defined Java class, right?
    Let me make this a bit more clear... public class CustomException extends IOException{  }Now, if I am making a try/catch statement, I can simply say
    try{
    throw new CustomException;
    catch (IOException e) { }
    Now as you can see, the CustomException was caught by the catch claus, because IOException is the superclass of CustomException. So, in other words, the whole CustomException thingy didnt do anything useful.
    I know I know, I am so naive. Enlighten me >.<

    Sure. Say you want to have a system where you want to include a custom error code which maps to some internationalized error messages. You would create an Exception subclass with a field to hold that value separate from the normal "default" message. Then you could throw that exception in all your code. Other code can catch it as a plain Exception if they want and use the "default" message, which is okay if they don't really care about the error code.
    I don't think you are ever "required" to make your own exceptions. I have done so, but I don't often. It depends. See, there are plenty of Exception subclasses in the standard packages, and most of them cover many of the things you need. So more often if I'm throwing an exception, I'll be using the already existing ones, like IllegalArgumentException or IOException (whatever is relevant to the code).
    Yes, you can do what you did below with CustomException. However the reason you might do that is cuz you really want to do this:
    try {
       // call some code that may throw IOException from some standard IO package
       // or may throw CustomException from some of my methods...
    } catch (CustomException ce) {
       // handle cusotm exception
    } catch (IOException ioe) {
       // handle IO exception
    }Cuz you may want to differentiate between your exceptions vs. IOExceptions that might be thrown from some java.io class.
    Usually when you use an exception class it's a named class that relates to some condition. It may hold additional information besides the standard message, but I think most of the time it's just the class name which describes the problem. And if there isn't one that describes the problem that you're code might encounter, then create a subclass.

  • Using your own web fonts in Muse and NOT TypeKit's

    Hi All, I purchased a family of webfonts for the font I will be using in my website. There is no option to add my own web fonts in the fonts menu anywhere, just web safe, typekit and system. For now I'm designing my site with the desktop version of the webfont im using to see somewhat what the final outcome will loom like. Is there a way I can somehow assign my webfont to my site after my website is built and exported to my web server? I can't believe this isnt an option. I'd use Dreamweaver but it is needless difficult to build a website in it.
    Any help would be appreciated.

    if you don't change the websafe font on the website to begin with, or later on come back to arial or something after you've designed with your own font, you can replace the entire font family in css in a matter of a few minutes. the sizes and other stuff will keep unless the font you're using doesn't have Bold or Italic for different hierarchies.
    from stack overflow:
    <style type="text/css">
    @font-face {
        font-family: "My Custom Font";
        src: url(http://www.example.org/mycustomfont.ttf) format("truetype");
    p.customfont {
        font-family: "My Custom Font", Verdana, Tahoma;
    </style>

  • No list elements defined for list item.

    hi master
    when i use list item and run then give this error
    FRM-30351: No list elements defined for list item.
    List PRODUCT_NO
    Created form file MODULE1.fmx

    Try posting your question to Forms

  • Will using your own router allow loopback connections?

    SomeJoe7777 you are correct regarding the route of a given packet when using a WAN IP locally (NAT loopback). However will again state that NAT loopback does not work using a router behind the NVG589. As you stated it should...which is why the issue lies with the NVG589. Most likely something to do with IP passthrough mode on the NVG589 not being a true bridge mode which in turn does effect one's own router. Bottom line I encourage you to attempt NAT loopback yourself with a router behind the NVG589 and report your results. It wouldn't be the first time that ATT said something should work only to later admit it was a problem with their hardware.

    NAT loopback is defined as a function of a router where connections to ports on the outside IP address are translated and routed to the server defined in the router, even when the connection attempt comes from the "inside" portion of the network.
    e.g.. Let's say we have a router with an outside IP address of 99.99.99.99 (a public IP address), and the router has been configured so that inbound connections to port 80 on that WAN interface are translated to a destination address of 192.168.1.20 (on the inside network). This enables a web server running on the 192.168.1.20 machine to respond to web requests from the Internet, provided those web requests are coming in to 99.99.99.99.
    If another computer on the internal network, such as 192.168.1.101, can pull up the web site using http://99.99.99.99 (instead of the direct connection of http://192.168.1.20 ) then the router implements NAT loopback.
    Now, knowing that, let's review:
    If you use your own router, and it is the device doing the network address translation (NAT), that means it's outside address is x.x.x.x (a publically routable IP address), and it's inside addresses are private, in RFC 1918 address space. This can be set up with the U-Verse modems using DMZPlus (2Wire/Pace 3xxx series gateways) or IP Passthrough (Motorola NVG5xx series gateways).
    NAT loopback in this situation is completely dependent on the functionality of your own router. By definition, any NAT loopback request under this circumstance never leaves your network and your router, and thus never touches the U-Verse gateway at all.
    The bottom line is that if NAT loopback is not working with your router, then you either haven't configured your router properly, or your router doesn't support it. The ISP gateway has no bearing on this functionality whatsoever when configured in conjunction with your own router as described above.
     

  • Access the styles and defined names of an excel sheet in apps for office

    Hi Everyone,
    Can you please let me know how to access the styles and defined names of an excel sheet in apps for office ?
    Technologies/language  used:office JS ,Jquery and apps for office
    any help in this is highly appreciated
    Thanks!!
    Santosh Sutar 

    Hi,
    I’m not sure if I understand your question correctly, so please correct me if I have any misunderstandings.
    For the defined names, I assume you mean the named range. If so, you can create the binding to the named range through
    Bindings.addFromNamedItemAsync method.
    For the styles, I think the article below may give you some help.
    How to: Format tables in apps for Excel
    By the way, there are no methods to iterate the styles and named range through the current Office JavaScript API.
    If this is a feature you want to include in future versions of Office JavaScript API, please submit a feedback to
    Office Development Platform User Voice.
    Regards,
    Jeffrey
    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.

  • To buy from your owns company

    Hi,
    I have created the vendor which has same name as company code. Which created for the STO purpose.
    But when i try to create a standard po using the same vendor and company code system allows me to create a PO.
    It is logical to buy from your owns company using the vendor which created for STO purpose.
    As per my understanding the system should give error message in this case while creating the PO.
    Please give your suggestion/input on above scenario.
    Vikrant

    Hi,
    Set Message "ME123" as Error under Path SPRO > MM > Purchasing > Environment Data > Define Attributes of System Messages > System messages

  • Roll Your Own - APEX 4.0 and JQuery-UI Application

    For those with a apex.oracle.com account and want to see jQeury tabs running via 4.0 in your own Workspace, use following this script to create your own version of Shijesh's (Apex_Noob) application.
    Credit also goes out to Alistair Laing for his hard work in investigating why 4.0 is requiring the use of the googleapis jquery.js... libraries.
    Application Builder - Create
    Application Type - Database
    Create Application - From Scratch
    Name - jQuery Application
    Add Page - keep default and Click Add Page
    Click CreateMy application defaulted to Theme 2, you will need to switch the theme to one of the following: If you don't the tabs will not render properly.
    8 Orange
    10 Sand
    13 Classic Blue
    14 Simple Green
    15 Light Blue
    16 Dark Blue
    18 Simple Gray
    19 Red Gray
    Message - Application created successfully.
    Click Shared ComponentsUnder User Interface Click - ThemesIf you don't see one of the above Themes, you will need to Create and switch your Theme.
    Click - CreateFrom the Repository selected Click - Next and select one of the above Themes
    Click - Switch ThemeSelect one of the above Themes and Click - Next
    Click -NextClick - Switch ThemeReturn to your newly created Application by Clicking on Application xxxxxxx Breadcrumb
    Click - Create PageSelect - Blank PageClick - NextAssign the page a name
    Click - NextAccept defaults and Click - NextClick - FinishClick - Edit PageI still work in Component View, to toggle to this View, click on the control adjacent to Page number and Go button. Hover over the ones on the far right and you will see both Component View and Tree View
    From Component View
    Click on the Page Edit Control
    In the Text Area labeled Javascript/Execute when Page Loads - paste in the following code:
    $x("tabs").appendChild( $x("tabs-1"));
    $x("tabs").appendChild( $x("tabs-2"));
    jQuery("#tabs").tabs();In the Text Area labeled HTML Header and Body Attribute/HTML Header - paste in the following code:
    <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/redmond/jquery-ui.css" type="text/css" />
    <script src= "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.js"> </script>Click - Apply ChangesRequired use of the Google jqueryui libraries is being questioned by recent threads created by Alistair Laing since it appears that 4.0 does not currently support jQeury tabs
    {thread:id=1083507}
    {thread:id=1083540}
    Create a Region
    Type HTML Text - accept defaults
    Provide a Title like "Tabs" and accept defaults
    Template - Reports Region
    Sequence 10
    Click - NextIn the Enter HTML Text Region Source: Text Area - paste in the following code:
    <div id="tabs">
    <ul>
    <li><a href="#tabs-1">Employees</a></li>
    <li><a href="#tabs-2">Departments</a></li>
    </ul>
    </div>Click - Create RegionCreate a second Region
    Type Report/Sql Report
    Provide a Title like "Employees" and accept defaults
    Template Reports Region
    Sequence 20
    Click - NextIn the Enter SQL Query or PL/SQL function returning a SQL Query: Text Area - paste in the following code:
    SELECT empno,
           ename,
           job,
           mgr,
           hiredate,
           sal,
           comm,
           deptno
    FROM   empClick - Create RegionEdit the newly created Report Region
    Under Attributes/Static ID - paste in the following code:
    tabs-1Click - Apply ChangesCreate a third Region
    Type Report/Sql Report
    Provide a Title like "Departments" and accept defaults
    Template Reports Region
    Sequence 30
    Click - NextIn the Enter SQL Query or PL/SQL function returning a SQL Query: Text Area - paste in the following code:
    SELECT deptno,
           dname,
           loc
    FROM   deptClick - Create RegionEdit the newly created Report Region
    Under Attributes/Static ID - paste in the following code:
    tabs-2Click - Apply ChangesRun you page and you should see you tabs.
    Jeff

    Great post Jeff,
    With regard to Jquery UI and tabs I've contacted the Apex dev team and received a reply from them.
    All the jQueryUI files are included in the APEX 4.0 distribution, but not all jQueryUI components
    are loaded by default to avoid a huge initial download. It's not necessary to load your own version of jQueryUI, just load the missing component.
    For the "Tabs" you have to add
    <link href="IMAGE_PREFIX#libraries/jquery-ui/1.8/themes/base/jquery.ui.tabs.css" rel="stylesheet" type="text/css" />
    <script src="#IMAGE_PREFIX#libraries/jquery-ui/1.8/ui/minified/jquery.ui.tabs.min.js" type="text/javascript"></script>
    to your page template or the header attribute of your page where you want to use it.They did not mention which other Jquery UI widgets were not included so people need to check to see if they get any JS errors Like "$('#tabs').tabs() is not a function" this would suggest that tabs is not being loaded. To included it in you page header directly after #HEAD# you need to place the css and js as stated above.
    If you need jquery help just post you queries here or the is some other jquery links that maybe of some use
    jQuery
    http://jquery.com/ - Official jQuery Website
    http://api.jquery.com/ - jQuery API Library
    http://plugins.jquery.com/ - jQuery Plugins (Not APEX related)|
    http://yayquery.com/ - yayQuery - jQuery Podcast
    http://jqueryui.com/ - Official jQuery UI Website
    http://jqueryui.com/demos/ - jQuery UI Demos
    Edited by: Alistair Laing on Jun 9, 2010 4:04 PM
    Add more links
    Edited by: Alistair Laing on Jun 9, 2010 4:09 PM

Maybe you are looking for