Sergei Dubov wrote:
> Hmm... Robert, will that component by any chance strip out <html> and
> <body> tags that an external html text file might contain?

You inspired me. ;) The current jar of "Include" includes an
"UnwantedTagsRemover" class, which implements PostProcessor.
So, you can do something like:
<bean name="tagRemover" class="org.rz.include.UnwantedTagsRemover">
  <set-property name="unwantedTags" expression="'html,title,body,script'"/>
</bean>

in your .jwc or .page file, and then...

<div jwcid="@Include" file="ognl:referenceToSomeAsset" raw="true"
postprocessor="ognl:beans.tagRemover"/>

Voila. :)
I also tweaked the postprocessor property to accept java.lang.Object,
which is coerced to an iterator, so you can pass in a single
PostProcessor, or a  list of them.
Hope that helps ya. :)

Robert
> 
> Thanks,
> 
> Sergei
> 
> Robert Zeigler wrote:
> 
>> Well, if you're inserting html or anything considered to be a "text"
>> file (utf8, etc. encodings ok), it will be inserted directly, no iframe.
>> Iframe is only used for non-text files.
>> (Like: <div jwcid="@Include" file="ognl:assets.someJpg"/>)
>>
>> Robert
>>
>> Sergei Dubov wrote:
>>
>>> Cool. I think iframe is not what would work in my case. But it's cool. I
>>> am gonna write it myself then.
>>>
>>> Sergei
>>>
>>> Robert Zeigler wrote:
>>>
>>>
>>>> I wrote an "include" component (available on tassel) that does
>>>> basically
>>>> that. It may be a bit on the overkill side for what you need.
>>>> It actually analyzes the content of the file that you're "including" to
>>>> determine what to do with it; if the content is "textual", it's
>>>> inserted
>>>> directly.  Other forms of content are inserted via iframe.
>>>> If nothing else, you could strip out the 'other content handling' bits.
>>>> Like you said, no sense reinventing the wheel. :)
>>>>
>>>> Robert
>>>>
>>>> Sergei Dubov wrote:
>>>>
>>>>
>>>>> Hi guys,
>>>>>
>>>>> I am looking for a component that would allow me to embed (inline?) a
>>>>> separate html file into a Tapestry page.
>>>>>
>>>>> See, we have a content writer righting some articles for our site,
>>>>> ideally we'd like to be able to take her file and just insert into the
>>>>> overall page layout (dynamically, of course).
>>>>>
>>>>> I think, it'd be trivial to write such a component myself, but why
>>>>> re-invent the wheel? :-)
>>>>>
>>>>> Any ideas?
>>>>>
>>>>> Much appreciated,
>>>>>
>>>>> Sergei Dubov
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to