Fork me on GitHub
#luminus
<
2017-07-25
>
llsouder02:07:03

In examples I see the a form's values being set with name="item1" value={{item1}}' but what if I wanted to set the value programmatically? like name="item{{forloop.counter}} value={{str "item" forloop.counter}}

llsouder02:07:08

I have a table so I have item-1-1 item1-2 item2-1 item2-2 etc.

llsouder02:07:47

I am about to just hard code the table and be done with it but I have a feeling there is a better way

yogthos03:07:43

you should be able to do name="item{{forloop.counter}} value="item-{{forloop.counter}}"

llsouder11:07:26

@yogthos will value="item-{{forloop.counter}}" result in the value :item1 or "item1" I assumed it would be the latter.

yogthos13:07:28

Yeah it would be a string

janvanryswyck19:07:16

Probably a noob question, but I’ve been stuck on this for a while: I build my application using lein uberjar. I’m able to run my application (java -Xms400m -Xmx400m -jar voetbalhelden.admin.jar) but when I try to open the login page I get the following error (in the logs): ERROR admin.middleware - #error { :cause JAR entry templates//login.html not found in /home/jan/Source/sports-club/admin/target/uberjar/voetbalhelden.admin.jar :via [{:type java.io.FileNotFoundException :message JAR entry templates//login.html not found in /home/jan/Source/sports-club/admin/target/uberjar/voetbalhelden.admin.jar :at [sun.net.www.protocol.jar.JarURLConnection connect JarURLConnection.java 142]}]

yogthos19:07:24

the // looks a bit suspect, are you sure your path is correct?

janvanryswyck19:07:34

Which path would that be? Going to the root URL of my application should redirect to the login page (which it does correctly) http://127.0.0.1:6430/login

janvanryswyck19:07:05

The // is indeed quite odd, but I have no idea where it’s coming from

janvanryswyck20:07:36

@yogthos I found the cause of the “//“: I used (layout/render “/login.html”) instead of (layout/render “login.html”) in the route handler. This wasn’t causing any trouble in dev mode, but apparently it does when deploying it. Thanks for pointing me in the right direction 🙂