Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Sapphire » Use of PageBook Property
Use of PageBook Property [message #725893] Fri, 16 September 2011 05:59 Go to next message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 213
Registered: July 2009
Senior Member
What is the use of PageBook Content type ? Do we have any examples where
it is used, if not can anyone explain how to use and where to use it ?

~Kamesh
Re: Use of PageBook Property [message #726078 is a reply to message #725893] Fri, 16 September 2011 14:08 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
A page book is a device to display one of a number of pages based on some criteria. Each page has a key and the page book controller determines which key is in effect at any given time. There are currently two controllers available. The enum property controller lets you link a page to a value of an enum property. The list selection controller lets you build local master-details views with a table and details beneath it. The selection in the table controls the page book. The pages are keyed by list element type.

For examples, search sample .sdef files for "switching-panel", which is the old term for a page book.

- Konstantin
Re: Use of PageBook Property [message #726091 is a reply to message #726078] Fri, 16 September 2011 14:30 Go to previous messageGo to next message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 213
Registered: July 2009
Senior Member
I had a guess that should be its functionality, actually I have a scenario
where I need to show Basic/Advanced tabs for a Model Element , so I was
trying to see what best way to accomplish it, when I tried to use Tab Group
I am not getting the desired look and feel as its throwing a grey background
and labels on that making it look ugly in the Section.

Is it possible to achieve the similar functionality using Page book ?

~Kamesh



~ Kamesh
"Konstantin Komissarchik" wrote in message
news:j4vkim$n1$1@news.eclipse.org...

A page book is a device to display one of a number of pages based on some
criteria. Each page has a key and the page book controller determines which
key is in effect at any given time. There are currently two controllers
available. The enum property controller lets you link a page to a value of
an enum property. The list selection controller lets you build local
master-details views with a table and details beneath it. The selection in
the table controls the page book. The pages are keyed by list element type.

For examples, search sample .sdef files for "switching-panel", which is the
old term for a page book.

- Konstantin
Re: Use of PageBook Property [message #726106 is a reply to message #726091] Fri, 16 September 2011 15:16 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
I don't think I would try to use the page book construct for this scenario. If this is inside an editor, you can break the basic and advanced properties into separate sections. You can then make the advanced section collapsible and collapsed initially, so the user has to expand it to see the advanced content.

- Konstantin
Re: Use of PageBook Property [message #726109 is a reply to message #726106] Fri, 16 September 2011 15:36 Go to previous messageGo to next message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 213
Registered: July 2009
Senior Member
Thanks for the information.That’s nice, I am right now doing the same way,
having two sections basic/advanced and made advanced collapsible to start
with and if the user wants let him expand it.

~Kamesh


~ Kamesh
"Konstantin Komissarchik" wrote in message
news:j4voi2$534$1@news.eclipse.org...

I don't think I would try to use the page book construct for this scenario.
If this is inside an editor, you can break the basic and advanced properties
into separate sections. You can then make the advanced section collapsible
and collapsed initially, so the user has to expand it to see the advanced
content.

- Konstantin
Re: Use of PageBook Property [message #730914 is a reply to message #726078] Thu, 29 September 2011 14:21 Go to previous messageGo to next message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 213
Registered: July 2009
Senior Member
Back again Smile

Got a small issue with page book. I have Model that picks the value from ENUM, and based on that value i need to show appropriate sections in, for that am using the pagebook editor, but when the editor is rendered it shows "StringIndexOutofBound"

Model snippet
Enum - PageType
@Label( standard = "Portlet" )
	@EnumSerialization( primary = "PORTLET" )
	PORTLET,

	@Label( standard = "Web Content" )
	@EnumSerialization( primary = "WEBCONTENT" )
	WEBCONTENT,

	@Label( standard = "IFRAME" )
	@EnumSerialization( primary = "IFRAME" )
	IFRAME,

	@Label( standard = "Embeded" )
	@EnumSerialization( primary = "EMBEDED" )
	EMBEDED


Model Class:
@Type( base = PageType.class )
	@Label( standard = "Page Type" )
	@DefaultValue( text = "Select Page Type" )
	@Required
	@XmlBinding( path = "@type" )
	ValueProperty PROP_TYPE = new ValueProperty( TYPE, "Type" );

	Value<PageType> getType();

	void setType( PageType version );

	void setType( String version );


Sdef snippet
  <switching-panel>
		<panel>
			<key>PORTLET</key>
			<content>
				<property-editor>Portlet</property-editor>
			</content>
		</panel>
		<enum-controller>
			<property>Type</property>
		</enum-controller>
		<default-panel>
			<content>
				<label>Select the Page Type to edit more details</label>
			</content>
		</default-panel>
		<panel>
			<key>WEBCONTENT</key>
			<content>
				<property-editor>WebContent</property-editor>
			</content>
		</panel>
		<panel>
			<key>IFRAME</key>
			<content>
				<label>TODO</label>
			</content>
		</panel>
		<panel>
			<key>EMBEDED</key>
			<content>
				<label>TODO</label>
			</content>
		</panel>
</switching-panel>


am not sure the reason for the error, any thoughts ?
Re: Use of PageBook Property [message #730918 is a reply to message #730914] Thu, 29 September 2011 14:25 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
I believe you have to use <key>PageType.PORTLET</key> syntax and have to make sure that package with PageType class is imported via sdef import directives.

- Konstantin
Re: Use of PageBook Property [message #730923 is a reply to message #730918] Thu, 29 September 2011 14:35 Go to previous messageGo to next message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 213
Registered: July 2009
Senior Member
yeah i need to Use PageType.PORTLET and it worked. Thanks
Re: Use of PageBook Property [message #730953 is a reply to message #730923] Thu, 29 September 2011 15:29 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
I am glad this is working for you now, but do go ahead and open a bug on this. Throwing an IndexOutOfBoundsException is not a reasonable behavior here.

- Konstantin
Re: Use of PageBook Property [message #731456 is a reply to message #730953] Sat, 01 October 2011 04:53 Go to previous message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 213
Registered: July 2009
Senior Member
Here it is https://bugs.eclipse.org/bugs/show_bug.cgi?id=359630
Previous Topic:Status of 0.3.1 release
Next Topic:Widget Disposed
Goto Forum:
  


Current Time: Fri Mar 29 12:36:12 GMT 2024

Powered by FUDForum. Page generated in 0.03892 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top