Skip to content
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

Bootsfaces close tab in dynamic tab view #946

Closed
primeO opened this issue May 29, 2018 · 9 comments
Closed

Bootsfaces close tab in dynamic tab view #946

primeO opened this issue May 29, 2018 · 9 comments

Comments

@primeO
Copy link

primeO commented May 29, 2018

How to close the tab in bootsfaces tab view component . Gone through the demo site but no luck . Any suggestions how to achieve it .

@stephanrauh
Copy link
Collaborator

Dynamic tabs are populated from an array, so closing a tab is simple a matter of deleting the corresponding array entry.

@primeO
Copy link
Author

primeO commented May 29, 2018

Can u please guide me which attribute i need to use for this in bootfaces .
Currently we are migrating from richfaces to bootsfaces .

Hope i will be updated soon with bootsfaces . Thanks by the way bootsfaces is awesome

@stephanrauh
Copy link
Collaborator

Please show me a code snippet. I want to be sure we're talking about the same thing :). What does your JSF page look like, and which tab do you want to close?

@primeO
Copy link
Author

primeO commented May 29, 2018

Sorry i dont have design currently with me .
I am having 5 tabs which are populated from a list . User can delete any tab from the view and again he can add to the view from the datalist !!

And in each tab forms will be added by ui:include

@stephanrauh
Copy link
Collaborator

Ok, got it.

So what's the problem? You can simply delete the tab by deleting the corresponding element of the list. There's no native BootsFaces support because you don't need it.

But you wouldn't ask if you didn't felt precisely that need. Let me guess: you want BootsFaces to draw a "close" icon in the tab, and you want BootsFaces to delete the array item if the "close" button has been clicked?

@primeO
Copy link
Author

primeO commented May 29, 2018

Yes exactly the attribute for close . Iam not finding it on demo site . Whether we should use facet there on tab or any alternative .

Thanks in advance

stephanrauh added a commit to TheCoder4eu/BootsFacesWeb that referenced this issue May 30, 2018
@stephanrauh
Copy link
Collaborator

Oops - there seems to be a bug. Facets inside the tab don't "speak" AJAX yet. So the solution is a bit clumsy. Have a look at this commit, which adds a closable tab to our showcase.

@primeO
Copy link
Author

primeO commented May 30, 2018

Thanks @stephanrauh

stephanrauh added a commit to TheCoder4eu/BootsFacesWeb that referenced this issue Jun 2, 2018
@stephanrauh
Copy link
Collaborator

Finished the documentation in the showcase.

@stephanrauh stephanrauh modified the milestones: v1.5.0, v1.3.0 Oct 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants