JSF Converter - bug

When J associate my converter to HtmlDataTable(h:dataTable) in JSF(JSP) page in 'Design' tab appear problems:
1) in dataTable there isn't any column visable
2) everything below dateTable in same Panel Grid aren't visable
All this affect only 'Design' tab. In 'Source' tab everything is OK and when J run application everithing work like it should.
Is this bug or can be fixed somehow?

Hi.
J solve the problem partly and here is the problem and solution:
Problem - JDeveloper 10.1.3 have problem in showing table when code look like this:
<h:dataTable width="350" value="#{infoBean.popular}" var="popular_">
<h:column>
<f:facet name="header">
<h:panelGroup>
<h:commandLink action="POPULAR">
<h:outputText value="Najpopularnije"/>
</h:commandLink>
</h:panelGroup>
</f:facet>
<h:commandLink>
<h:outputText value="#{popular_}" converter="ProductTitle"/>
</h:commandLink>
</h:column>
</h:dataTable>
Solution - When J change code to this 'Design' tab shows the table but not the text in 'outputText'(here #{popular_}):
<h:outputText value="#{popular_}">
<f:converter converterId="ProductTitle"/>
</h:outputText>
Please try this!

Similar Messages

  • Injecting EJB to JSF Converter

    Is it possible to inject EJB (or at least EntityManager) to JSF Converter or Validator?
    I don't know if i'm missing something or is it just impossible - it works when injecting EJB into Managed Bean.
    Thanks.
    S&#322;awek S.

    Slawek_Sobotka wrote:
    Thanks.
    So I'll redefine my question to be problem oriented:
    I have SelectItem that contains Address object.
    I have implemented AddressConverter so that it converts Adress to String simply by using it's id.
    How to convert back: from string (address's id) do Address object?Map it. Two general ways are mentioned here: [http://balusc.blogspot.com/2007/09/objects-in-hselectonemenu.html].
    I would like to load it form DB...That's a bit too expensive for less or more static data.
    Another solutions are:
    - SelectItem should contain address.id instead of address. Than no converter is need. My ManagedBean is reposnsible for translating ids do entities. Works but primitive.JSF can't help that HTTP/HTML only understands Strings (by the way, primitives are also already implicitly converted by EL, you only don't know that).
    - Converter is created by factory method of Managed Bean. MB sets address list to the converter while creating it. List shouldn't be huge if it is used in GUI.
    drawback: loading list in BB twice because converter is used while rendering and while decoding.
    - In converter try to possess MB that has EJB and call method that reutrns entities, sth like this: facesContext.getApplication().getELResolver()...Reloading static data on every request makes als no sense.
    Retoric question: what for are useful JSF Converters?To convert between Object and String, so that it can be passed through HTTP request/response and displayed/taken in HTML.

  • Jsf: paletteTransparencyType bug?

    i have a jsf problem ive been trying to solve for hours
    now.....i need to export images as 8 bit png's with alpha
    transparency.
    <code>
    var ex = new ExportOptions();
    ex.exportFormat = "PNG";
    ex.colorMode = "indexed";
    ex.paletteTransparencyType = "rgba";
    fw.getDocumentDOM().setExportOptions(ex);
    fw.exportDocumentAs(d, savePath, null);
    </code>
    when i run this script, my images get saved, but not with
    transparency. the optimize palette says "No Transparency" no matter
    what i set paletteTransparencyType to.
    is this a bug, or am i doing something wrong.

    yes, the canvas is tranparent.
    i actually solved this, and found an error in the extending
    fireworks documentation. after changing a few options in the
    optimize palette, i took the history steps and converted them to
    jsf to see what it was doing.
    the documentation states that paletteTransparencyType is a
    property of the ExportOptions object, when in fact it is not. the
    correct property is paletteTransparency. wow....that had me
    scratching my head for hours.
    so the correct jsf would be:
    <code>
    var ex = new ExportOptions();
    ex.exportFormat = "PNG";
    ex.colorMode = "indexed";
    ex.paletteTransparency = "rgba";
    fw.getDocumentDOM().setExportOptions(ex);
    fw.exportDocumentAs(d, savePath, null);
    </code>
    i submitted this to adobe last night.

  • Parametrized JSF Converter

    Hello
    my question:
    for example i have a h:selectOneMenu, witch present the streets in the any (chose before) town
    this selection in xhtml page looks like
    <h:selectOneMenu id="town_4"     value="#{locationAddAction.street}" immediate="true">
         <f:selectItems value="#{locationAddAction.streetLookup}" />
         <fmedia:streetConverter town="#{locationAddAction.town}" />
    </h:selectOneMenu>in my project i need to convert a string into Street object stored in DB
    but there are can be many streets with the same names, but difference in town reference
    so i need the town attribute in converter
    my converter class extends javax.faces.convert.Converter
    public class StreetConverter implements Converter {
         private LocationService locationService = new LocationService();
         private Town town;
         @Override
         public Object getAsObject(FacesContext arg0, UIComponent arg1, String arg2) {
              Town town = locationService.getStreetByNameMatch(town,arg2)
              return town;
         @Override
         public String getAsString(FacesContext arg0, UIComponent arg1, Object arg2) {
              if (arg2 instanceof Street)
                   return ((Street) arg2).getName();
              return null;
         public Town getTown() {
              return town;
         public void setTown(Town town) {
                    this.town = town;
    }i registered my converter with parameter in faces-config.xml
    <converter>
              <converter-id>streetConverter</converter-id>
              <converter-class>package.StreetConverter</converter-class>
              <attribute>
                   <attribute-name>town</attribute-name>
                   <attribute-class>package.Town</attribute-class>
              </attribute>
         </converter>and create my facelet tag
    <tag>
              <tag-name>streetConverter</tag-name>
              <converter>
                   <converter-id>streetConverter</converter-id>
              </converter>
         </tag>PROBLEM:
    any request to my converter (StreetConverter, <fmedia:streetConverter>) set the new creation of my Converter
    but the initialization of "town" field happend only once in creation page (when i'm requesting whole jsf page) and any request to converter is erasing my town parameter, becouse it has been init in another converter object.
    how can i initialize town attribute in all requests to converter ?
    sorry my horrible english
    thanks =)

    Use f:attribute:<h:someComponent>
        <f:converter converterId="streetConverter" />
        <f:attribute name="town" value="#{bean.town}" />
    </h:someComponent>
    public X getAsX(FacesContext context, UIComponent component, Y value) {
        Object town = component.getAttributes().get("town");
    }Alternatively just get the bean from context:
    public X getAsX(FacesContext context, UIComponent component, Y value) {
        Bean bean = (Bean) context.getApplication().evaluateExpressionGet(context, "#{bean}", Bean.class);
        Town town = bean.getTown();
    }

  • JSF editor Bug ?

    Hi everybody i'm trying the new jdeveloper 10.1.3 with jsf support , and after use it sometime, i realize that the jsf editor is not synchronizing very well the components on the backing code with the jsp document , when the backing code class isn't compiling (and it's saved in this state). This is a terrible source of error when you don't know it ...
    the question is , this is a normal behaviour or horrible bug ?

    Thanks, but that's not what i mean, you modify the components in the property inspector, but you don't write the methods code on the property inspector.The problem is when that code isn't compiling, if you keep using the jsp design view, the backing bean stops being updated ... if you dont realize of this bug you got desync the view with the backing ... :S

  • Struts-faces & JSF commandLink bug in RI 1.1

    Hello,
    There was a bug with JSF, multiple forms and commandLink as discussed in thread: http://forum.java.sun.com/thread.jsp?thread=526788&forum=427.
    This bug is now fixed for JSF h:form form type.
    I personnally use Struts and JSF with the struts-faces JAR and this issue is still not fixed when you create a form using the s:form tag, in fact as long as there is a s:form on the page the commandLinks do not work the same way as first reported for pure JSF apps.
    Will this be fixed anytime soon in the struts-faces library? I hope so because I do need it.
    Thanks
    Xav

    hi,
    i guess [email protected]
    or
    http://issues.apache.org/bugzilla/enter_bug.cgi?product=Struts
    might be a better place for that.
    regards.

  • JSF Converter Error

    Hi, I have the following:
    JSF 1.2 RI
    Sun App Server 9 Update 1 Patch 1
    Models:
    public interface Model {
      int getId();
      String getName();
    public class Model1 implements Model {
      public int getId() {
        return 1;
      public String getName() {
        return "One";
    public class Model2 implements Model {
      public int getId() {
        return 2;
      public String getName() {
        return "Two";
    Controller:
    public class TestController {
      private Model model;
      private List<Model> models;
      public TestController() {
        models = new ArrayList<Model>();
        models.add(model = new Model1());
        models.add(new Model2());
      public Model getModel() {
        return model;
      public void setModel(Model model) {
        this.model = model;
      public List<SelectItem> getModels() {
        List<SelectItem> list = new ArrayList<SelectItem>();
        for (Model model : models)
          list.add(new SelectItem(model, model.getName()));
        return list;
      public Model findModel(int id) {
        for (Model model : models) {
          if (model.getId() == id)
            return model;
        return null;
    Converter:
    public class ModelConverter implements Converter {
      public Object getAsObject(FacesContext facesContext, UIComponent uiComponent, String string) {
        TestController controller = (TestController) facesContext.getExternalContext().getSessionMap().get("testController");
        return controller.findModel(Integer.parseInt(string));
      public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object object) {
        return String.valueOf(((Model) object).getId());
    View:
    <%@ page contentType="text/html" %>
    <%@ page pageEncoding="UTF-8" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <html>
    <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
      <title>Test JSF</title>
    </head>
    <body>
    <f:view>
      <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
      <h1>Test JSF</h1>
      <h:form>
        <h:panelGrid columns="2">
          <h:outputText value="Model:"/>
          <h:selectOneMenu value="#{testController.model}">
            <f:selectItems value="#{testController.models}"/>
          </h:selectOneMenu>
        </h:panelGrid>
      </h:form>
    </f:view>
    </body>
    </html>
    faces-config.xml:
    <?xml version='1.0' encoding='UTF-8'?>
    <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
                  version="1.2">
      <converter>
        <converter-for-class>com.test.model.Model</converter-for-class>
        <converter-class>com.test.converter.ModelConverter</converter-class>
      </converter>
      <managed-bean>
        <managed-bean-name>testController</managed-bean-name>
        <managed-bean-class>com.test.controller.TestController</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>
    </faces-config>
    The problem:
    When I run the app, JSF throws the following error:
    javax.servlet.ServletException: Cannot convert com.test.model.Model2@ba30aa of type class com.test.model.Model2 to class com.test.model.Model1
    root cause
    java.lang.IllegalArgumentException: Cannot convert com.test.model.Model2@ba30aa of type class com.test.model.Model2 to class com.test.model.Model1Is there any limitation on converters to prevent using a single Converter for a base class (or interface like Model) and subclasses (like Model1 and Model2)?
    I've tried this using JSF 1.1 RI, Apache MyFaces 1.1 and the error is still there.
    Thanks!

    This sounds like Issue 442, which was resolved in 1.2_03. If I recall right, V1 P1 is 1.2_02. Please upgrade JSF to 1.2_04 [2]. The download section has an updater for GlassFish.
    [1] https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=442
    [2] https://javaserverfaces.dev.java.net/servlets/ProjectDocumentList?folderID=7089&expandFolder=7089&folderID=0

  • UIX - JSF converter

    Hi,
    Did anyone succeded in converting BC4J+UIX project into BC4J+JSF? Available converter fails to convert even small project with one page with one table on UIX page...
    Any success stories?
    Leszek

    Hi,
    When I try to run generated jspx page through struts, I get following error in browser:
    500 Internal Server Error
    java.lang.IncompatibleClassChangeError
    at oracle.cabo.share.xml.ParseErrorUtils.getErrorMessage(Unknown Source)
    at oracle.cabo.share.xml.ParseErrorUtils.log(Unknown Source)
    at oracle.cabo.ui.xml.parse.UINodeParser._parseBinding(Unknown Source)
    etc.
    I run it through struts because converter puts on struts my simple page. It doesn't put it on faces-config. However even when I try to run it through faces (I change url in browser by adding 'faces/' and changing extension from '.do' to '.jspx' I still get an error:
    500 Internal Server Error
    javax.faces.el.EvaluationException: com.sun.faces.el.impl.ElException: No function is mapped to the name "ctrl:createSortableHeaderModel"
         at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:188)
         at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
         at oracle.adf.view.faces.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:55)
    I think that converted page shouldn't contain el expressions that are used to create sortable table headers.
    Anyway, converter is unable to convert so simple project into working JSF project... so it's not helping us in our work.
    Leszek
    P.S. I've sent simple UIX testcase to you. It's ounconverted so you may do it by yourself to be sure that the problem so not related to wrong conversion method...

  • JDev JSF Reformatter Bug

    Hi all,
    Been meaning to post about this for some time but never found the time :-)
    Using JSF, if I have an outputText with the escape attribute set to false and the value set to &amp;nbsp; (because I want to put a non breaking space on my page) everything is great until I reformat the JSP. Upon reformatting, the &amp;nbsp; is replaced with a normal space, and JDev complains of a malformed input character on that line in the JSP.
    The system is still usable, although the nbsp doesn't show in the output page of course.
    Just a minor annoyance ;-)
    Ta,
    Steve.

    We're tracking this via bug ID 2789824 - if you have a support contract, this is visible on http://metalink.oracle.com.
    Thanks,
    Brian
    JDev Team

  • JSF JSP Bug

    The JSF JSP Wizard has a bug.
    1. Select File>New>Web Tier>JSF>JSF JSP.
    2. Click on Next. Specify file anme. Click on Next.
    3. Automatically Expose UI Compoenents in a Existing Managed Bean radio button does not get selected.

    A managed bean is the same as a backing bean except that the managed bean is managed by the JSF framework.
    http://groundside.com/blog/DuncanMills.php?title=so_what_is_a_backing_bean&more=1&c=1&tb=1&pb=1
    If a managed bean with a page binding is defined, the Automatically Expose UI Components in an Existing Managed Bean button does not become selectable.
    The Automatically Expose UI Components in an Existing Managed Bean button should be selectable to check which managed beans have already been created.

  • HP PRIME : convert() bug in CAS mode (firmware 8151)

    Hello,A bug appears when trying to convert units in CAS mode.how to reproduce: go to CAS mode,type: CONVERT(0_K,1_°C)and you will get this result : −272.15_(譕菬⓬璡扱㌁觅ﱅ譖౵譗ࡽ亊訂Ⓛ㰏甃Ⴡʹヲ謆၏ҡ抹謁袔ॄ) as you see somthing goes wrong in unit name... for info : It's the most recent firware (from july 2015) 8151. 

    Please let us know some examples of expressions that you tried, what you expected, and what happened instead.  ALSO please let us know what modes your Prime is in (e.g. RPN Entry mode, or CAS view), because Prime behaves very differently depending on the Home Settings and CAS Settings.  Which app is the currently active app (shown in the display's title bar) can also alter Prime's behavior.  When you let us know these things, we'll be able to discern why you are getting syntax errors.
    If I were a betting man, I'd wager a nickel that the problem is due to your Prime being in RPN mode.  If so, you have to use RPN syntax, not algebraic syntax.  Example: 5_ft, Enter, 1_in, Enter, CONVERT --> 60_in (just like on your HP 48).  Do I win a nickel?
    Disclaimer: I do not work for HP. I'm just another happy HP calculator user.
    -Joe-

  • JSF Converter how to use property in faces-config

    I have made an Converter for my listbox, and it is working.
    Now I want to use a property to change the behavior of the converter.
    My faces-config looks like this:
    <!-- Converters -->     
    <converter>
    <converter-for class>model.PacemakerBranche</converter-for-class>
         <converter-class>cconverter.BrancheConverter</converter-class>
         <property>
              <property-name>test</property-name>
              <property-class>java.lang.String</property-class>
              <default-value>12345</default-value>
         </property>
    </converter>
    I try to set the test property to 12345.
    The setTest(String test) is not set.
    What am I doing wrong??
    My converter looks like this:
    public class BrancheConverter implements Converter {
    private String test;
    public String getTest() {
    System.out.println("getTest " + test);
    return test;
    public void setTest(String test) {
    System.out.println("setTest " + test);
    this.test = test;
    public Object getAsObject(FacesContext ctx, UIComponent component,
    String value) {
    return getMgr(ctx).getObject(model.PacemakerBranche.class, new Long(value));
    public String getAsString(FacesContext ctx, UIComponent component,
    Object object) {
    return ((BaseObject) object).getId().toString();
    private Manager getMgr(FacesContext ctx) throws HibernateException {
    return (Manager) FacesContextUtils.getWebApplicationContext(ctx).getBean("manager");
    }

    You can't use f:converter tag for setting properties.
    There are two ways you can use:
    (1) use f:attribute tag
    ex.<h:inputText value="#{...}"/>
      <f:converter converterId="...."/>
      <f:attribute name="test" value="#{...}"/>
    </h:inputText>Note that you should get the value of the attribute from the UIInput component, something like:comp.getAttributes.get("test");(2) develop a custom converter tag.

  • Shape/Path - transform/convert -bug?

    I have noticed a few subtle UI changes in PShop CC -some of which seem like bugs. Here's one:
    When I apply "transform" to a newly created Elipse path (which has been pre-specified as a path), I get this prompt:
    "This operation will turn a live shape into a regular path. Continue?"
    But the elipse I have created is NOT a shape. The Path option has alrady been selected. Yes, this is a very minor quibble, but as a former beta (and alpha) tester, I tend to be compulsively thorough! OTOH, perhaps there is a user error on my part. I did double check that new paths created with elipse tool are spec'd as "paths".
    thanks

    There are some issues with the new shapes.  I'm not 100% sure on this but they now have "Live shapes" where you can set some of the shape/path properties like how rounded the curves are on a rounded rectangle.  So I guess the elipse also has some "Live" properties.  However, once you transform the shape/path, you lose the ability to edit those properties and the shape/path becomes a regualar shape/path.  I suppose it would be good for them to specify in the alert what exactly on what you working - path or shape.

  • Av to dv convert  bug?

    When I had imovie4 I was able to send my vhs recordings via my cannon750i to Imovie no problem. Then I upgraded to 5 which stopped all that. Hoping this problem would be resolved in imovie6 has also proved to be unfruitful I would just like to know why it was removed in the first place or am going to have to go back to the future and keep switching to imovie 4 for my initial transfer? If theres anyone esle with the same problem I would like to hear from you.. perhaps you know another way around the problem....
    G5   Mac OS X (10.4.4)   G5 2Gb Ram 2Gb

    Hi John,
    sorry for insisting, but it CAN be a firewire issues... it would help, you're telling us your camera model...
    iMovie: Cannot See or Control Camera
    http://docs.info.apple.com/article.html?artnum=43000
    What to do if your computer won't recognize a FireWire device
    http://docs.info.apple.com/article.html?artnum=88338
    See the Sony fix here:
    http://danslagle.dvmix.com/mac/iMovie/usage/5020.shtml

  • Reusable JSF components - bundling a converter with a text field

    I am trying to create reusable text fields for different types of data (notes, amounts, percentages) that will use a JSF converter to implement formatting.
    Here is what I have done
    - created an application in JDeveloper that contains my components as JSF declarative components
    - created the Converter classes
    - registered the converter classes in faces-config.xml of the reusable components project
    - added my Converters to the inputText fields for each of my declarative components using the property palette
    - deployed the components as a jar file using the ADF Library Jar File archive type
    - created a second application to act as a consumer of the components
    - imported the jar file into the component palette using a file system connection
    - added the jar file to the active project's component library
    - added a converter entry for the converter I am trying to use to this project's faces-config.xml
    - created a consumer jspx page and dragged and dropped the control onto the page
    I put some system.outs in the getAsString() and getAsObject() methods of the converter I am trying to use and they are not output when I run the page. I've also set breakpoints in those methods to see if they are being called.
    I have no indication that my converter is being called.
    Can someone please confirm that what I am trying to do is possible using the declarative components?
    Any insight appreciated.
    Dave

    Actually this is working. I made the incorrect assumption that getAsString() in the converter class would be called on the initial request.
    Another thing I just noticed is that it is not necessary to reference the converter in the faces-config.xml of the consuming project. Not sure how this works, but its a nice feature :)

Maybe you are looking for