hippo external docpicker plugin

52 views
Skip to first unread message

sehgal.h...@gmail.com

unread,
Feb 11, 2016, 4:02:19 AM2/11/16
to Hippo Community
Hi

I'm trying to use external docPicker plugin that is available on : 
http://exdocpickerbase.forge.onehippo.org/

 I downloaded the demo project available on 
http://exdocpickerbase.forge.onehippo.org/

and installed it. In it i was able to select a doc from list of docs, but could not display the same on the sit module as there is no path associated to the exdocpicker field and has no getter in the bean also. So what exactly is the use of External doc picker?? and how to display the selection on site.


thanks and regards
Hitesh Sehgal 

marijan milicevic

unread,
Feb 11, 2016, 4:30:31 AM2/11/16
to hippo-c...@googlegroups.com
Hi,

once you pick a document/image etc. with document picker, selection is stored into backing document as a property or node, depends how you implemented it. 
You can add getter [1]for properties Java bean of backing document mentioned above (or use essentials bean tool generator)
hth,
cheers,
marijan

 
thanks and regards
Hitesh Sehgal 

--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.

marijan milicevic

unread,
Feb 11, 2016, 4:31:40 AM2/11/16
to hippo-c...@googlegroups.com
On Thu, Feb 11, 2016 at 10:30 AM, marijan milicevic <m.mil...@onehippo.com> wrote:
Hi,

On Thu, Feb 11, 2016 at 10:02 AM, <sehgal.h...@gmail.com> wrote:
Hi

I'm trying to use external docPicker plugin that is available on : 
http://exdocpickerbase.forge.onehippo.org/

 I downloaded the demo project available on 
http://exdocpickerbase.forge.onehippo.org/

and installed it. In it i was able to select a doc from list of docs, but could not display the same on the sit module as there is no path associated to the exdocpicker field and has no getter in the bean also. So what exactly is the use of External doc picker?? and how to display the selection on site.


once you pick a document/image etc. with document picker, selection is stored into backing document as a property or node, depends how you implemented it. 
You can add getter [1]for properties Java bean of backing document mentioned above (or use essentials bean tool generator)

forgot to say: once you this, you'll also need to change JSP/freemarker template to display desired data...
/m

sehgal.h...@gmail.com

unread,
Feb 11, 2016, 5:14:46 AM2/11/16
to Hippo Community
Hi,

That exactly is the problem!

To generate a getter we must have a property path specified, please refer to the attachments, this makes storing and displaying the content a mystery. also the mvn install and cargo run does not include the plugin in any other project.


Please help!!

Regards
Hitesh Sehgal
nogetter.JPG
noproperty.JPG

marijan milicevic

unread,
Feb 11, 2016, 5:54:53 AM2/11/16
to hippo-c...@googlegroups.com
Hi,
On Thu, Feb 11, 2016 at 11:14 AM, <sehgal.h...@gmail.com> wrote:
Hi,

That exactly is the problem!

To generate a getter we must have a property path specified, please refer to the attachments, this makes storing and displaying the content a mystery. also the mvn install and cargo run does not include the plugin in any other project.


correct. You need to add a field yourself, see documentation at [1], pay attention to:  example.external.docs.field.name 
this is the field where external (picker) data is stored into. You have to add this field yourself and you also need to mark it as single or multi value field, this depends on your implementation..and is connected to selection.mode 
property (also described on the same page). Default value is "multiple".
After you've added field to your document, you can add getter to the  Java bean. 
cheers
marijan

Woonsan Ko

unread,
Feb 11, 2016, 10:26:23 AM2/11/16
to hippo-c...@googlegroups.com
Hi Hitesh,

The demo project of the plugin doesn't include any HST content bean
examples intentionally because the plugin itself is originally about
how to add a custom field to select external resources in CMS
authoring UI. That's the focus here. If we keep the demo project with
all the variety of hst code examples, then it might be too much to
maintain, IMO.
I think it's trivial to add getter method in your HST content bean to
read your custom field or child node (set by the plugin in the
authoring UI).
Also, the *example* in the page, ExampleExternalDocumentServiceFacade,
is just an example. You shouldn't regard it as a base code you can use
right away. In that specific example, for simplicity, it stores the
data in a property, but there are a lot of different examples doing in
different ways.
For example, in my experience, my customer wants to create mirror
nodes (doc/image/asset link field) when selecting external resources.
Anyway, there can be too many different implementations.
So, I intended to keep the demo project as simple as possible, only
focusing on authoring UI extension. Yeah, a good thing of external
document picker plugin is that you don't have to specify a physical
property or compound nodes tightly with the editor:template field UI
component configuration. It's only about UI (which the plugin
provides) in the end. :-)
Anyway, in your case, you should add a getter by yourself based on
your facade implementation because you know all about your facade
implementation and how it stores the data physically.
You might think it's not so consistent with the bean generator in
essentials. Yeah, the tool does its job based on physical document
node definitions, not considering this kind of *extensible* community
driven plugins. We are open to any good ideas to improve it though.

Kind regards,

Woonsan
--
w....@onehippo.com www.onehippo.com
Boston - 745 Atlantic Ave, 8th Floor, Boston MA 02111
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466

sehgal.h...@gmail.com

unread,
Feb 11, 2016, 2:12:07 PM2/11/16
to Hippo Community
Hi Woonsan , Marijan and everyone 

First of all thanks a lot for taking out time to reply and help me understand the dynamics of the plugin. With your help i was able to implement the desired result in The Demo project.
Reply all
Reply to author
Forward
0 new messages