Barlaam and Josaphat is a Christianized version of the story of Siddharta Gautama, who became the Buddha. In the Middle Ages the two were treated as Christian saints, being entered in the Greek Orthodox calendar on 26 August, and in the Roman Martyrology in the Western Church as "Barlaam and Josaphat" on the date of 27 November.
According to the legend, King Abenner or Avenier in India persecuted the Christian Church in his realm, founded by the Apostle Thomas. When astrologers predicted that his own son would some day become a Christian, Abenner had the young prince Josaphat isolated from external contact. Despite the imprisonment, Josaphat met the hermit Saint Barlaam and converted to Christianity. Josaphat kept his faith even in the face of his father's anger and persuasion. Eventually Abenner converted, turned over his throne to Josaphat, and retired to the desert to become a hermit. Josaphat himself later abdicated and went into seclusion with his old teacher Barlaam.
Why John of Damascus and the Mar Saba monastery are inevitably cited as the sources of this story are particularly puzzling. Nevertheless it is worth taking a second look at this tradition.
The Appendix for J. Armitage Robinson's The Apology of Aristides: Texts and Studies 1 makes reference to an argument in Zotenberg's Notice sur le livre de Barlaam et Joasaph which argues that
the book is much earlier than the time of S. John of Damascus; and that the matter which it has in common with several of his works is drawn from previous writers such as Gregory Nazianzen and Nemesius. This being so, it may well go back to the 6th century, or perhaps earlier still.
In all traditions however the transmission of the text is identified as coming as a result of John of Damascus's time at Mar Saba. E Wallis Budge has written a wonderful summary of all literary traditions and Zotenberg's analysis. The consensus here is that rather than the story being transmitted to John of Damascus orally (as the tradition suggests) certain features of the story make clear that the text was preserved in written form in Syria sometime before the rise of Islam and likely transmitted by John of Damascus while at the Mar Saba monastery.
In other words, we have yet another otherwise unknown early text being associated and preserved at Mar Saba.