This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-01
Channels
- # announcements (3)
- # aws (1)
- # babashka (56)
- # beginners (42)
- # calva (9)
- # cider (6)
- # circleci (5)
- # clj-kondo (17)
- # cljs-experience (1)
- # cljsjs (2)
- # clojure (106)
- # clojure-australia (1)
- # clojure-europe (36)
- # clojure-germany (5)
- # clojure-italy (13)
- # clojure-nl (14)
- # clojure-spec (19)
- # clojure-uk (27)
- # clojurescript (27)
- # cursive (20)
- # datomic (24)
- # events (2)
- # fulcro (11)
- # graalvm (1)
- # jobs (6)
- # lsp (6)
- # malli (5)
- # meander (36)
- # membrane (17)
- # nbb (4)
- # nextjournal (86)
- # off-topic (18)
- # pathom (3)
- # polylith (5)
- # portal (14)
- # rdf (5)
- # re-frame (5)
- # releases (6)
- # remote-jobs (3)
- # reveal (2)
- # ring (6)
- # shadow-cljs (139)
- # tools-deps (61)
- # vim (10)
- # xtdb (6)
Can anyone remind me of how to use plaintext URL routes that show up in the browser instead of “hashed URLs”, like this?
I’m hoping it will provide a quick/easy way to go to a specific page numbers in a RAD report. Many thanks!
I’m hoping there will be something like “pagenumber=3” that I could modify and submit.
Good question. I've been wondering that as well. https://clojurians.slack.com/archives/C68M60S4F/p1637772708389800?thread_ts=1637765422.389000 but not quite an answer to your question. https://github.com/fulcrologic/fulcro-rad/blob/952278690222ed38d09eb15b28f13f09726d04ce/src/main/com/fulcrologic/rad/routing/html5_history.cljc#L38
Well, the JS history api is the answer. You just need to book it to your code.
As @UPWHQK562 points out, RAD had built in that any routing params are stored in a single query param. That works fine but is not read/edit friendly for end users. So you would need to hook up some custom stuff
How are people handling complex validations in RAD?
ao/valid?
seems to be focused on single field validations and I need to validate against multiple fields (ex. start-date must be before end-date) where I need both fields to display the error.
fo/validator
and fs/make-validator
looks like it doesn't have a way to do web requests for validations that can't be one on the client (ex. check an address against the Melissa Data database before the user presses save).
This leads me to believe I need to hook in to the state machine stuff and store validation results in the database as derived data. Is that how others are doing this? Is there another way I've maybe missed in the docs?
That sounds reasonable. Use fs/validators for client - side validation and modify the UISM to add an extra step to run server - side validation for field that need it, setting something like :ui/server-validated? on those fields afterwards (and processing to allow /do submit)