Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JavaServer Faces » Accessing Bean Functions and Names from xhtml page
Accessing Bean Functions and Names from xhtml page [message #682267] Fri, 10 June 2011 14:15 Go to next message
Hauke  is currently offline Hauke
Messages: 2
Registered: June 2011
Junior Member
Hello everyone,

I am kind of new with jsf, and I also got this working before, but now its not working anymore. I tried to search here inside the forum but I am not sure about the exact wording or name of the function.

If I have a bean (TestBean.java) and if I am inside an xhtml page and I type something like

<h:outputText value="#{TestBean.

I want all available methods to display (after ctrl+space), but this isn't working anymore.

What is the name of this function? Is that called tab-completion or code-completion?

Many greetings,
Hauke

PS: Using JSF 2.0 and the latest eclipse version
Re: Accessing Bean Functions and Names from xhtml page [message #682275 is a reply to message #682267] Fri, 10 June 2011 14:32 Go to previous messageGo to next message
Russell Bateman is currently offline Russell Bateman
Messages: 3148
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 10-Jun-11 12:15, Hauke wrote:
> Hello everyone,
>
> I am kind of new with jsf, and I also got this working before, but now
> its not working anymore. I tried to search here inside the forum but I
> am not sure about the exact wording or name of the function.
>
> If I have a bean (TestBean.java) and if I am inside an xhtml page and I
> type something like
>
> <h:outputText value="#{TestBean.
>
> I want all available methods to display (after ctrl+space), but this
> isn't working anymore.
>
> What is the name of this function? Is that called tab-completion or
> code-completion?
>
> Many greetings,
> Hauke
>
> PS: Using JSF 2.0 and the latest eclipse version

In Eclipse it's called "Content Assist". You're on the right track.
Re: Accessing Bean Functions and Names from xhtml page [message #682470 is a reply to message #682275] Sat, 11 June 2011 03:01 Go to previous messageGo to next message
Hauke  is currently offline Hauke
Messages: 2
Registered: June 2011
Junior Member
Hi,

thanks for the information. But I think that content assist is if you enter
<h:
And you get all possible tags starting with <h:

That is working fine, but the accessing of the beans isn't working. Does anyone has
an idea?

Thanks and many greetings,
Hauke
Re: Accessing Bean Functions and Names from xhtml page [message #684508 is a reply to message #682470] Wed, 15 June 2011 13:24 Go to previous messageGo to next message
Ian Trimble is currently offline Ian Trimble
Messages: 137
Registered: July 2009
Senior Member
Both forms are known as content assist, but let's not dwell on that. Have you declared the Java class as a Managed Bean named "TestBean"?
Re: Accessing Bean Functions and Names from xhtml page [message #684599 is a reply to message #684508] Wed, 15 June 2011 18:07 Go to previous messageGo to next message
Richard A. Sitze is currently offline Richard A. Sitze
Messages: 3
Registered: July 2009
Junior Member

May or may not be the issue here: Content assist only works with managed beans defined in the faces-config.xml file; JSF 2.0 managed beans declared by the @ManagedBean annotation are not recognized as such by the eclipse JSF tooling (hence content assist fails) - see bugs [306428, 323709, ...].

I've been hoping that the new Indigo release would fix this, but it appears these bugs are "deferred for future" resolution.
Re: Accessing Bean Functions and Names from xhtml page [message #684601 is a reply to message #684599] Wed, 15 June 2011 18:18 Go to previous messageGo to next message
Ian Trimble is currently offline Ian Trimble
Messages: 137
Registered: July 2009
Senior Member
Sorry, I missed the JSF 2.0 connection - Richard is, of course, absolutely correct. We didn't have the resources available to make the necessary enhancements in the Indigo timeframe. We do welcome contributions to the project, though.
Re: Accessing Bean Functions and Names from xhtml page [message #684639 is a reply to message #684601] Wed, 15 June 2011 20:51 Go to previous messageGo to next message
Richard A. Sitze is currently offline Richard A. Sitze
Messages: 3
Registered: July 2009
Junior Member

Ian Trimble wrote on Wed, 15 June 2011 18:18
.... We do welcome contributions to the project, though.


If you or anyone would take the time to get me up to speed on:
a) how to setup eclipse dev env for eclipse/JSF
b) generally where to start

I'd be happy to take a look at the code & see if I can come up with a solution to contribute when/if/as my schedule opens up a bit. Busy busy busy Smile

Just FYI, while it's been a while, I do have some history with Apache open source projects (axis, commons-logging & commons-discovery).

<ras>
Re: Accessing Bean Functions and Names from xhtml page [message #686680 is a reply to message #684639] Wed, 22 June 2011 13:36 Go to previous messageGo to next message
Ian Trimble is currently offline Ian Trimble
Messages: 137
Registered: July 2009
Senior Member
Since JSF Tools is a sub-project of WTP, a good place to start would be http://www.eclipse.org/webtools/development/. The way I approach development is to grab a recent version of WTP and pre-reqs, setup a CVS connection (until you're a committer, you can get read-only anonymous access - see links from the WTP dev page, above), and get JSF plug-ins that you are interested in developing. Then, you can contribute any work by logging a bug or enhancement request against JSF Tools and attaching a patch; we do our best to try to find time to look at contributed patches.
Re: Accessing Bean Functions and Names from xhtml page [message #690173 is a reply to message #686680] Wed, 29 June 2011 02:11 Go to previous messageGo to next message
nicolasdiogo  is currently offline nicolasdiogo
Messages: 7
Registered: March 2010
Junior Member
thanks for the question

i was coming here to ask this very question (find a solution)
i have added annotations to my classes as per JSF2 docs - but i find that Eclipse Indigo does not recognise my classes when trying to use "Content Assist",

the solution while developing seems to use the "faces-config.xml" to register my classes - when the "Content Assist" starts to work as expected.

has this been filled as a bug or an enhancement anywhere?

thanks a lot
Re: Accessing Bean Functions and Names from xhtml page [message #690518 is a reply to message #690173] Wed, 29 June 2011 12:12 Go to previous messageGo to next message
Ian Trimble is currently offline Ian Trimble
Messages: 137
Registered: July 2009
Senior Member
Yes, a number of times, in Bugzilla. Here's one that I found quite quickly: https://bugs.eclipse.org/bugs/show_bug.cgi?id=306428.
Re: Accessing Bean Functions and Names from xhtml page [message #690778 is a reply to message #690518] Thu, 30 June 2011 04:10 Go to previous message
nicolasdiogo  is currently offline nicolasdiogo
Messages: 7
Registered: March 2010
Junior Member
thanks Ian,

lets hope support is added soon(ish)
Previous Topic:newbie,
Next Topic:"Finish"-Button not responding
Goto Forum:
  


Current Time: Fri Aug 22 06:07:50 EDT 2014

Powered by FUDForum. Page generated in 0.01866 seconds