Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7874847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:52:53+00:00 2026-06-03T02:52:53+00:00

I have to write a composite component that shows a login form and can

  • 0

I have to write a composite component that shows a login form and can be used with the following code snippet:

<login:loginForm username="#{loginBean.username}" 
                 password="#{loginBean.password}" 
                 action="#{loginBean.login}"/>

My loginBean is just a simple serializable @ViewScoped @ManagedBean with getters, setters and a public String login() method.

This is my composite component:

<body>
    <cc:interface>
        <cc:attribute name="username" required="true" type="java.lang.String" />
        <cc:attribute name="password" required="true" type="java.lang.String" />
        <cc:attribute name="action" targets="submit" required="true" method-signature="java.lang.String f()"/>
    </cc:interface>

    <cc:implementation>
        <h3><span xml:lang="en">Login</span> Daten </h3>
        <h:form>
            <div class="formblock">
                <fieldset>
                    <div>
                        <h:outputLabel value="Username" for="username"/>
                        <h:inputText id="username" value="#{cc.attrs.username}"/>
                    </div>

                    <div>
                        <h:outputLabel value="Passwort" for="password"/>
                        <h:inputSecret id="password" value="#{cc.attrs.password}"/>
                    </div>
                </fieldset>
            </div>
            <div class="buttons">
                <h:commandButton id="submit" value="Anmelden" accesskey="r" />
            </div>
        </h:form>
    </cc:implementation>
</body>

But, when I open the login.xhtml page (which contains the login:loginForm-snippet) in the browser, I can see the following Error in the jetty log:

Apr 29, 2012 11:59:49 PM org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage retargetMethodExpressions
SEVERE: Inner component submit not found when retargetMethodExpress

But what does that mean? Where is the mistake in my code? I already tried some other solutions for implementing the action attribute, but without success.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T02:52:54+00:00Added an answer on June 3, 2026 at 2:52 am

    Ok. After upgrading to myfaces version 2.1.7 the straigt-forward solution without the target-stuff works:

    <body>
        <cc:interface>
            <cc:attribute name="username" required="true" type="java.lang.String" />
            <cc:attribute name="password" required="true" type="java.lang.String" />
            <cc:attribute name="action" required="true" method-signature="java.lang.String f()"/>
        </cc:interface>
    
        <cc:implementation>
            <h3><span xml:lang="en">Login</span> Daten </h3>
            <h:form>
                <div class="formblock">
                    <fieldset>
                        <div>
                            <h:outputLabel value="Username" for="username"/>
                            <h:inputText id="username" value="#{cc.attrs.username}"/>
                        </div>
    
                        <div>
                            <h:outputLabel value="Passwort" for="password"/>
                            <h:inputSecret id="password" value="#{cc.attrs.password}"/>
                        </div>
                    </fieldset>
                </div>
                <div class="buttons">
                    <h:commandButton action="#{cc.attrs.action}" value="Anmelden" accesskey="r" />
                </div>
            </h:form>
        </cc:implementation>
    </body>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to write large amount of code which is going to be used
How can I determine if I have write permission on a remote machine in
I'm writing a simple web app in PHP that needs to have write access
I have to write an applet that brings up a password dialog. The problem
I have to write something in vbscript that need to use a unique set.
In an interview this is the question that is asked: You have to write
I have some properties that are only referenced in queries that require composite indices.
I have the following code to save an image to the cache directory of
I wrote a composite web control that is used in several web applications. If
I have a form, originally developed to be used on XP, containing a .NET

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.