facebook

JSF 2.3 Bean properties autocompletion in html

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)

Tagged: ,

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #660977 Reply

    yane-pouche
    Participant

    how to get this auto completed in html:

    #{productCard.thumbnail.img.alt}

    this is a ViewScoped bean property.

    i have tried to get this work using the eclipse plugin JavaBean inspector 1.3.0. But it same not to be compatible with myeclipe, so it is not working

    I’m using myeclipe for javaEE 2020.5.18.b (without code mix).

    please, dont tell me to use code mix. resource comsumption in eclipse is very hight with the codemix tools installed

    #660987 Reply

    support-swapna
    Moderator

    Hi,

    I could install JavaBean Inspector plugin to MyEclipse 2020.5.18b successfully using this update site url. I installed it via Help > Install from Site dialog.

    If you are still seeing issues with the plugin, then please let us know what exact errors you are seeing. Regarding the autocomplete, can you please share with us a sample project to help us check at our end? Since it is a development related query, we will need to see how the code is referenced.

    Regarding CodeMix, we do not recommend CodeMix editor for Java files. The regular MyEclipse editor serves well for Java and JSP editors.
    Sorry that you experienced performance issues with CodeMix. When was the last time you worked with CodeMix? If its been a while, then you can give our latest release, 2020.4.7 a try and see if you are still experiencing performance issues.

    –Swapna
    Genuitec Support

    #660996 Reply

    yane-pouche
    Participant

    Hello, i wont use code mix because i noted that, code mix every time i opened a file, this file get indexed first and i could not edit or read the file until codex mix have finished wit index calculation. Some time, i must close the file and open it again to editd it. even, in html file, when i hit Ctrl+Space, for auto completion, only html/css tag whas showed to me as option. JavaBean properties was hot showed.

    the last myeclipse version i was used before was myeclipse-codemix-2020.5.18a-offline-installer-windows

    Regarding JavaBean Inspector, the plugin was installed successfully. In myeclpise under Help -> Help Contents, i can read about how to use JavaBean INspector.

    1- the JavaBean have been selected (Ctrl+Alt+8)
    2- Ctrl+Alt+Space should active the Contextual Path selector which allow me the auto compled the right java bean attribute/property.

    => the problem ist, nothing occure when i hit Ctrl+Alt+8. I have check it, but there is not Key bindings konflict or warning

    Antother question should be: must i use a separate plugin to get this work for my Myeclipse installation? if not, how can i achieve this?

    • This reply was modified 4 years, 5 months ago by yane-pouche.
    #661065 Reply

    support-swapna
    Moderator

    Hi,

    Sorry for your experience with CodeMix.
    About indexing with CodeMix, which file type did you see the problem with? Possible that the engine was still in connecting/starting state and you wouldn’t be able to edit the file until the engine is connected.

    Regarding the autocomplete of Java Bean, for specific development related queries, we need to see the source code to verify at our end. Please share the zipped project with us or create a sample project which exhibits the problem and share it with us. If you cannot share the project publicly, then you can email us the project to support@genuitec.com with a reference to this post.

    –Swapna
    Genuitec Support

    #661519 Reply

    yane-pouche
    Participant

    Hello Swapna.
    Here is the step to reproduce this problem:

    1- Create a javaee web project. The artifact created should be from type WAR.
    2- Create a Java Class with name e.g. Product an anotate this class with @javax.inject.Named and @javax.faces.view.ViewScoped. This class must have a standard default (no argument) constructor
    3- add private members in this class from type String. Generate Getter and Setter for this private members.
    4- Create an html page. Whiting this page try to access a property of the created class Product (hit ctrl + space for auto completion).

    For this Project, the folowing facets are activated: java11, JavaScript, JavaServerFaces, Dynamic Web MOdule 3.1, M2e maven dependency, CDI 2.0,

    #661562 Reply

    support-swapna
    Moderator

    Hi,

    Thank you for the steps.
    The auto complete works fine in a JSP file when I import the java class to it. I am not sure if its expected to work in a HTML file and it depends on how exactly you are referencing the class in the HTML file.

    Can you please share the zipped project created with the steps you mentioned to help us check your HTML file?

    –Swapna
    Genuitec Support

    #661571 Reply

    yane-pouche
    Participant

    Hi,
    this is how i’am referencing the bean-property in html page which is a JSF – Page:

    #{productCard.description.seller.page.text}

    i think, you don’t really need a zipped project to check this behaviours.

    – productCard is a “ManagedBean” ‘s name which is per default the class name with first letter not capitalized.
    – description is a private member of that ProductCard class.

    The Bean’s members are really get autocompleted in html (JSF page) when i’m using JBOSS tool. Unfortunately, in myEclipe some features of JBOSS tool like JSF support can not get installed.

    In the current version of Eclipse wich is the relaease 2020-06 (4.16.0), i have installed the JBOSS tool Plugin with all its features and every thing work very well.

    #661574 Reply

    support-swapna
    Moderator

    Hi,

    MyEclipse is packaged with JBoss tools and it cannot be upgraded manually due to the existing dependencies.
    Our next release, will be based on Eclipse 2020-06 and all third party tools will be updated basing on the compatibility with Eclipse 2020-06. Hopefully this issue will also be addressed with our next release.

    We will keep you posted about the release schedule.

    Apologies for inconvenience caused.

    –Swapna
    Genuitec Support

    #661576 Reply

    yane-pouche
    Participant

    thanks…
    i’m just waiting….

    Please can you also tell me, when the next release based on eclipse 2020-06 is planed?
    can you also tell me if all JBOSS tool features will be supported?

    But also assume that, this feature where JSF-Bean property are referenced in html page using EL (Expression of language) with auto-completion when typing or hiting ctrl+space in html file “must” be an standard html editor feature for people developing jsf application using myEclipse


    @see
    : https://docs.oracle.com/javaee/6/tutorial/doc/gjddd.html

    Please check out the attachments. This are screenshots which show how code completion proposals look like when i use the jboss tool in eclipse (file JBOSS-JSF-EL-Proposal.png) and when i use myEclipse in the current version. to get this proposals in a html editor, i just press Ctrl+Space

    • This reply was modified 4 years, 4 months ago by yane-pouche.
    • This reply was modified 4 years, 4 months ago by yane-pouche.
    Attachments:
    You must be logged in to view attached files.
Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: JSF 2.3 Bean properties autocompletion in html

You must be logged in to post in the forum log in