You need to sign in to do that
Don't have an account?
admintrmp
Detail is losing my tabstyle!
I've torn my page right down to just a page (standardController, extension and tabStyle applied) with a detail tag inside (relatedList and title is set to false).
The tab is not being shown. When the detail is removed, it shows absolutely fine. Is this a new bug that the new spring release has put on our heads? This has never happened before, as this was an old page that worked perfectly fine!
I've found a fix! And I am still putting the blame on Salesforce for this change as it was working fine before!
If you want to use your custom object tabs and use a detail tag with a different subject, then you must have a custom tab for the object you want to lay out!
For instance, if you tabStyle was customX__c and your detail is linked to a record in customY__c, then you must have a custom tab (whether in use or not) for customY__c. This way you won't lose your tab style (customX__c).
I hope that's not too confusing.
All Answers
Update: I've tried a simple detail on a simple page, and still no luck. The tabStyle attribute simply does not work as it should.
Try adding and remove that detail, you'll find the detail is the problem!
Big doubt that is my fault. Contacting developer support on this one.
Does it work properly if you add
standardController="class__c"
to the Apex:page tag? Best, Steve.
Hi, no it doesn't, but thanks for your response.
I've reduced the page to nothing but a detail tag with no controllers or methods. I can only imagine that the visualforce page file itself is corrupt. Unfortunately it's part of a managed package, so I can't just delete and build the file again.
When I reduced the page to nothing, I did exactly the same with another similar page. One page worked and the other didn't.
My conclusion came to a bug in Salesforce or corruption of the visualforce file.
Hmmmm... My guess was that having a detail tag without a related controller was the problem. Especially as the doc on the "tabStyle" makes me think that it's really considering what kind of controller you're using. But, perhaps not...
Two other questions:
1. I presume that you're calling the VF page with a valid ID being passed as a parameter?
2. I presume that the class__c object does actually have a Tab defined.
3. Lastly, when you say "losing my tabstyle" what exactly do you mean? For example, when you run your Apex page your UI should highlight the Class__c tab that you've defined (while still showing your VF page). Is that not happening? If not, what is happening? Is the tab still there, but some other tab remains highlighted?
Best, Steve.
Just FYI, some problem w/ tabstyle is ringing a bell, but I can't recall why... searching....
My page has a tabStyle attribute applied to it. I tell it to show "class__c" tab. When I view the page, there isn't a single tab that is selected.
The code works perfectly fine on every other page, except this one.
If I've cut the page down to pretty much nothing but a detail tag using the id parameter as a subject ID (of which is different to the tab style that is requested), there shouldn't be a problem, but there still is.
If I removed the detail tag, there is no longer a problem.
The strange thing is, I've done this exact thing in several places, and it still works perfectly fine. I can't actually tear apart my code any more than I have already.
Not that I have the answer, but this is what was ringing a bell...
http://boards.developerforce.com/t5/Visualforce-Development/Select-Custom-Tabs-and-Visualforce-Pages-using-jQuery/m-p/190908#M25447
I wonder if using a tabstyle other than the style for the Id is causing the angst. You might try using the same tabstyle and see if that works?
Best, Steve. (time for sleep)
Hi, I'm afraid that doesn't help since I am wishing to use a custom object tab rather than a visualforce page tab.
I am still using tabStyle, just for a custom object. As I've said, no other page has the same problem.
Actually, it turns out that the detail tag removes any non-standard tabStyles! It's all of them. Which is a pain. It works perfectly fine in the old versions of my app in the sandbox. Why has it suddenly stopped working?
I've not changed anything to do with that. I have a feeling it's the spring release messing around with it, which means I have to work around it now.
This has to be a bug or an issue that Salesforce has overseen.
I've never had this problem, and then suddenly it happens. I'll send them another message.
you could try __tab in stead of __c for a custom tab:
I've found a fix! And I am still putting the blame on Salesforce for this change as it was working fine before!
If you want to use your custom object tabs and use a detail tag with a different subject, then you must have a custom tab for the object you want to lay out!
For instance, if you tabStyle was customX__c and your detail is linked to a record in customY__c, then you must have a custom tab (whether in use or not) for customY__c. This way you won't lose your tab style (customX__c).
I hope that's not too confusing.