1

Can I insert JSF-page(table) into react-component?

I have old version of application with front-end on JSF and backend on Java. Needs to create demo version with front-end on reactJs. So, can I create mock react-component with jsf-page in body to speed up creating of demo version. Is it possible?

Roberto
  • 1,288
  • 5
  • 23
  • 47

1 Answers1

1

You can include your JSF page either as :

  1. IFrame
  2. Load via Ajax and Insert the code received into the HTML

There will be no dependency of react if the JSF code dosen't contain any and both methods can be used.

If JSF code itself contains some react code , just request and insert code into html

Atul Sharma
  • 9,397
  • 10
  • 38
  • 65
  • Can I split jsf page before insertion in IFrame? F.e. I have jsf page, menu items, buttons and table. So, I need to insert table only. – Roberto May 17 '18 at 08:34
  • 1
    Yes, you can create another JSF with the required data only and insert that only. – Atul Sharma May 17 '18 at 08:42
  • Do you know, how to fetch iframe height with content? – Roberto May 22 '18 at 12:38
  • @VladislavOsipenkov do you need to adjust height of frame with content ? – Atul Sharma May 22 '18 at 16:31
  • 1
    `https://stackoverflow.com/questions/9162933/make-iframe-height-dynamic-based-on-content-inside-jquery-javascript` checkout the accepted answer. No need to focus on jquery , the code is pretty basic and can be re-written using react or plain js. – Atul Sharma May 22 '18 at 17:19