I took a look at the issues you were running into. Thanks to how
java.net is setup, it wasn't simple. :) There is .js that is run that
dynamically imports .css files, also it uses @import statements in the
.css files which the browser doesn't respect when you do a File->Save
(at least not FF). And there are files not in JSFT's repository that
are referenced as if they were. Anyway... here's what I figured out:
* If you do a file->save as... then add the attached files under
branding/css, you can get the l&f (mostly) of the java.net site (there
are some errors and you may need to manually edit a couple files).
* The .css changes that were checked in had a couple of typos... It had
an opening parethesis and a closing curly brace (}, which caused the css
rule to be ignored. It also had test-decoration instead of text-decoration.
* However, even if the above css was written correctly (and I suspect it
was on the local machine or at some point), it wouldn't have mattered.
The tigris.css and inst.css files had rules that took precedence because
the specified an ID of a component in their declaration. I added the ID
to our rules to fix this.
Mike, I made some content changes to the pageSyntax.html page. The
biggest change was to move the color links up near the code and turn
them into buttons. There were getting too far down the page for people
to know what they did. :) I made some other minor changes to how things
were worded and added some links to the JavaDoc / src code.
Now that I'm up to speed on what java.net is doing to show our pages :)
... let me know if you have any questions, I think I can answer them
better now.
Ken
Imre Oßwald wrote:
> Michael,
>
> probably your rule does not have a priority that is high enough.
>
> to overwrite one of the styles-rules, that set visited links to be not
> underlined you will probably have to write a rule that
> a) uses !important
> b) has a selector priority higher then any other rule setting the
> text-decoration with !important
> so for a start try:
>
> a:visited {
> text-decoration: underline !important;
> color: #whatever-color-code !important;
> }
>
> if that does not work, as most of the rules that I have seen are
> ".class + tag" based it might be sufficient to do:
> div.tutorial a:visited { /* if your main-container div has
> class="tutorial" */
> ... see-above....
> }
>
> if that still does not work, extend the selector until you win against
> the java.net defined ones:
> #extend .the .selector #with. whatever #you .have #to .select .the
> .containing .block .of .the #tutorial .so .its #priority .gets .high
> .enough a:visited /* ;) */ {
> ...see-above....
> }
>
>
> read about the priority rules at w3c or a similar resource (i don't
> remember them anymore, because i rarely have to "patch" stylesheets
> not written by our company)
>
> Imre
>
> On 12.11.2007, at 02:31, Michael Phoenix wrote:
>
>> Interesting, but I visited some of the other urls that I didn't add
>> and they still had underlines. The weird thing is, I changed the
>> tutorial to have visited underlined and it didn't take, so I'm not
>> sure if adding a wrapper with the application class really will help,
>> but I'll give it a shot. Sure glad to hear I'm not the only one who
>> thinks the css set up for java.net <http://java.net> is a mess:-)
>>
>> On Nov 11, 2007 2:09 PM, Imre Oßwald <io_at_jevelopers.com
>> <mailto:io_at_jevelopers.com>> wrote:
>>
>> Oh ok,
>>
>> the underline and the lightblue color vanishes, if the link is
>> visited (which is why i did not see your problem).
>> It does not happen to the links in JSF or f.e.
>> https://jsftemplating.dev.java.net/
>> (so java.net <http://java.net> is not causing the "problem").
>>
>> The css is quite a mess, but as far as I can tell, you can solve
>> this by wrapping the whole content, that should have the links
>> into a container element (for example a <div>) with class
>> 'application'.
>> there is a rule:
>> .application a:visited
>> to set color and underlining
>>
>> Hope this helps,
>> Imre
>>
>>
>> On 11.11.2007, at 22:39, Michael Phoenix wrote:
>>
>>> Imre,
>>>
>>> Sure, I do have the information buried in the conversation, but
>>> here are the urls and the problem lines of text to make it
>>> easier to find..
>>>
>>> https://jsftemplating.dev.java.net/tutorials/pageSyntax.html
>>>
>>> The code for each factory may be found at <jsftemplating
>>> root>/src/java/com/sun/jsftemplating/component/factory/sun.
>>> Javadocs for this and any other code may be found at Javadocs
>>> Index
>>> <https://jsftemplating.dev.java.net/nonav/javadoc/index.html>.
>>>
>>> You can also create your own components as detailed in this link
>>> <https://jsftemplating.dev.java.net/doc/UserDefinedComponents.html>
>>>
>>> User Defined Components
>>> <https://jsftemplating.dev.java.net/doc/UserDefinedComponents.html>.
>>>
>>>
>>> https://jsftemplating.dev.java.net/tutorials/pageSyntax4.html
>>>
>>> check out this link http://www.roseindia.net/jsf/facet.shtml.
>>>
>>>
>>> https://jsftemplating.dev.java.net/tutorials/events1.html
>>>
>>> You can find a list of built-in events and handlers at this
>>> link: handler and event list
>>> <https://jsftemplating.dev.java.net/doc/eventsHandlersList.html>.
>>>
>>> Here is the documentation on how to create a handler:
>>> user-defined handlers
>>> <https://jsftemplating.dev.java.net/doc/UserDefinedEventHandlers.html>.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Nov 11, 2007 9:37 AM, Imre Oßwald <io_at_jevelopers.com
>>> <mailto:io_at_jevelopers.com>> wrote:
>>>
>>> Hi Mike,
>>>
>>> could you give me the URL where i can see that behavior? I
>>> could not find a page that does not have underlining and
>>> light-blue-color.
>>>
>>> Imre
>>>
>>> On 11.11.2007, at 03:21, Michael Phoenix wrote:
>>>
>>>> Ken,
>>>>
>>>> Somebody who knows a lot about how the site's default link
>>>> styles work needs to take a look at this. The links I added
>>>> are under the same css classes as old links that are
>>>> exhibiting underlining.
>>>> I tried over-riding by adding link selectors to the
>>>> tutorial class in site.css, which is within the jsft cvs
>>>> module, but it still doesn't work under java.net
>>>> <http://java.net>.
>>>> I think somebody who is responsible for the java.net
>>>> <http://java.net> stylesheets should give us a clue as to
>>>> what is going on here. Getting the links to display
>>>> consistently should not be this difficult.
>>>>
>>>> Mike
>>>>
>>>> On Nov 10, 2007 2:34 PM, Michael Phoenix
>>>> <michaelandrewphoenix_at_gmail.com
>>>> <mailto:michaelandrewphoenix_at_gmail.com>> wrote:
>>>>
>>>> Ken,
>>>>
>>>> The thing is, what java.net <http://java.net> is
>>>> enforcing isn't consistent. Many of the links are
>>>> underlined and colored. Only the ones that I have just
>>>> created are lacking. Also, if I understand you
>>>> correctly, you don't really have a preference as to how
>>>> I deal with this by style sheet or hard coded tags. Am
>>>> I correct here?
>>>>
>>>> Mike
>>>>
>>>> Mike
>>>>
>>>>
>>>> On Nov 9, 2007 9:32 PM, Ken Paulsen
>>>> <Ken.Paulsen_at_sun.com <mailto:Ken.Paulsen_at_sun.com>> wrote:
>>>>
>>>>
>>>>
>>>> Michael Phoenix wrote:
>>>>> Ken,
>>>>>
>>>>> No, I really don't have a clue why it would appear
>>>>> differently when it's in the java.net
>>>>> <http://java.net> environment than it does when I
>>>>> display it directly from my computer.
>>>> This is b/c the files served from java.net
>>>> <http://java.net> get merged w/ templates on the
>>>> server. The css that gets defined on the page
>>>> isn't just what is checked into the jsftemplating
>>>> web site. That's just how java.net
>>>> <http://java.net> does it.
>>>>
>>>>> I don't think that I have the access to mess with
>>>>> the server or anything outside of the JSFT
>>>>> soecific HTML I looked at the style sheet we have
>>>>> and it does not seem to have anything to do with
>>>>> underlining or color for the anchor tag. Adding
>>>>> code to the style sheet to enforce a uniform color
>>>>> and underlining for the links would be one answer.
>>>>> The problem is that the only way to "test" the
>>>>> changes would be to check them in and make them
>>>>> "live" on the Web site. The other possibility is
>>>>> simply putting color and underline tags in each
>>>>> anchor tag text area. What do you think?
>>>> I don't think it matters if the style has or
>>>> doesn't have the color / underlining. Whatever
>>>> style java.net <http://java.net> wants to impose is
>>>> fine with me. I think trying to fix it on a single
>>>> page will result in too much effort. I am fine
>>>> with you making lots of checkins to test the
>>>> changes... that's what I have had to do in the past
>>>> at times.
>>>>
>>>> I think you might be able to get all the generated
>>>> css by saving the page with Firefox (or maybe IE??
>>>> not sure). When you do this it will save all the
>>>> images, js, and css that is needed by the page as
>>>> well... although this might be more work than it is
>>>> worth since the generated HTML page is not the same
>>>> as the checked in html page... so you'd have to
>>>> cut/paste etc.
>>>>
>>>> Ken
>>>>
>>>>>
>>>>> Mike
>>>>>
>>>>> On Nov 8, 2007 1:58 PM, Ken Paulsen <
>>>>> Ken.Paulsen_at_sun.com <mailto:Ken.Paulsen_at_sun.com>>
>>>>> wrote:
>>>>>
>>>>>
>>>>> Hi Mike,
>>>>>
>>>>> Did you find an answer to the problem? If you
>>>>> think we should change the styles for the
>>>>> page(s), we can do this.
>>>>>
>>>>> Ken
>>>>>
>>>>> Michael Phoenix wrote:
>>>>>> I did the updates that I discussed here a few
>>>>>> days ago. However, I have one problem that I
>>>>>> cannot figure out. When creating a link
>>>>>> through <a> tag the text is underlined and
>>>>>> blue when I display the page through my
>>>>>> browser from the computer. However, when I
>>>>>> check in the page and look navigate to it
>>>>>> through the Web site, the underlining and
>>>>>> color change doesn't happen. Anybody know why
>>>>>> this is? I know that I could partially fix it
>>>>>> by adding underline and color tags, but would
>>>>>> have a heck of a time getting the right
>>>>>> color. The style sheet site.css doesn't
>>>>>> appear to effect underlining. Here are a
>>>>>> couple of lines from pageSyntax.html that
>>>>>> show this behavior:
>>>>>> <p>The code for each factory may be
>>>>>> found at <jsftemplating
>>>>>> root>/src/java/com/sun/jsftemplating/component/factory/sun.
>>>>>> Javadocs for this and any
>>>>>> other
>>>>>> code may be found at <a
>>>>>> href="https://jsftemplating.dev.java.net/nonav/javadoc/index.html">Javadocs
>>>>>> Index</a>. </p>
>>>>>> <p>You can also create your own
>>>>>> components as detailed in this link <a
>>>>>> href="https://jsftemplating.dev.java.net/doc/UserDefinedComponents.html
>>>>>> <https://jsftemplating.dev.java.net/doc/UserDefinedComponents.html>">User
>>>>>> Defined Components</a>.</p>
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>