How to include Web Debug Toolbar in Symfony Response? - symfony

When I render a template and return a Response from a Controller, there is a nice Web Debug Toolbar on the bottom of the page.
Is it possible to make this bar appear when I don't use template and return a response by creating a Response object myself?

It should be sufficient to make sure there is a valid <body>...</body>-block contained in the response-HTML-code. if the body-section is missing, then the debug toolbar won't appear.

Related

Differences between the results in Browser and HTML-View in Development-tools

I am working on a webapplication in asp.net mvc 5. I call a View from a action.
But this view is not displayed. In the developer-tools ( FF and Chrome) I can see a correkt answer in the html-Tab. But not in the browser.
Can anybody explain that?
Thats what is displayed:
Displayed
thats the answer in html-Tab of the dev-tools:
Answer
Many thanks for your help
P
Are you calling this Action / View via an AJAX call? Since you are using a Grid I would be inclined to think that is likely.
If so, you'll want to ensure that you are actually setting the results of your contents within the callback function :
// Call a controller action via an AJAX call
$.ajax('controller/action', { id: 42 }, function(results){
// results should be your actual View HTML
$('#result-area').html(results);
});
If you are using some type of third-party components for performing this, there should be some documentation for how to handle your callbacks from your Controllers.

GWT Formpanel POST issue

I am using GWT FormPanel to submit a POST request to a servlet which renders a pdf. The screen I am using to post have got a pop up with yes, no and preview button. yes and preview would open a pdf in new tab in browser.
The problem is when I use IE11 and clicks on preview it opens up a pdf well, I dont close the tab go back to previous screen and clicks yes, again request reaches to servlet but this time all the request parameters are null.
If the pdf tab is closed and then I click on yes it again works fine. This is an issue with IE11, works fine with Chrome. Any Ideas ?
If I change it to GET it works fine but I have a huge data that needs to be passed to servlet.
here is a code snippet :
formPanel.setBodyBorder(false);
formPanel.setBorders(false);
formPanel.setHeaderVisible(true);
formPanel.setAction(someURL+ "/someServlet");
formPanel.setMethod(Method.POST);
formPanel.setTarget("somePDF");
formPanel.setId("report");
HiddenField<String> hddnF = new HiddenField<String>();
hddnF.setName("Yogi");
hddnF.setValue("Value is set...");
formPanel.add(hddnF);
formPanel.submit();
Have overridden setTarget to show result(pdf) into new popup/tab
public native void setTarget(String target)/*-{
this.#com.extjs.gxt.ui.client.widget.form.FormPanel::setTarget(Ljava/lang/String;)(target);
}-*/;

How to display the custom message in SDL Tridion Message bar?

I want to display my custom message (Say for Ex: some message needs to display when Page is save event is triggered) in SDL Tridion CME Message bar. How to do this?
From an event system you can only display ERROR messages.
If your Event code throws an error the "Message" will be displayed in the Message bar.
For other type of messages you need to use Javascript/CM Extensions. You can find an example of an event system that shows a message here.
Nuno covered your options pretty well.
If you want to show a message from your JavaScript code, this is usually my starting point:
$messages.registerNotification("Hello world");
If you put this in your JavaScript code (or just paste it into a JavaScript console), it will show a blue bar with "Hello World" in it.
There are many types of messages, each of which shows up slightly differently. What I usually do if I need more than a notification is:
type $messages. in a JavaScript console in a browser where the web GUI is loaded
go through the list of relevant methods to see what looks most promising (they all start with register)
perform a text search on the source code for the method that I am looking for
This leads me to an example of how that method is used in the GUI already and is a great starting point for my own code.
Update
Alexander Klock recently wrote a thorough explanation of the message types available on his blog.

returnedObject property

I'm programming in Flex Builder Burrito for an mobile application.
I'm trying to get a variable from navigator.PopView()
and i found the following site: adobe View and ViewNavigator
On that page is written that you can get to an returnedObject:
The ViewNavigator will save this object internally, and the new view can access it from with the navigator.returnedObject property.
The problem is when I want to acces the returnedObject flash builder doesn't seem to find that even the package isn't found.
I've found my problem on an other site.
There it's plain simple explained.
Do the override public function createReturnObject():Object.
On the page where it needs to be send back.
Then on the popped view, you can acces it by returnedObject.
On same page next lines are
The property is a ViewReturnObject
which contains the object that was
returned
and the context in which the removed view was pushed (See Setting
the View Context).
ViewNavigator.poppedViewReturnedObject
is guaranteed to be set by the time
the new view
receives the add event and will be destroyed after the view receives its
viewActivate
event.
and also a NOTE
Note, the return object is only stored when a view is popped of
the navigation stack
or replaced through the use of the pop and replace navigation
operations (e.g.,
replaceView, popView, etc...). It will be cleared after the new view
receives its
ViewNavigatorEvent.VIEW_ACTIVATE event.
I think should try function to get popuped view poppedViewReturnedObject of ViewNavigator
Its description is also on same page
public function get poppedViewReturnedObject():ViewReturnObject
Hopes that help

flex app and title missing in browser

does anyone know why my title isint displaying in browser when i embed a flex object? When the page is loading it shows the title but then when its fully loaded it goes again
The culprit might be the IBrowserManager. Are you using it? And if you are, are you calling its init() method with a null value for the title argument when your application initializes?

Resources