I'm trying to hide the backbutton shown in the image on desktop, but no matter what I tried, then it keept showing up.
I have tried
<Shell.BackButtonBehavior>
<BackButtonBehavior IsVisible="False" IsEnabled="False" />
</Shell.BackButtonBehavior>
And I have tried following this SO post Why Back Button is hidden in Maui?
My navigation is done by saying await Shell.Current.GoToAsync(new ShellNavigationState(location), false);
Am I missing something?
So everything you need to know can be found here:
https://learn.microsoft.com/en-us/dotnet/maui/user-interface/pages/navigationpage
NavigationPage.HasBackButton = true/false
Image (Proof)
https://gyazo.com/afbc744e7b6c5d1caa56960a536390c7
If this was helpful, mark this please as answer :)
This technique (the code in your question), added within the <ContentPage ... > declaration at the top of the xaml:
<Shell.BackButtonBehavior>
<BackButtonBehavior IsVisible="False" IsEnabled="False" />
</Shell.BackButtonBehavior>
seems to work when using the Shell to activate pages in C# codebehind (often in the BindingSource e.g., viewmodel):
await Shell.Current.GoToAsync($"{nameof(MyContentPage)}");
Adding this within the <ContentPage ...> declaration at the top of the xaml:
NavigationPage.HasBackButton="false"
seems to be applicable when using the push/pop within a NavigationPage:
await Navigation.PushAsync(new DetailsPage());
I don't use the Navigation.PushAsync. My app requires very specific navigation based on current data state, so a stack doesn't work for me.
I have verified setting the Shell.BackButtonBehavior (in the very code you provided) works in my case because I am activating pages via
await Shell.Current.GoToAsync
To enable/disable something you can use OnPlatform or OnIdiom
Exemple :
NavigationPage.HasBackButton="{OnIdiom Default='True', Desktop='False'}"
Related
I am accessing report using URL like in example:
http://localhost:8080/jasperserver/flow.html?_flowId=viewReportFlow&standAlone=true&_flowId=viewReportFlow&ParentFolderUri=%2Freports%2Finteractive&reportUnit=%2Freports%2Finteractive%2FCustomersReport
I have also added custom theme to hide JasperServer decorators by folowing link: http://community.jaspersoft.com/wiki/embedding-ad-hoc-http-api
The only problem I am facing is when user click on Back button, they are exiting the report and they can see list of reports in repository. I would like to disable that behavior so that Back button just does nothing in that case. I have tried to customize the behavior as described in: http://community.jaspersoft.com/wiki/setting-default-flow-action-back-button but I can't find the proper value to replace the default action:
<end-state id="done" view="flowRedirect:searchFlow?lastMode=true" />
I have tried replacing it with
<end-state id="done" view="json:none" />
but that gave me some crazy error.
Hiding button by CSS is not a option since I need the back button to work when user is viewing sub-reports.
I did this issue for Input Control form button.
Under "...\apache-tomcat\webapps\jasperserver\WEB-INF\jsp\modules\viewReport" directory, in ViewReport.jsp file, I searched for "ICDialog" text and deleted related statements with ICDialog. Then I restarted the jasperserver by "servicerun.bat" and "servicerun.bat START" commands.
I think, this will work for back button and the others.
How about setting up the roles/users so the logged in user can only view reports allowed by that user. This would be a better solution than trying to circumvent the browser functionality. Alternatively if you have an application you are trying to embed jasper in you could use the web services to just download the report required by the user and not enable them to access the server webpage.
Simply add &decorate=no at the end of the URL.
Now the url like this {url_for_jasper_report}&decorate=no
Adding this query parameter you can hide the back button as well as the footer and header
my GWT app is designed to be multipage. And separated into modules. So far all other modules works, except for my 'login' module.
I don't understand why when I access http://127.0.0.1:8888/login.html?gwt.codesvr=127.0.0.1:9997 I get a blank page.
LoginEntryPoint:
public void onModuleLoad() {
GWT.log("Loading module");
if (!Window.Location.getPath().toLowerCase().endsWith("login.html")) {
return;
}
RootPanel.get().add(new Button("Test"));
}
And in the login.html file:
<script type="text/javascript" language="javascript" src="login/login.nocache.js"></script>
and finally in the Login.gwt.xml:
<entry-point class='com.mygwtapp.client.LoginEntryPoint' />
How to fix this kind of situation?
Make sure also when you compile the project Remember to add the new module to be compiled
Right Click on the Project >> Google >> Gwt Compile >> Add (add your new module)
Does your log statement happen? If not, is the login.cache.js file even loading (use firebug or the like to check)? If so, can you set a breakpoint on that log statement and step forward, see where it gets to?
And is there anything shown when you run in web mode?
If the login.nocache.js isn't loading, make sure you added rename-to="login" in the module tag, make sure it is actually being compiled, etc
This problem was happening to me, and I figured out that it was all because I had Buttons in a FormPanel. As soon as I removed them from the FormPanel everything showed up again. I am not sure where exactly you were sticking the button up there, but you might want to try removing the button out of the equation, trying another type of panel and some text, and see if it shows up without the button present.
If you are running in hosted mode, this if if (!Window.Location.getPath().toLowerCase().endsWith("login.html")) { is true, so no button should appear. Try changing the "endsWith" by "contains" method
I have a problem with navigation too right now. I have 2 dataTables, one is located within a regular facelets-page, the other one is located in a dialog.
Both have the same code:
<p:commandButton
value="Show car"
ajax="false"
action="showCar?faces-redirect=true">
<f:setPropertyActionListener value="#{car}" target="#{carBean.car}" />
</p:commandButton>
I also tried adding process="#this" without success.
The problem is, while the navigation works for the commandButton inside the facelets-page, it doesnt work for the button inside the dialog. It seems that the current page is reloaded after the click.
Replacing it with a doesn't help either.
Has anybody experienced something like this before? Could this be an issue with the dialog?
Thanks and best regards,
Robert
Forget my previous answer, I didn't read your question carefully. What might be happening is a failure in your <f:setPropertyActionListener> call. If it is (silently) failing then the error will cause JSF to automatically navigate back to the same page.
Add this to your page somewhere so you can see any helpful error FacesMessages that may be provided by the framework:
<p:messages
id="messagesForDebugging"
showDetail="true"
autoUpdate="true" />
The autoUpdate will cause it flash up messages generated by global Ajax requests.
You may also want to put a logging statement in your carBean.setCar() method to make sure that it is successfully setting the value. If it is failing then maybe you need to provide a custom converter for Car values?
I'm looking for a tutorial without any javascript - pure CSS3.
I've created two pages (page1.html, page2.html) for the iPhone and I'm using CSS3 and the -webkit-properties.
To connect those sites I created a next- and a backbutton.
When tapping on the nextbutton page2.html is loaded, when tapping on the backbutton page1.html is loaded.
This is working so far.
I'd like to try using some more -webkit-properties to get the flip-effect like in this demo.
So, when clicking on my next-button page2.html should be flipped in. When clicking/tapping on the backbutton page1.html should be flipped in.
I'm new to this and hope to get some help here. Do you know a tutorial dealing with my problem?
Another question coming up to my mind was whether it is possible to load page2.html seperatly or whether I have to build only one page with the content of page1.html and page2.html?
You have to build only one page with two sections/divs with the flip-contents in it. Then you can use the transform: rotateY … or, maybe load the second page in with AXAJ or something else, but because it's CSS on my understanding you have to put everything in one page with two sections/divs
There are lots of pageflip demos on the interwebs. This is one we did It was inspired by Roman Cortes one - there are others that use more of a squeeze than a flip.
if i need remove master layout from my view, how can i do it in MVC2?
i tried put code in my view that was shown in documentation http://sparkviewengine.com/documentation/master-layouts: , but it still bring my Application.spark layout :-/
any ideas why?
I know this answer is a litle (maybe a lot) late but you can also use the PartialView method if you mean to render an HTML fragment instead of the full page.
Relevant Spark documentation
An Application.spark file in the Views/Layouts folder or Views/Shared folder
This is the most general-purpose way to have a site-wide master template. It will not be used if the controller returns a PartialView().
Not tested, but what if you create and empty master layout, and say <use master="EmptyMaster" /> in the top of your view? Or you could call on the empty master from the controller; return View("View", "EmptyMaster");
Don't know if it'll work, but it's worth a shot.