web application, woodstock, drop down list, Option Title, —

View: New views
4 Messages — Rating Filter:   Alert me  

web application, woodstock, drop down list, Option Title, —

by ramiroBot :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

im trying to set a Option title with:

OptionTitle o = new OptionTitle("my title");

and the output i get is :

— mytitle —

in a Drop Down List, from woodstock components in a web application.

i cant see to figure it out when the error started, i have been having some problem working with tomcat for another reasons, and when i go back to glassfish this started to happen. i even reinstalled netbeans and glassfish. the other options on the drop down list render without problem, this happens just with the title. if something for misconfigured with a previous install of netbeans, could it be that the new install reused it from a file? in a probably related issue, the server doesnt transform the woodstock tag code in html, and i get a blank page with woodstock tags in the source.

btw, the problem with — happened in two different machines, in different projects.

Any help will be appreciated.

Re: web application, woodstock, drop down list, Option Title, —

by Futaleufu_John :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm not sure how this will help but — represents an mdash character in HTML. Why it appears, I can't say, but this might give you a place to start.

ramiroBot wrote:
OptionTitle o = new OptionTitle("my title");

and the output i get is :

— mytitle —

btw, the problem with — happened in two different machines, in
different projects.

Re: web application, woodstock, drop down list, Option Title, —

by ramiroBot :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Simple sanity check: maybe someone could try to reproduce this error? i have just tried in another machine, and i got the same wrong result. here is what you need:

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
a backing bean:

package newpack;

import com.sun.webui.jsf.model.Option;
import com.sun.webui.jsf.model.OptionTitle;
import java.util.Vector;

public class NewClass {
    private Vector<Option> vec = new Vector<Option>();

    public Vector getVec() {
        return vec;
    }

    public void setVec(Vector vec) {
        this.vec = vec;
    }

    public NewClass() {
        vec.add(new OptionTitle("title"));
        vec.add(new Option("1", "a"));
        vec.add(new Option("2", "b"));
    }
   
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

a visual web page with a drop down list:

<?xml version="1.0" encoding="UTF-8"?>

<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
        <webuijsf:page id="page1">
            <webuijsf:html id="html1">
                <webuijsf:head id="head1">
                    <webuijsf:link id="link1" url="/resources/stylesheet.css"/>
                </webuijsf:head>
                <webuijsf:body id="body1" style="-rave-layout: grid">
                    <webuijsf:form id="form1">
                        <webuijsf:dropDown id="dropDown1" items="#{myobj.vec}" style="position: absolute; left: 96px; top: 72px"/>
                    </webuijsf:form>
                </webuijsf:body>
            </webuijsf:html>
        </webuijsf:page>
    </f:view>
</jsp:root>

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

and a managed bean in faces-config:

<managed-bean>
        <managed-bean-name>myobj</managed-bean-name>
        <managed-bean-class>newPack.NewClass</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

we are looking to see if the hifens before and after the title on the drop down list gets rendered, or we get something like:
&#8212; title &#8212;

Thanks in advance.







On Wed, Jul 23, 2008 at 9:27 AM, Futaleufu_John <jhalupka@...> wrote:

I'm not sure how this will help but &#8212; represents an mdash character in
HTML. Why it appears, I can't say, but this might give you a place to start.


ramiroBot wrote:
>
> OptionTitle o = new OptionTitle("my title");
>
> and the output i get is :
>
> &#8212; mytitle &#8212;
>
> btw, the problem with &#8212; happened in two different machines, in
> different projects.
>

--
View this message in context: http://www.nabble.com/web-application%2C-woodstock%2C-drop-down-list%2C-Option-Title%2C---8212--tp18600508p18609615.html
Sent from the Netbeans - Users mailing list archive at Nabble.com.



Re: web application, woodstock, drop down list, Option Title, &#8212;

by Futaleufu_John :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here's part of the Javadoc for OptionTitle.

Use the OptionsTitle class to add a Title to a list or array of Options. The label text will be rendered marked by dashes.

Note marked by dashes. That's where your &#8212; are coming from. They represent mdashes in HTML. Here's what it looks like: —.