how to autoload page in filament laravel - laravel-9

Is there a way to make the table in the filament while I'm inside the page have the new data displayed automatically? If someone adds new data, the browser will display it immediately without my intervention in refreshing the page , autoload

Related

Pagination in vue Js

When I add and I'm on page 2, for example, it loads a page and goes back to the first page. How can I prevent myself from being moved to the first page after the creation process?

Caching Issue with App Within Minutes sheet pages

I have created simple AppWithinMinutes application and I added following velocity code at the end in “sheet” page just before the html tag ends:
<div>
#set ($title = $doc.title)
## OR #set ($title = $doc.name), depending if your pages have titles
#set ($newTitle = $title.substring(0,6) + "X" + $title.substring(7, $title.length()))
<h2>Applications with a tag: $newTitle</h2>
{{PagesByTag tagName=$newTitle}}{{/PagesByTag}}
</div>
PagesByTag is a macro that I created to list all pages that contains the tag of a new title that I calculated.
Problem is:
I have a page called “My Application” with a tag “SERVERX01”
I have created a page in my AppWithinMinutes called “SERVERD01”. So now when I visit page SERVERD01, it displays “My Application” and that is desirable behavior (when you hard refresh it, disappears… hard refresh again brings it back… So it seems to be a cache issue…)
Now when I create a page in AppWithinMinutes called “MYAAPPD21”. Now “My Application” shows up here as well… This is not expected since $newTitle now will be “MYAAPPX21” and there is no page with that tag… (Hard refresh to that page will make “My Application” disappear but now when I visit “SERVERD01” page, “My Application” is gone from there as well)
There seems to be a serious caching issue with “sheet” page. Can someone tell me how can I disable caching for AppWithinMinutes display (sheet) pages?
Thanks a lot
I found a solution. In case someone like me facing exact same issue.
There wasn't an issue with App Within Minutes. It was a macro I created PagesByTag It has cached property set to yes. That was causing tag result on the sheet page to cache and was displaying undesirable results.

Pinterest share button with Gridsome (vuejs)

i'm trying to add Pinterest share button on my page template. I've followed the guidelines of Pinterest by adding the script before the tag, and the right link in my page.
Both in development or production mode, the button is correctly updated by the script. But when i change page, and load another post, the button remains as "default", not updated.
working version (at first page load) :
Non working version when I change page :
Pinterest script is (i think) loaded the way they ask on their website (before tag) :
and this is how i load it in metaInfo() :
i've tried everything, dynamically create script tag in mount cycle, with or without the button
i'm always facing this one shot working button, and i can't figure out why
the only strange thing i can see, is that i have this script in : https://assets.pinterest.com/js/pinit_main.js?0.8287268902280864
script that i do not call in my template
but it's also present when the button is working
any help will be appreciated ;)
thanks

ViewStateException - Validation of viewstate MAC failed - Sitefinity ASP.NET MVC with Jquery Mobile

I am getting this error most of the time when I submit my form. I am using Sitefinity 6.2 with ASP.NET MVC 4.0 and JQuery Mobile.
As I have Sitefinity in Hybred mode I am using the #Html.BeginFormSitefinity() command to create the form. On the Controller I have my action with the [HttpPost] attribute. The code always hits my default action on the controller with no problem. No matter what I put in the form when I submit I only get an error message on the page...never hits the HttpPost action.
I've looked around and there are many pages with fixes for the MAC failed issue, but none are working for me. I have a machine key in the web.config and I am NOT going to set enableViewStateMac to false as that is a security hole.
OK I tried working with both of the below solutions but they are both really bad. Here is what I am doing now, which is still not great, but I have Sitefinity, MVC, and JQuery Mobile all on the same page and forms are not giving me View State Exceptions anymore.
First thing is that adding data-ajax="false" is not enough, for this to work you need to disable Ajax before JQuery Mobile starts. So, to do this you need to add in this script BEFORE the JQuery Mobile File loads but after the JQuery file loads.
$(document).bind("mobileinit", function () { $.mobile.ajaxEnabled = false; });
After doing this I then do not use the Sitefinity Begin Form, I just JQuery to change the form on the main page to have the correct action.
<script>
$("#aspnetForm").attr("action", "Home/Login");
</script>
Together this means that there is a complete page load for each page change, and form posts use the form declared in my WebForms Master Page.
-Old Answer -
Actually...what I have below is not working. What I am
currently doing is really ugly but is usually working.
As long as the user enters the site from the home page then the home
page is the Jquery Mobile first page. The view state errors that I
was getting was because it saw the current page as the first page and
the form submit was to the active page. What if the controller for
the home page was just set to handle ALL HTTPPost calls? I have
removed the #Html.BeginFormSitefinity() from all the views with forms
and am just using the form on my top level masterpage. Then I add in
code on the view to change the action of this form to point to the
main page controller. ex
<script>
$("#aspnetForm").attr("action", "Home/Login");
</script>
Once I made this change the forms are not throwing view state
exceptions...as long as the home page is the Jquery Mobile first page.
If the user comes in from a different page then all is scrambled.
Don't have an answer for that yet.
Really Old Answer -
OK, think I have found it. I read somewhere, lost the link now, a
list of issues that can cause the error message. One of them is the
form being submitted from a different page.
I looked at the error message I was getting with Fiddler and noticed
that the Referer was my home page but the URL of the form post was the
URL for the page with my form. In stead of browsing through my site
to the page with the form I typed the URL in the address bar. I tried
submitting my form again and now it works!
So, this is an issue of Sitefinity and JQuery Mobile fighting it out.
When asp.net MVC is run in Hybred mode in Sitefinity it is actually
run in a Web.Forms master page that contains a form. When you use the
#Html.BeginFormSitefinity() to add a form to the view it is actually
just adding a div and then using AJAX to submit the form on the
Web.Forms master page.
JQuery Mobile loads up the first page that you visit, but later pages
are just injected into the existing page. So, there are multiple
data-role="page" divs loaded up in the DOM, inside of the Sitefinity
Web.Forms Master Page.
This all together is causing the form to post with the URL of the
active data-role="page" but the server sees that it is being refered
from the original page I loaded up. So, if I went to the page with
the form first all would work, start at any other page it does not
work.
Now that I know this I can put in data-ajax="false" on the link to the
page with the form and all looks to be working. This will cause
JQuery Mobile to not inject the target page into the current page but
will load all fresh with the target.
data-ajax="false" is the answer!

yii change page without background slideshow refresh

I have a website which uses backgroundstretch to display a slideshow on the background of the website. I use a normal Yii website structure where the content is displayed by: , according to the url.
Now because of the reload the slideshow starts all over again when I go to another page. Is there a way to display the new pages without having to reload the background?
Thanks in advance!
It might be possible to load pages using ajax and replace the existing content on top of your rotating slide show, but it would likely be a big architectural change to your website.
Instead you might try storing the current slideshow index in a cookie, and when you load your next page, start the slideshow on the current image instead of the first image.