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 49243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:24:22+00:00 2026-05-10T16:24:22+00:00

In a JSP page, I created a <h:form enctype=multipart/form-data> with some elements: <t:inputText> ,

  • 0

In a JSP page, I created a <h:form enctype='multipart/form-data'> with some elements: <t:inputText>, <t:inputDate>, etc. Also, I added some <t:message for='someElement'> And I wanted to allow the user upload several files (one at a time) within the form (using <t:inputFileUpload> ) At this point my code works fine.


The headache comes when I try to put the form inside a <t:panelTabbedPane serverSideTabSwitch='false'> (and thus of course, inside a <t:panelTab> )

I copied the structure shown in the source code for TabbedPane example from Tomahawk’s examples, by using the <f:subview> tag and putting the panelTab tag inside a new jsp page (using <jsp:include page='somePage.jsp'> directive)

First at all, the <t:inputFileUpload> fails to load the file at the value assigned in the Managed Bean UploadedFile attribute #{myBean.upFile}

Then, googling for a clue, I knew that <t:panelTabbedPane> generates a form called ‘autoform’, so I was getting nested forms. Ok, I fixed that creating the <h:form> out of the <t:panelTabbedPane> and eureka! file input worked again! (the autoform doesn’t generate)

But, oh surprise! oh terrible Murphy law! All my <h:message> begins to fail. The Eclipse console’s output show me that all <t:message> are looking for nonexistents elements ID’s (who have their ID’s in part equals to they are looking for, but at the end of the ID’s their names change)

At this point, I put a <t:mesagges> tag (note the ‘s’ at the end) to show me all validation errors at once at the beginning of the Panel, and it works fine. So, validation errors exists and they show properly at the beginning of the Panel.

All validation error messages generated in this page are the JSF built-in validation messages. The backing bean at this moment doesn’t have any validators defined.

¿How can I get the <t:message for='xyz'> working properly?


I’m using Tomahawk-1.1.6 with myFaces-impl-1.2.3 in a eclipse Ganymede project with Geronimo as Application Server (Geronimo gives me the myFaces jar implementation while I put the tomahawk jar in the WEB-INF/lib folder of application)


‘SOLVED’: This problem is an issue reported to myFaces forum.

Thanks to Kyle Renfro for the soon response and information. (Good job Kyle!) See the issue


EDIT 1

1.- Thanks to Kyle Renfro for his soon response. The forceID attribute used inside the input element doesn’t works at first time, but doing some very tricky tweaks I could make the <t:message for='xyz'> tags work.

What I did was:
1. Having my tag <inputText id='name' forceId='true' required='true'> The <t:message> doesn’t work.
2. Then, after looking the error messages on eclipse console, I renamed my ‘id’ attribute to this: <inputText id=’namej_id_1‘ forceId=’true’ required=’true’>
3. Then the <t:message> worked!! but after pressing the ‘Submit’ button of the form the second time. ¡The second time! (I suspect that something is going on at the JSF lifecycle)
4. This implies that the user have to press 2 times the submit button to get the error messages on the page.
5. And using the ‘j_id_1’ phrase at the end of IDs is very weird.


EDIT 2

Ok, here comes the code, hope it not be annoying.

1.- mainPage.jsp (here is the <t:panelTabbedPane> and <f:subview> tags)

<%@ taglib prefix='f' uri='http://java.sun.com/jsf/core'%>   <%@ taglib prefix='h' uri='http://java.sun.com/jsf/html'%>   <%@ taglib prefix='t' uri='http://myfaces.apache.org/tomahawk'%>   <html>   <body>   <f:view>   <h:form enctype='multipart/form-data'>   <t:panelTabbedPane serverSideTabSwitch='false' >                <f:subview id='subview_tab_detail'>                   <jsp:include page='detail.jsp'/>               </f:subview>            </t:panelTabbedPane>       </h:form>    </f:view>   </body>   </html>   

2.- detail.jsp (here is the <t:panelTab> tag)

<%@ taglib prefix='f' uri='http://java.sun.com/jsf/core'%>   <%@ taglib prefix='h' uri='http://java.sun.com/jsf/html'%>   <%@ taglib prefix='t' uri='http://myfaces.apache.org/tomahawk'%>    <t:panelTab label='TAB_1'>           <t:panelGrid columns='3'>               <f:facet name='header'>                   <h:outputText value='CREATING A TICKET' />               </f:facet>                <t:outputLabel for='ticket_id' value='TICKET ID' />               <t:inputText id='ticket_id' value='#{myBean.ticketId}' required='true' />               <t:message for='ticket_id' />                <t:outputLabel for='description' value='DESCRIPTION' />               <t:inputText id='description' value='#{myBean.ticketDescription}' required='true' />             <t:message for='description' />                <t:outputLabel for='attachment' value='ATTACHMENTS' />               <t:panelGroup>                   <!-- This is for listing multiple file uploads -->                   <!-- The panelGrid binding make attachment list grow as the user inputs several files (one at a time) -->                   <t:panelGrid columns='3' binding='#{myBean.panelUpload}' />                   <t:inputFileUpload id='attachment'  value='#{myBean.upFile}' storage='file' />                   <t:commandButton value='ADD FILE' action='#{myBean.upload}' />               </t:panelGroup>               <t:message for='attachment' />                <t:commandButton action='#{myBean.create}' value='CREATE TICKET' />           </t:panelGrid>   </t:panelTab>   

EDIT 3

On response to Kyle Renfro follow-up:

Kyle says:

‘At the first view of the page, if you press the ‘CREATE TICKET’ button with nothing in any of the inputTexts and no files uploaded, do the message tags work for the inputTexts? (ie. required = true) I’m just curious if the messages for the inputTexts are working but the message for the inputFileUpload is not.’

Here is the behavior found:
1.- There is no validation error messages shown at all (the message tags don’t work) Even when I try to test only one validation error message (for example, testing the message for the first input text) none of them shows up.
2.- The eclipse console shows me these internal errors:

ERROR [HtmlMessageRendererBase] Could not render Message. Unable to find component 'ticket_id' (calling findComponent on component 'j_id_jsp_1383779881_1:subview_tab_detail:j_id_jsp_1716158401_0j_id_1:j_id_jsp_1716158401_5j_id_1'). If the provided id was correct, wrap the message and its component into an h:panelGroup or h:panelGrid.   ERROR [HtmlMessageRendererBase] Could not render Message. Unable to find component 'description' (calling findComponent on component 'j_id_jsp_1383779881_1:subview_tab_detail:j_id_jsp_1716158401_0j_id_1:j_id_jsp_1716158401_8j_id_1'). If the provided id was correct, wrap the message and its component into an h:panelGroup or h:panelGrid.   ERROR [HtmlMessageRendererBase] Could not render Message. Unable to find component 'attachment' (calling findComponent on component 'j_id_jsp_1383779881_1:subview_tab_detail:j_id_jsp_1716158401_0j_id_1:j_id_jsp_1716158401_14j_id_1'). If the provided id was correct, wrap the message and its component into an h:panelGroup or h:panelGrid.   

Here is when I saw the 'j_id_1' word at the generated IDs, for example, for the id ‘ticket_id’:

j_id_jsp_1383779881_1:subview_tab_detail:j_id_jsp_1716158401_0j_id_1:j_id_jsp_1716158401_5j_id_1 

And, viewing the resulting HTML generated page, I saw that the IDs names are like this (whitout using ‘ForceId’ atribute):

<input id='j_id_jsp_1383779881_1:subview_tab_detail:j_id_jsp_1716158401_0j_id_1:ticket_idj_id_1' name='j_id_jsp_1383779881_1:subview_tab_detail:j_id_jsp_1716158401_0j_id_1:ticket_idj_id_1'>   

  • 1 1 Answer
  • 2 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. 2026-05-10T16:24:23+00:00Added an answer on May 10, 2026 at 4:24 pm

    Looks like it may be related a bug in myfaces. There is a newer version of myfaces and tomahawk that you might try. I would remove the subview functionality as a quick test – copy the detail.jsp page back into the main page.

    https://issues.apache.org/jira/browse/MYFACES-1807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12567158#action_12567158

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.