Query Manager not refreshing page. I dont know why

my published URL
http://137.184.106.209/vehicle_list1?ev=CONC

I’m only concerned (right now) with the Event pulldown.
Here is the DynamicEvent for the select_event pulldown:

When you change the Event, you can see it rewrite the URL.
But no data appears.
You can see it get a new value based on the msg in the top row.
But I can’t figure out why it doesn’t appear to be hitting the database.

------ BUT
If you change the query to: http://137.184.106.209/api/vehicle_list1?ev=CONC
then the query correctly parses the “ev” querystring and the correct data appears.
What step am I missing?

image

serverconnect1 might only load on page load, not on URL changes. After you change the URL, put a step to load serverconnect1 again

@Apple
I don’t see how to do that.
you mean, add another Dynamic Event to my select_event pulldown?
what would that event be to “load serverconnect1 again”?

And, if this was so, then using my live URL I posted up top, shouldn’t you be able to manually go to that URL (with a “ev” querystring) and it show data then? ok, maybe not on change of the pulldown, but at least the first time it should work.

Add another Step to the existing Dynamic Event you have. The same place you took this screenshot:


On the right side try to find your “serverconnect1”, there should be a “Load” method (or something similar)

Oh, by your initial wording I thought you were already aware of that issue and not the focus of this question, my bad. You have 2 distinct issues here on this page, and my text above was to solve the 1st issue, which is, no Server Action calls are performed upon URL change, so you have to manually trigger them by calling the “Load” method/step of serverconnect1

The 2nd issue is, you’re never editing the variable event_filter:

dmx-param:ev="event_filter.value"
// and this:
<dmx-value id="event_filter"></dmx-value>

If you look closely on the page’s source-code, you’ll see you’re never actually modifying the variable event_filter. When do you want to change this variable? When the user changes the selection? Then you need to add a third-step to the Dynamic Event to fill this variable to the value of the selected checkbox. Or, you can directly grab the selected value of the checkbox kinda like what you’re doing with the user_search (you’re not using a variable there, you’re directly grabbing the value of the element with id=“user_search”)

Don’t forget you can make use of your browser’s developer tools to see the requests your page performs

P.S.: I’m not really experienced with the front-end, so I can’t personally assure you my instructions are the best ones :sweat_smile:

1st issue solved. Found that reload and that hits the db now.
2nd issue - the “us” param is for the user search, which was on the form, but I wasn’t focusing on that yet. But you saw some extra dmx code that got left in there, even tho I deleted “us” from the query Parms. I manually deleted that from source and the refresh started working fine,
Published at the url now.

Now it’s time to work on the user search, or the make and model pull down the filters.
Thx

You don’t actually need to call the server action reload when the dropdown value changes. The server action will be reloaded automatically, when it receives a new value.

What i am seeng on your page is a bit confusing. You set the url param value, to the selected dropdown value, but you are actually not using the url parameter anywhere.
In your server action, for the parameter value select the URL param:

otherwise it’s pointless to set a url parameter in your url and not use it anywhere.

@Teodor
I don’t understand why my Data Bindings screen looks diff than yours (other than the extra components I have)?

Why do I have View and you dont?
Why don’t I have “Query” ?
We’ve started differently somehow.

Perhaps I used some older docs in setting up my connection?

Here’s my server connect:
image

And Query:

(PS _ I just removed the action to reload the serverconnect. All still worked fine.
The issue that was making me think it was not refreshing was the extra dmx code that didn’t get deleted for the “us” filter (which I’m not using right now) and I corrected that last night based on Apple’s input).

Latest version is uploaded to http://137.184.106.209/vehicle_list1?ev=SHOW

Hi!

Im seeing query1 in your screenshot, why not use the input parameter binded with the query? Ej .php?ev=show: go to your server connect and bind the ev input parameter to query1 value

Because from what i see you are using nodejs with a content page in my example it’s a simple html page.

Because for the same as above.
All you need do to is to open your layout page, select App in App Structure and click define query params:

define your query param there and will be available to pick in the data picker on your content page…

@Teodor

as we briefly mentioned yesterday, can you point me to the correct and most recent tutorial on setting up a nodeJS app etc.
I don’t understand why one place you say layout page, and the other you say content page.

Thanks

Because these are two different things.

You can check the nodejs category:
https://docs.wappler.io/t/creating-template-based-pages-and-layout-in-wappler-with-nodejs/21430