How to populate values into list box?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2007 04:09 AM
I created one new custom property to the content. I wanted to make that as list box, by the help of Component Generator Framework I configured it with TextFieldGenerator, just I am getting simple text box. Can you please give some advice how to make that text box as list box with some custom values?
Thanks in advance..
Damodar
- Labels:
-
Archive

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2007 03:54 AM
If you do this and specify the values you want in the constraint the property sheet will automatically display a list box containing the configured values.
Have a look at this wiki page for details: http://wiki.alfresco.com/wiki/Constraints

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2007 03:52 AM
It is working fine.
I want to have a default custom topic for the content, which I want to use it for allowing all viewers of the content to give their feed back.
When I create a document the feed back topic also should create along with it. Is it possible? Can you please give some advice on this?
Thanks in advance…
Damodar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2007 03:43 AM
You could either customise the CreateContentWizard by adding the code to create a topic for the new content. Have a look at CreateDiscussionDialog to see how a topic for a node gets created.
A better approach though maybe to create a custom repository action. The action could be responsible for creating a topic (discussion) for a node. This action can then be used from the "Run Action" option in the node details page or can be setup as a rule on a space. This means you could then setup a rule to add a topic to any content created in certain spaces in your repository.
Have a look at the following wiki pages:
http://wiki.alfresco.com/wiki/Custom_Actions
http://wiki.alfresco.com/wiki/Custom_Action_UI

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2007 04:15 AM
I created a custom propertey and I configured it as list box using constraint, It is working fine. Now I am stucking in configuring it in advanced search.
I configured it for advanced search like below
<config evaluator="string-compare" condition="Advanced Search">
<advanced-search>
<content-types>
<type name="cm:content" />
</content-types>
<custom-properties>
<meta-data type="cm:content" property="cm:docRating" />
</custom-properties>
</advanced-search>
</config>
Here docRating is my custom property, Now it is getting as text field I wanted it to be list box like which is there in the property sheet.
Can you please guide me how to get my custom property in the advanced search as list box.
Thanks in Advance…
Damodar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2007 04:29 AM
This class is responsible for generating the UI controls for each property being displayed. Currently this class does not support the component generator framework used by the property sheet component. You'll therefore need to add support for creating the drop down list.
Have a look at TextFieldGenerator and BaseComponentGenerator for the code that does this.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2007 11:37 PM
By taking the help of http://wiki.alfresco.com/wiki/Custom_Actions I created a custom action, in that I implemented executeImpl method as below
public void executeImpl(Action action, NodeRef actionedUponNodeRef)
{
// Check that the node still exists
if (this.nodeService.exists(actionedUponNodeRef) == true)
{
String ndid=actionedUponNodeRef.id;
System.out.println("Inside FeedBackActionExecuter.executeImpl");
String beanName = "CreateDiscussionDialog";
Object bean = FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), beanName);
if (bean == null)
{
System.out.println("Inside FeedBackActionExecuter.executeImpl: Bean is null");
throw new AlfrescoRuntimeException("Failed to start dialog as managed bean '" + beanName +
"' has not been defined");
}
// make sure the bean implements the IDialogBean interface
CreateDiscussionDialog dialog = null;
if (bean instanceof CreateDiscussionDialog)
{
System.out.println("Inside FeedBackActionExecuter.executeImpl: Got the dialog");
dialog = (CreateDiscussionDialog)bean;
}
else
{
throw new AlfrescoRuntimeException("Failed to start dialog as managed bean '" + beanName +
"' does not implement the required CreateDiscussionDialog interface");
}
// initialise the managed bean
// dialog.init(action.getParameterValues());
System.out.println("Inside FeedBackActionExecuter.executeImpl: Creating Topic");
dialog.createTopic(ndid);
System.out.println("Inside FeedBackActionExecuter.executeImpl: Created Topic");
}
}
Now It is redirecting to discussion dilog ui, which I don't want that.
I wanted a default custom topic called "Feed back" should be added to the content when it is creating or adding the content, and It should be allowed all viewers to pot their feedback.
Can you please give some clue on this.
Thanks in advance..
Damodar[/img]

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2007 06:44 AM
this.browseBean.clickSpace(forumNodeRef);
This sets up the context required to navigate to the desired space. You could try doing this in your action but setting the nodeRef to the node representing the topic instead of the parent forum object.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2007 02:33 AM
For Example, If the first drop-down has values sports and academics, if the value sports is selected, the second drop-down must list swimming, running, etc. If the value academics is selected in the first drop-down, the second drop-down must show the values maths, science,etc…
Please any one suggest an idea to implement this… Now i am able to populate all the values in the second drop down list….
Thanks
Naveen

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2007 05:16 AM
