Verschiedene Fehlerkorrekturen und Dokumentation.
git-svn-id: https://svn.libreccm.org/ccm/trunk@1373 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
bf2f522ae6
commit
1ab1853eef
|
|
@ -96,11 +96,7 @@ public class Paginator {
|
|||
logger.debug(String.format("Applying limits: %d, %d",
|
||||
getBegin(),
|
||||
getEnd()));
|
||||
/*if (getBegin() == getEnd()) {
|
||||
query.setRange(getBegin(), getEnd() + 1);
|
||||
} else {*/
|
||||
query.setRange(getBegin(), getEnd() + 1);
|
||||
//}
|
||||
}
|
||||
|
||||
public int getPageCount() {
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ public class Date extends Widget implements BebopConstants {
|
|||
protected class YearFragment extends SingleSelect {
|
||||
|
||||
protected Date parent;
|
||||
private boolean autoCurrentYear; //Decide wether to set the current year if year is null
|
||||
|
||||
public YearFragment(String name, Date parent) {
|
||||
super(name);
|
||||
|
|
@ -80,6 +81,10 @@ public class Date extends Widget implements BebopConstants {
|
|||
return new ParameterData(getParameterModel(), value);
|
||||
}
|
||||
|
||||
public void setAutoCurrentYear(final boolean autoCurrentYear) {
|
||||
this.autoCurrentYear = autoCurrentYear;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getValue(PageState ps) {
|
||||
ParameterModel model = parent.getParameterModel();
|
||||
|
|
@ -89,7 +94,7 @@ public class Date extends Widget implements BebopConstants {
|
|||
}
|
||||
}
|
||||
Object value = parent.getFragmentValue(ps, Calendar.YEAR);
|
||||
if (value == null) {
|
||||
if ((value == null) && autoCurrentYear) {
|
||||
Calendar currentTime = GregorianCalendar.getInstance();
|
||||
int currentYear = currentTime.get(Calendar.YEAR);
|
||||
value = new Integer(currentYear);
|
||||
|
|
@ -195,6 +200,10 @@ public class Date extends Widget implements BebopConstants {
|
|||
this(new DateParameter(name));
|
||||
}
|
||||
|
||||
public void setAutoCurrentYear(final boolean autoCurrentYear) {
|
||||
((YearFragment) m_year).setAutoCurrentYear(autoCurrentYear);
|
||||
}
|
||||
|
||||
public void setYearRange(int yearBegin, int yearEnd) {
|
||||
Assert.isUnlocked(this);
|
||||
if (yearBegin != m_year_begin || yearEnd != m_year_end) {
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ public class PublicationWithPublisher extends Publication {
|
|||
* @param publisher The publisher of the publication.
|
||||
*/
|
||||
public void setPublisher(Publisher publisher) {
|
||||
Publisher oldPublisher;
|
||||
final Publisher oldPublisher;
|
||||
|
||||
oldPublisher = getPublisher();
|
||||
if (oldPublisher != null) {
|
||||
|
|
|
|||
|
|
@ -33,10 +33,8 @@ import com.arsdigita.bebop.parameters.IntegerParameter;
|
|||
import com.arsdigita.bebop.parameters.ParameterData;
|
||||
import com.arsdigita.bebop.parameters.ParameterModel;
|
||||
import com.arsdigita.bebop.parameters.StringParameter;
|
||||
import com.arsdigita.cms.ContentType;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
import com.arsdigita.cms.contenttypes.PublicationWithPublisher;
|
||||
import com.arsdigita.cms.contenttypes.Publisher;
|
||||
import com.arsdigita.cms.ui.ItemSearchWidget;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public class PublicationWithPublisherSetPublisherSheet
|
|||
1,
|
||||
PublicationGlobalizationUtil.globalize(
|
||||
"publications.ui.with_publisher.publisher.remove").localize(),
|
||||
TABLE_COL_EDIT));
|
||||
TABLE_COL_DEL));
|
||||
|
||||
setModelBuilder(new PublicationWithPublisherSetPublisherSheetModelBuilder(
|
||||
itemModel));
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.arsdigita.xml.Element;
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Displays the description text for a project.
|
||||
*
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ public class SciProjectPropertyForm
|
|||
beginParam.allowSkipDay(true);
|
||||
final Calendar today = new GregorianCalendar();
|
||||
final Date begin = new Date(beginParam);
|
||||
begin.setAutoCurrentYear(false);
|
||||
begin.setYearRange(1970, (today.get(Calendar.YEAR) + 2));
|
||||
add(begin);
|
||||
|
||||
|
|
@ -87,6 +88,7 @@ public class SciProjectPropertyForm
|
|||
endParam.allowSkipMonth(true);
|
||||
endParam.allowSkipDay(true);
|
||||
Date end = new Date(endParam);
|
||||
end.setAutoCurrentYear(false);
|
||||
end.setYearRange(1970, (today.get(Calendar.YEAR) + 8));
|
||||
add(end);
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,9 @@ import java.util.Locale;
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Summary tab for projects, displays lifespan of the project, the short
|
||||
* description, the project team (aka members), a contact, the involved
|
||||
* organizations and the information about the funding of the project.
|
||||
*
|
||||
* @author Jens Pelzetter
|
||||
* @version $Id$
|
||||
|
|
@ -350,6 +353,7 @@ public class SciProjectSummaryTab implements GenericOrgaUnitTab {
|
|||
final long start = System.currentTimeMillis();
|
||||
final XmlGenerator generator = new XmlGenerator(involved);
|
||||
generator.setUseExtraXml(false);
|
||||
generator.setItemElemName("organization", "");
|
||||
generator.generateXML(state, parent, "");
|
||||
logger.debug(String.format("Generated XML for involved organization "
|
||||
+ "'%s' in %d ms.",
|
||||
|
|
|
|||
Loading…
Reference in New Issue