[Yanel-dev] Re: Toolbar on/off
Michael Wechner
michael.wechner at wyona.com
Thu Dec 30 21:43:47 CET 2010
Hi Balz
On 12/30/10 11:56 AM, Balz Schreier wrote:
> Hi Michael,
>
> yes Environment would be a great place for that, much better than in =
> the request object.
right, but Environment#getStateOfView()
actually already is kind of the toolbar status, because see
YanelServlet#getEnvironment(...)
although IIUC correctly the toolbar suppressed state is missing.
Also of course this is not explicite and hence can cause confusion in =
case this implementation should
ever be changed.
I will have a closer look at it and try to make another proposal.
Cheers
Michael
>
> Cheers
> Balz
>
> On Thu, Dec 30, 2010 at 12:32 AM, Michael Wechner =
> <michael.wechner at wyona.com <mailto:michael.wechner at wyona.com>> wrote:
>
> Hi Balz
>
> See
>
> src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java#ge=
tToolbarStatus()
>
> and how it is used within this class.
>
> But I agree we could/should make this a bit more "formal". Maybe
> enhance
>
> src/core/java/org/wyona/yanel/core/Environment.java
>
> with such a method. WDYT?
>
> Cheers
>
> Michael
>
>
> On 12/29/10 5:38 PM, Balz Schreier wrote:
>> Hi,
>>
>> in the meanwhile I implemented this the following way. If you
>> know a more elegant way, please let me know.
>> Something like getRequest().isToolbarEnabled() would be cool.
>>
>> if
>> (StateOfView.AUTHORING.equals(getEnvironment().getStateOfView())) {
>>
>> transformer.setParameter(YANEL_TOOLBAR_STATE, "on");
>>
>> } else {
>>
>> transformer.setParameter(YANEL_TOOLBAR_STATE, "off");
>>
>> }
>>
>>
>> Cheers
>> Balz
>>
>> On Wed, Dec 29, 2010 at 5:07 PM, Balz Schreier
>> <balz.schreier at gmail.com <mailto:balz.schreier at gmail.com>> wrote:
>>
>> Hi,
>>
>> through which API can I find out whether the toolbar is
>> switched on or off?
>>
>> Thanks
>> Balz
>>
>>
>
>
> --
> Yanel-development mailing list Yanel-development at wyona.com
> <mailto:Yanel-development at wyona.com>
> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wyona.org/pipermail/yanel-development/attachments/2010123=
0/eba75bcf/attachment.htm
More information about the Yanel-development
mailing list