This discussion is archived
1 2 Previous Next 15 Replies Latest reply: Apr 16, 2013 8:36 AM by Howard (... in Training) RSS

Character agnostic, non-whitespace differentiating, column wrap?

Howard (... in Training) Pro
Currently Being Moderated
I know how to use this (below) to get word wrap:
width:110px; display:block; word-wrap:break-word;
But how do I get a character agnostic wrap?
[To clarify, a "column" wrap that treats whitespace as if it were non-whitespace.  You can't call it "non-word" wrap because that makes no sense.]
Example:
<font face="courier new" color="green">THIS COLUM
N IS TEN C
HARACTERS
WIDE.</font>


Howard

Edited by: Howard (... in Training) on Apr 12, 2013 4:07 PM
  • 1. Re: Character agnostic column wrap?
    fac586 Guru
    Currently Being Moderated
    Howard (... in Training) wrote:
    I know how to use this (below) to get word wrap:
    width:110px; display:block; word-wrap:break-word;
    But how do I get a character agnostic wrap?
    What do you mean by "character agnostic"?
    Example:
    <font face="courier new" color="green">THIS COLUM
    N IS TEN C
    HARACTERS
    WIDE.</font>
    Don't use <tt>word-wrap</tt>. The default <tt>normal</tt> value will only break at standard text breaks (white space and hyphens).
  • 2. Re: Character agnostic column wrap?
    Howard (... in Training) Pro
    Currently Being Moderated
    Paul,
    What do you mean by "character agnostic"?
    Oh, you're pullling my leg!
    Miriam-Webster: from Greek agnōstos unknown, unknowable, from a- + gnōstos known, from gignōskein to know
    Hence -- character agnostic -- does not know/care/prefer/respond based upon the class of character in the data. To wit, treats all characters the same. In particular, behaves the same for whitespace and non-whitespace characters.

    Another Example:
    <font face="courier new" color="green">THIS EXAMP
    LE WRAPS E
    VERY TEN C
    HARACTERS.</font>


    So, is there a way to column wrap that treats whitespace characters and non-whitespace characters the same?

    Howard
  • 3. Re: Character agnostic column wrap?
    fac586 Guru
    Currently Being Moderated
    Howard (... in Training) wrote:
    Paul,
    What do you mean by "character agnostic"?
    Oh, you're pullling my leg!
    Miriam-Webster: from Greek agnōstos unknown, unknowable, from a- + gnōstos known, from gignōskein to know
    "When I use a word," Humpty Dumpty said, in a rather scornful tone, "it means just what I choose it to mean - neither more nor less."
    "The question is," said Alice, "whether you can make words mean so many different things."
    "The question is," said Humpty Dumpty, "which is to be master - that's all."
    Through the Looking Glass
    >

    In this case its not a matter of mastery, just clarity...
    Hence -- character agnostic -- does not know/care/prefer/respond based upon the class of character in the data. To wit, treats all characters the same. In particular, behaves the same for whitespace and non-whitespace characters.

    Another Example:
    <font face="courier new" color="green">THIS EXAMP
    LE WRAPS E
    VERY TEN C
    HARACTERS.</font>

    So, is there a way to column wrap that treats whitespace characters and non-whitespace characters the same?
    That's what <tt>word-wrap: break-word</tt> is supposed to do. If it's not, then you are invited to reproduce the problem on apex.oracle.com.
  • 4. Re: Character agnostic column wrap?
    Howard (... in Training) Pro
    Currently Being Moderated
    To make sure I asked what I want, I tried to clarify this in my last post.
    So, is there a way to column wrap that treats whitespace characters and non-whitespace characters the same?
    1. So, yes, I know what word-wrap means. I do not want word wrap.
    2. I want, for lack of a known term, "column wrap". That is, if you will, an ignore word boundaries wrap.

    We all know word-wrap operates differently on whitespace and non-whitespace characters.
    I just want to wrap, at and only at, a filled column-width.

    Thanks,
    Howard
  • 5. Re: Character agnostic column wrap?
    fac586 Guru
    Currently Being Moderated
    Howard (... in Training) wrote:
    To make sure I asked what I want, I tried to clarify this in my last post.
    So, is there a way to column wrap that treats whitespace characters and non-whitespace characters the same?
    1. So, yes, I know what word-wrap means. I do not want word wrap.
    2. I want, for lack of a known term, "column wrap". That is, if you will, an ignore word boundaries wrap.
    And as I stated in my last post, that is what <tt>word-wrap: break-word</tt> does, as shown in this example.
  • 6. Re: Character agnostic column wrap?
    Howard (... in Training) Pro
    Currently Being Moderated
    Well then. Maybe that's why I'm not on the same page. Because that's not what I get on apex.oracle.com.

    Yes, I'm getting the break after ten non-whitespace characters. But I'm also getting whitespace breaks.

    What I get:
    <font face="courier new" color="green">
    XXXXXXXXXX
    The best
    of time.
    XXXXXXXXXX
    The best
    of time.</font>


    The column wrap I want is:
    <font face="courier new" color="green">
    XXXXXXXXXX
    The best o
    f time.XXX
    XXXXXXXThe
    best of ti
    me.</font>


    Maybe it could be called "full column" wrap. ?

    Howard
  • 7. Re: Character agnostic column wrap?
    fac586 Guru
    Currently Being Moderated
    Howard (... in Training) wrote:
    Well then. Maybe that's why I'm not on the same page. Because that's not what I get on apex.oracle.com.

    Yes, I'm getting the break after ten non-whitespace characters. But I'm also getting whitespace breaks.

    What I get:
    <font face="courier new" color="green">
    XXXXXXXXXX
    The best
    of time.
    XXXXXXXXXX
    The best
    of time.</font>


    The column wrap I want is:
    <font face="courier new" color="green">
    XXXXXXXXXX
    The best o
    f time.XXX
    XXXXXXXThe
    best of ti
    me.</font>
    I can only assume it's due to conflict between the standard white space wrapping model and the overflow wrap. Using the combination
    white-space: nowrap;
    word-wrap: break-word;
    gives the presentation you're looking for in IE8/9/10, but not in any other browser. (I'm not wading through the spec to find out which is correct, or if the difference is because the behaviour is not clearly defined.)

    Every time these forced/non-standard breaking questions come up I've asked why it's necessary to do this, and I've yet to receive a satisfactory response. When there's no white space, what kind of data is this? In your case where there do appear to be natural breaks, why do you want to destroy basic readability by introducing unnatural ones?

    I suspect a link with your other recent threads: +{thread:id=2523731}+ and +{thread:id=2523994}+. Altogether this screams "<a href="http://meta.stackoverflow.com/questions/66377/what-is-the-xy-problem">XY Problem</a>". Instead of diving into a solution then asking piecemeal questions whenever you hit a problem, back up, present the background in sufficient detail, and ask "...given this requirement, what options are available in APEX [and by extension Oracle, HTML, CSS , jQuery and JavaScript] to implement it?" That way you'll be more likely to get an optimal and integrated solution.

    Creating actual examples on apex.oracle.com using realistic sample data (rather than posting incomplete/unclear information on the forum) makes it more likely that people get involved, and makes it possible to collaborate on the solution.
  • 8. Re: Character agnostic column wrap?
    Howard (... in Training) Pro
    Currently Being Moderated
    @Paul,

    See
    http://apex.oracle.com/pls/apex/f?p=4550:1:2807482452656:::::

    WS: APEX_EXAMPLES_01
    USER: demo
    PW: demo

    Application BPS_f991202 Page 2! Column Job Lng Nm

    I worked with this for more than an hour this morning because response time has been 60+ seconds to this site. Often I get a timeout. And the code I tried would not give the wrap I wanted. Now, when I check so I can post this message. It's exactly what I want. I have no idea what I changed that it now works! ???

    Thanks,
    Howard

    (more) What I have now.
    width:110px; display:block;white-space: nowrap;word-wrap: break-word;
    When response time improves, I'll see if I need"display:block;"

    Edited by: Howard (... in Training) on Apr 15, 2013 9:57 AM

    (more)It's too early to declare victory. It doesn't work on our APEX 4.1.0.00.32. But if I export and then import it into apex.oracle.com, it works. Perhaps it has something to do with the "Default" Page template.

    Edited by: Howard (... in Training) on Apr 15, 2013 10:22 AM
  • 9. Re: Character agnostic column wrap?
    fac586 Guru
    Currently Being Moderated
    Howard (... in Training) wrote:
    @Paul,

    See
    http://apex.oracle.com/pls/apex/f?p=4550:1:2807482452656:::::

    WS: APEX_EXAMPLES_01
    USER: demo
    PW: demo

    Application BPS_f991202 Page 2! Column Job Lng Nm

    I worked with this for more than an hour this morning because response time has been 60+ seconds to this site. Often I get a timeout. And the code I tried would not give the wrap I wanted. Now, when I check so I can post this message. It's exactly what I want. I have no idea what I changed that it now works! ???

    Thanks,
    Howard

    (more) What I have now.
    width:110px; display:block;white-space: nowrap;word-wrap: break-word;
    When response time improves, I'll see if I need"display:block;"

    Edited by: Howard (... in Training) on Apr 15, 2013 9:57 AM

    (more)It's too early to declare victory. It doesn't work on our APEX 4.1.0.00.32. But if I export and then import it into apex.oracle.com, it works. Perhaps it has something to do with the "Default" Page template.
    No, if you've exported it from your instance then it's using the same theme and templates (these are stored in the app). APEX 4.2 may perform some minimal "upgrading" to them on import to provide compatibility with the new page header substitution strings.

    Post the Header definition for the page template you're using on your installation.

    What doesn't work about it on 4.1? Are you viewing the page in IE8 compatibility view? That's the only obvious way I can find to break it on apex.oracle.com.
  • 10. Re: Character agnostic column wrap?
    Howard (... in Training) Pro
    Currently Being Moderated
    Re: What doesn't work about it on 4.1?
    The data for this column, about 100 characters, does not wrap at all but trails across most of the screen.
    Re: Are you viewing the page in IE8 compatibility view?
    I have now turned on IE8 compatibility viewing for ALL sites.
    Re: That's the only obvious way I can find to break it on apex.oracle.com.
    ? I'm not sure what's "broken," what's meant by "break it on apex.oracle.com".
    Re: if you've exported it from your instance then it's using the same theme and templates (these are stored in the app).
    Yes, that would be theme 17 and page template "One Level Tabs - Right Sidebar (optional / table-based)". [So that's our default.]
    Re: Post the Header definition for the page template you're using on your installation.
    "Header definition" - ? If that is the HTML Header from the HTML Header and Body Attribute section, that is blank.

    NEWS! - I see that wrapping is affect by the Column Attribute "Display As". But the apex.oracle.com's workspace website response time that I'm experiencing is so long that I will pause and come back to this later today or tomorrow if I can get a faster response.

    Regards,
    Howard
    When someone says: "I want a programming language in which I need only say what I wish done", give him a lollipop. -- Alan J. Perlis
  • 11. Re: Character agnostic column wrap?
    fac586 Guru
    Currently Being Moderated
    Howard (... in Training) wrote:
    Re: What doesn't work about it on 4.1?
    The data for this column, about 100 characters, does not wrap at all but trails across most of the screen.
    That's what I see in IE8 compatibility mode.
    Re: Are you viewing the page in IE8 compatibility view?
    I have now turned on IE8 compatibility viewing for ALL sites.
    No, you want to be using it for as few sites as possible. It is a bad thing. My concern is that it may be enabled for all of your intranet sites by default via the browser settings.
    Re: That's the only obvious way I can find to break it on apex.oracle.com.
    ? I'm not sure what's "broken," what's meant by "break it on apex.oracle.com".
    Your example is wrapping per requirement when I view it in IE8. It only stops doing so in compatibility mode, hence the enquiry as to whether you had this enabled.
    Re: if you've exported it from your instance then it's using the same theme and templates (these are stored in the app).
    Yes, that would be theme 17 and page template "One Level Tabs - Right Sidebar (optional / table-based)". [So that's our default.]
    Re: Post the Header definition for the page template you're using on your installation.
    "Header definition" - ? If that is the HTML Header from the HTML Header and Body Attribute section, that is blank.
    No. Page template definitions are split into 3 sections&mdash;Header, Body, and Footer. Navigate to the One Level Tabs - Right Sidebar (optional / table-based)" page template and post a copy of the Header section.
    NEWS! - I see that wrapping is affect by the Column Attribute "Display As".
    How?
  • 12. Re: Character agnostic column wrap?
    Howard (... in Training) Pro
    Currently Being Moderated
    Re: IE8 Compatibility View: No, .... It is a bad thing.
    Say, what! Aren't you familiar with "The Bedford Incident" (movie, 1965)?
    To quote Robin: "Holy Cow!" -- Robin, The New Batman Adventures.

    Let me turn it off before I do anything else!

    Howard
  • 13. Re: Character agnostic column wrap?
    Howard (... in Training) Pro
    Currently Being Moderated
    Recap:

    Per {thread:id=2523731}, I have control over column spacing. That problem is solved.

    To see what that looks like: http://apex.oracle.com/pls/apex/f?p=4550:1:2807482452656:::::

    WS: APEX_EXAMPLES_01
    USER: demo
    PW: demo
    Application: BPS_f991202 Page 1

    1) Then, I have some moderately long data columns I would like to wrap in "block" style regardless of whether characters are whitespace.
    Like:
    XXXXXXXXXX
    XXXXXXXXXX
    XXXXXXXXXX
    (For even longer columns, I will need other techniques -- balloons/bubbles/popups(?) -- Separate thread to be worked later: {thread:id=2523994}.)

    2) I had been experimenting on page 2 of the above, but it may be better to attempt changes on page 1 so I don't unknowingly undo the column formatting which has been accomplished.

    3) One page 1, in the HTML Text, there is a part of the style
    #RR_COLLATERAL_SUMMARY td.data[headers="JOB_LNG_NM"] div {
      width: 110px;
      white-space: nowrap;
      word-wrap: break-word;
    }
    And I have put back
    <div>#JOB_LNG_NM#</div>
    in the Job_Lng_Nm CSS Style. Display As is "Display as Text (escape special characters)". <b>But instead of wrapping at 110px it seems more like wrap at 600px. </b>

    4) The theme 17, One Level Tabs - Right Sidebar (optional / table-based) template, the header definition is -
    [ *** on my system *** ]
    <!DOCTYPE html>
    <html lang="&BROWSER_LANGUAGE." xmlns="http://www.w3.org/1999/xhtml" xmlns:htmldb="http://htmldb.oracle.com" xmlns:apex="http://apex.oracle.com">
    <head>
      <title>#TITLE#</title>
      <link rel="icon" href="#IMAGE_PREFIX#favicon.ico" type="image/x-icon">
      <link rel="shortcut icon" href="#IMAGE_PREFIX#favicon.ico" type="image/x-icon">
      #HEAD#
      <link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_17/css/theme_4_0.css" type="text/css" />
      <!--[if IE]><link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_17/css/theme_4_0_ie.css" type="text/css" /><![endif]-->
      <!--[if IE 6]><link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_17/css/theme_4_0_ie6.css" type="text/css" /><![endif]-->
      <!--[if IE 7]><link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_17/css/theme_4_0_ie7.css" type="text/css" /><![endif]-->
    </head>
    <body #ONLOAD#>
    <!--[if lte IE 6]><div id="outdated-browser">#OUTDATED_BROWSER#</div><![endif]-->
    #FORM_OPEN#
    [ *** on apex.oracle.com *** ]
    <!DOCTYPE html>
    <html lang="&BROWSER_LANGUAGE." xmlns="http://www.w3.org/1999/xhtml" xmlns:htmldb="http://htmldb.oracle.com" xmlns:apex="http://apex.oracle.com">
    <head>
      <title>#TITLE#</title>
      <link rel="icon" href="#IMAGE_PREFIX#favicon.ico" type="image/x-icon">
      <link rel="shortcut icon" href="#IMAGE_PREFIX#favicon.ico" type="image/x-icon">
      #APEX_CSS#
    #TEMPLATE_CSS#
    #THEME_CSS#
    #PAGE_CSS#
    #APEX_JAVASCRIPT#
    #TEMPLATE_JAVASCRIPT#
    #APPLICATION_JAVASCRIPT#
    #PAGE_JAVASCRIPT#
    #HEAD#
      <link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_17/css/theme_4_0.css" type="text/css" />
      <!--[if IE]><link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_17/css/theme_4_0_ie.css" type="text/css" /><![endif]-->
      <!--[if IE 6]><link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_17/css/theme_4_0_ie6.css" type="text/css" /><![endif]-->
      <!--[if IE 7]><link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_17/css/theme_4_0_ie7.css" type="text/css" /><![endif]-->
    </head>
    <body #ONLOAD#>
    <!--[if lte IE 6]><div id="outdated-browser">#OUTDATED_BROWSER#</div><![endif]-->
    #FORM_OPEN#
    I hope that's enough information to find a way to wrap the Job_Lng_Nm column.

    Thanks,
    Howard
  • 14. Re: Character agnostic column wrap?
    fac586 Guru
    Currently Being Moderated
    Howard (... in Training) wrote:

    And I have put back
    <div>#JOB_LNG_NM#</div>
    in the Job_Lng_Nm CSS Style.
    Wrong place: That is an HTML Expression, not a CSS Style. The style for that element is in the HTML Header.
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points