-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
command button action doesn't work inside tabview #842
Comments
@mtvweb |
The HTML code is ok. The bug hides in the depth of the JSF framework itself. Somewhere the input is silently ignored instead of sending it to the nested components. The root cause is that I've derived the class from UIRepeat instead of UIOutput. UIRepeat always assumes there's an array and an array index, so it gets confused when it meets a simple tab without |
@mtvweb I think I've managed to solve the bug now. Would you like to test it again? Thanks in advance, |
@stephanrauh It works, fixed! Good work, Jens |
Yippee!!!! Now we can publish BootsFaces 1.1.3! |
Hi, I'm still having issues with the commandbutton inside the TabView. The action is called, but the value of the variable is always null. It seems that the setter of the variable is not called. I'm using BootsFaces 1.1.3 on Java EE8 with JSF 2.3. Here is an example which is not working. <b:form>
<b:tabView>
<b:tab title="Tab1">
<b:panel>
<b:form>
<b:inputText value="#{testTabBean.text}"/>
<b:commandButton action="#{testTabBean.doIt()}" value="test" look="danger"/>
</b:form>
</b:panel>
</b:tab>
</b:tabView>
</b:form> Backing Bean: private String text;
@Inject
private Logger logger;
public String doIt() {
logger.info(text);
return "startpage";
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
} |
Should you be doing Ajax, like |
Would you mind to send us a complete reproducer? I.e. a project including the pom.xml, so we can simply use it without having to configure anything? Because the feature does work in our tests, so it's likely that you're doing something unusual. You can upload the project as a GitHub repository or send us a zip file. BTW, which application server to you use? |
I added the test code in the index.xhtml in my project on the branch "bootsFaces-tabview-commandbutton" on https://github.com/AlexanderPraegla/Pinkie.git Im using the new Glassfish v5 as application server. Thanks in advance! |
Did you try |
@AlexanderPraegla Can I run the application without the database? |
@chongma That is working, strange. I rarely use ajax and I would like better if the "normal" processing would work :) @stephanrauh No unfortunately no, because part of the navbar comes from the database. I provide you a dump of my postgres dev database if that would help? Or I remove everything conntecting to the database. |
@AlexanderPraegla This has nothing to do with your bug, but I thought you might be interested in the Eclipse warnings. Maybe that's a lurking error you haven't detected yet, or that's puzzling you all the time :). |
@AlexanderPraegla I'd prefer the second option (removing everything connecting to the database in a separate Git branch). Otherwise, I'd have to install Postgres on my development machine - something I'd like to avoid. BTW, I've tried to remove the database code myself, but it seems to be a lot of work. At least for a layman like me. I guess you're more familiar with your application, so I hope it's not too much work for you :). |
@stephanrauh Thanks für warnings, didn't even know about them. My intellij idea is fine with this code, but I will have another look. I think i removed everything connecting to the database, can you give it a try please? :) |
OK, I've managed to reproduced the bug. The getter is called outside the tabs, but not if the input field is put inside the tabs. BTW, I'm impressed by your project activity. Awesome! I just hope you can still spend some time playing handball :). |
It seems that updating to BootsFaces 1.2.0 or 1.2.1-SNAPSHOT solves the issue. Would you mind to give it a try? Best regards, |
Thanks, I try to handle everything between job, studies and handball :) That's odd, because I actually tried this before I came here for help. But I will give it another try! |
Hope updating BootsFaces helps nonetheless :). Maybe we've added a bug-fix after 1.1.3, or we forgot to update the version number of the ticket. Is Altenerding worth a visit? If the W-JAX or the iJS conference invites me for a talk, I could drop by. |
I'm very sorry for wasting your time. It seems that updating the bootsfaces dependency did the trick :) In Altenerding is not that busy. If you really come to munich it would be better to meet up in munich itself. |
Doesn't feel like a waste of time :). I'm always glad to help! |
Since commit "ab1689b" a command button inside a tabview does not call action any more.
May be the multi-colon-id isn't resolved correctly.
i.E.
The text was updated successfully, but these errors were encountered: