Giter Club home page Giter Club logo

Comments (4)

superbobry avatar superbobry commented on July 28, 2024

Hello, Murtaza, can you please show us the code where you actually use reg-form?

from enfocus.

ckirkendall avatar ckirkendall commented on July 28, 2024

Murtaza,
The content transform should support anything that looks like a node
(including dom fragments), anything that looks like a sequence of nodes and
finally strings. If it is having trouble with a DocumentFragment (I am
assuming that is what is returning from reg-form) that would be a bug. Is
it possible for you to find a small representative case that maybe I can
build locally. What is the library providing defhtml called? What is
output by the log statement?

CK

On Fri, Jun 22, 2012 at 7:25 AM, Murtaza Husain <
[email protected]

wrote:

Hi,

I have the below code working. In this I am generating HTML / DOM object
using crate. Then I am inserting that into the DOM using the content macro
of enfocus.

However the content macro of enfocus is only suppose to work with enfocus
tags, and here I have a DOM object !

(defn layout [c]
"Takes html string as input and inserts it into the DOM"
(log "Layout Content" c)
(at (doc)
[".cljs-main"](content c)))

(defhtml reg-form []
[:div.form-horizontal
[:fieldset
[:legend "Student Registeration"]
[:div.control-group
[:label.control-label {:for "input01" :bind "click:
faiz.client.info-collection.hello"} "Text Input"]]]])

(defn render [](layout %28reg-form%29))

Thanks,
Murtaza


Reply to this email directly or view it on GitHub:
#15

from enfocus.

murtaza52 avatar murtaza52 commented on July 28, 2024

Hello Creighton,

You are correct it is actually a DOM fragment. defhtml is provided by crate
(Chris Ganger) and is a cljs version of hiccup.

So that resolves it now. Also is there a way for me to inspect the dom
fragment in the repl itself?

Thanks,
Murtaza

On Fri, Jun 22, 2012 at 6:25 PM, Creighton Kirkendall <
[email protected]

wrote:

Murtaza,
The content transform should support anything that looks like a node
(including dom fragments), anything that looks like a sequence of nodes and
finally strings. If it is having trouble with a DocumentFragment (I am
assuming that is what is returning from reg-form) that would be a bug. Is
it possible for you to find a small representative case that maybe I can
build locally. What is the library providing defhtml called? What is
output by the log statement?

CK

On Fri, Jun 22, 2012 at 7:25 AM, Murtaza Husain <
[email protected]

wrote:

Hi,

I have the below code working. In this I am generating HTML / DOM object
using crate. Then I am inserting that into the DOM using the content
macro
of enfocus.

However the content macro of enfocus is only suppose to work with enfocus
tags, and here I have a DOM object !

(defn layout [c]
"Takes html string as input and inserts it into the DOM"
(log "Layout Content" c)
(at (doc)
[".cljs-main"](content c)))

(defhtml reg-form []
[:div.form-horizontal
[:fieldset
[:legend "Student Registeration"]
[:div.control-group
[:label.control-label {:for "input01" :bind "click:
faiz.client.info-collection.hello"} "Text Input"]]]])

(defn render [](layout %28reg-form%29))

Thanks,
Murtaza


Reply to this email directly or view it on GitHub:
#15


Reply to this email directly or view it on GitHub:
#15 (comment)

from enfocus.

murtaza52 avatar murtaza52 commented on July 28, 2024

Hello Sergei - I am directly calling the the (render) funciton which then
adds the DOM generated by crate (hiccup) to the DOM using enfocus.

On Fri, Jun 22, 2012 at 6:01 PM, Sergei Lebedev <
[email protected]

wrote:

Hello, Murtaza, can you please show us the code where you actually use
reg-form?


Reply to this email directly or view it on GitHub:
#15 (comment)

from enfocus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.